Version 1.19.0-dev.4.0
Merge 36f52dd43f1111cbc5b51796ab51d8136bac6b9f into dev
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c62bf5..64a30df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,66 @@
## 1.19.0
+### Core library changes
+
+* `dart:io`
+ * `Socket.connect` with source-address argument is now non-blocking
+ on Mac. Was already non-blocking on all other platforms.
+ * Report a better error when a bind fails because of a bad source address.
+
+### Strong Mode
+
+* New feature - an option to disable implicit casts
+ (SDK issue [26583](https://github.com/dart-lang/sdk/issues/26583)),
+ see the [documentation](https://github.com/dart-lang/dev_compiler/blob/master/doc/STATIC_SAFETY.md#disable-implicit-casts)
+ for usage instructions and examples.
+
+* New feature - an option to disable implicit dynamic
+ (SDK issue [25573](https://github.com/dart-lang/sdk/issues/25573)),
+ see the [documentation](https://github.com/dart-lang/dev_compiler/blob/master/doc/STATIC_SAFETY.md#disable-implicit-dynamic)
+ for usage instructions and examples.
+
+* Breaking change - infer generic type arguments from the
+ constructor invocation arguments
+ (SDK issue [25220](https://github.com/dart-lang/sdk/issues/25220))
+
+ ```dart
+ var map = new Map<String, String>();
+
+ // infer: Map<String, String>
+ var otherMap = new Map.from(map);
+ ```
+
+* Breaking change - infer local function return type
+ (SDK issue [26414](https://github.com/dart-lang/sdk/issues/26414))
+
+ ```dart
+ void main() {
+ // infer: return type is int
+ f() { return 40; }
+ int y = f() + 2; // type checks
+ print(y);
+ }
+ ```
+
+* Breaking change - allow type promotion from a generic type parameter
+ (SDK issue [26414](https://github.com/dart-lang/sdk/issues/26965))
+
+ ```dart
+ void fn/*<T>*/(/*=T*/ object) {
+ if (object is String) {
+ // Treat `object` as `String` inside this block.
+ // But it will require a cast to pass it to something that expects `T`.
+ print(object.substring(1));
+ }
+ }
+ ```
+
+### Dart VM
+
+* The dependency on BoringSSL has been rolled forward. Going forward, builds
+ of the Dart VM including secure sockets will require a compiler with C11
+ support, and to link against glib 2.16 or newer.
+
### Tool Changes
* `dartfmt` - upgraded to v0.2.9
@@ -39,6 +100,9 @@
* Eliminate some false negatives when determining whether global executables
are on the user's executable path.
+* dart2dart (aka `dart2js --output-type=dart`) has been removed (this was
+ deprecated in Dart 1.11)
+
[Flutter]: https://flutter.io/
## 1.18.1 - 2016-08-02
diff --git a/DEPS b/DEPS
index 10ac7b8..f53dfc9 100644
--- a/DEPS
+++ b/DEPS
@@ -43,7 +43,7 @@
"barback_tag" : "@0.15.2+7",
"bazel_worker_tag": "@v0.1.0",
"boolean_selector_tag" : "@1.0.0",
- "boringssl_rev" : "@daeafc22c66ad48f6b32fc8d3362eb9ba31b774e",
+ "boringssl_rev" : "@8d343b44bbab829d1a28fdef650ca95f7db4412e",
"charcode_tag": "@1.1.0",
"chrome_rev" : "@19997",
"cli_util_tag" : "@0.0.1+2",
@@ -56,7 +56,7 @@
"dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
"dart_style_tag": "@0.2.9",
"dartdoc_tag" : "@v0.9.6+2",
- "dev_compiler_rev": "@9cc982b90f57c6132f648b0041c0b03bd23fcbfc",
+ "dev_compiler_rev": "@fa084164b620ea75cd2008c9dc317655a045ad6d",
"fixnum_tag": "@0.10.5",
"func_rev": "@8d4aea75c21be2179cb00dc2b94a71414653094e",
"glob_rev": "@704cf75e4f26b417505c5c611bdaacd8808467dd",
diff --git a/create_sdk.gyp b/create_sdk.gyp
index 83ddc47..b1b9361 100644
--- a/create_sdk.gyp
+++ b/create_sdk.gyp
@@ -26,7 +26,6 @@
'<!@(["python", "tools/list_files.py",'
'"dart$",'
'"sdk/lib"])',
- 'sdk/lib/dart2dart.platform',
'sdk/lib/dart_client.platform',
'sdk/lib/dart_server.platform',
'sdk/lib/dart_shared.platform',
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index ca87546..f72e512 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -29,9 +29,10 @@
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/instrumentation/instrumentation.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/source/pub_package_map_provider.dart';
+import 'package:analyzer/src/context/builder.dart';
import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/java_io.dart';
@@ -1661,7 +1662,7 @@
EmbedderYamlLocator locator =
disposition.getEmbedderLocator(resourceProvider);
Map<Folder, YamlMap> embedderYamls = locator.embedderYamls;
- EmbedderSdk embedderSdk = new EmbedderSdk(embedderYamls);
+ EmbedderSdk embedderSdk = new EmbedderSdk(resourceProvider, embedderYamls);
if (embedderSdk.libraryMap.size() == 0) {
// There was no embedder file, or the file was empty, so used the default
// SDK.
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 347788b..86b13a1 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -16,14 +16,15 @@
import 'package:analyzer/plugin/resolver_provider.dart';
import 'package:analyzer/source/analysis_options_provider.dart';
import 'package:analyzer/source/config.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/source/package_map_provider.dart';
import 'package:analyzer/source/package_map_resolver.dart';
import 'package:analyzer/source/path_filter.dart';
import 'package:analyzer/source/pub_package_map_provider.dart';
import 'package:analyzer/source/sdk_ext.dart';
+import 'package:analyzer/src/context/builder.dart';
import 'package:analyzer/src/context/context.dart' as context;
import 'package:analyzer/src/context/source.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/java_io.dart';
@@ -391,6 +392,13 @@
static const String PACKAGE_SPEC_NAME = '.packages';
/**
+ * The name of the key in an embedder file whose value is the list of
+ * libraries in the SDK.
+ * TODO(brianwilkerson) This is also defined in sdk.dart.
+ */
+ static const String _EMBEDDED_LIB_MAP_KEY = 'embedded_libs';
+
+ /**
* The [ResourceProvider] using which paths are converted into [Resource]s.
*/
final ResourceProvider resourceProvider;
@@ -515,6 +523,7 @@
contexts.add(info.context);
info.children.forEach(addContextAndDescendants);
}
+
if (innermostContainingInfo != null) {
if (analysisRoot == innermostContainingInfo.folder) {
addContextAndDescendants(innermostContainingInfo);
@@ -529,6 +538,11 @@
return contexts;
}
+ /**
+ * Check if this map defines embedded libraries.
+ */
+ bool definesEmbeddedLibs(Map map) => map[_EMBEDDED_LIB_MAP_KEY] != null;
+
@override
AnalysisContext getContextFor(String path) {
return _getInnermostContextInfoFor(path)?.context;
@@ -913,7 +927,8 @@
.where((r) => r is! DartUriResolver)
.toList();
// Add an embedded URI resolver in its place.
- resolvers.add(new DartUriResolver(new EmbedderSdk(embedderYamls)));
+ resolvers.add(new DartUriResolver(
+ new EmbedderSdk(resourceProvider, embedderYamls)));
// Set a new source factory.
SourceFactoryImpl newFactory = sourceFactory.clone();
@@ -1158,7 +1173,7 @@
EmbedderYamlLocator locator =
disposition.getEmbedderLocator(resourceProvider);
Map<Folder, YamlMap> embedderYamls = locator.embedderYamls;
- EmbedderSdk embedderSdk = new EmbedderSdk(embedderYamls);
+ EmbedderSdk embedderSdk = new EmbedderSdk(resourceProvider, embedderYamls);
if (embedderSdk.libraryMap.size() == 0) {
// There was no embedder file, or the file was empty, so used the default
// SDK.
diff --git a/pkg/analysis_server/lib/src/status/get_handler.dart b/pkg/analysis_server/lib/src/status/get_handler.dart
index d9486dd..11cccff 100644
--- a/pkg/analysis_server/lib/src/status/get_handler.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler.dart
@@ -28,12 +28,12 @@
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/visitor.dart';
import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/source/error_processor.dart';
import 'package:analyzer/source/sdk_ext.dart';
import 'package:analyzer/src/context/cache.dart';
import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl;
import 'package:analyzer/src/context/source.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/java_engine.dart';
@@ -670,6 +670,7 @@
_writeRow(buffer, [tag.elapsedMs, percentStr, tag.label],
classes: ["right", "right", null]);
}
+
tags.forEach(writeRow);
buffer.write('</table>');
//
@@ -684,6 +685,7 @@
}
counts[key] = count;
}
+
Set<AnalysisTarget> countedTargets = new HashSet<AnalysisTarget>();
Map<String, int> sourceTypeCounts = new HashMap<String, int>();
Map<String, int> typeCounts = new HashMap<String, int>();
@@ -751,6 +753,7 @@
}
});
}
+
explicitSourceCount += explicitSources.length;
explicitLineCount += lineCount(explicitSources, true);
implicitSourceCount += implicitSources.length;
@@ -1399,6 +1402,7 @@
buffer.write('</table></p>');
}
}
+
void writeOptions(StringBuffer buffer, AnalysisOptionsImpl options,
{void writeAdditionalOptions(StringBuffer buffer)}) {
if (options == null) {
@@ -1720,6 +1724,7 @@
});
buffer.write('</table>');
}
+
writeCountMap('Directly Held AST Nodes', data.directNodeCounts);
writeCountMap('Indirectly Held AST Nodes', data.indirectNodeCounts);
writeCountMap('Directly Held Elements', data.elementCounts);
@@ -2418,6 +2423,7 @@
buffer.write(plugin.runtimeType);
buffer.write(')<br>');
}
+
buffer.write('<h3>Plugin Status</h3><p>');
writePlugin(AnalysisEngine.instance.enginePlugin);
writePlugin(_server.serverPlugin);
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index d0a2549..41b0983 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -10,8 +10,9 @@
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/file_system/memory_file_system.dart';
import 'package:analyzer/instrumentation/instrumentation.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/source/error_processor.dart';
+import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/java_io.dart';
@@ -2650,7 +2651,8 @@
if (currentContext is InternalAnalysisContext) {
EmbedderYamlLocator embedderYamlLocator =
disposition.getEmbedderLocator(resourceProvider);
- EmbedderSdk sdk = new EmbedderSdk(embedderYamlLocator.embedderYamls);
+ EmbedderSdk sdk =
+ new EmbedderSdk(resourceProvider, embedderYamlLocator.embedderYamls);
if (sdk.libraryMap.size() > 0) {
// We have some embedder dart: uri mappings, add the resolver
// to the list.
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index 56abc6a..94a72a8 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -2,6 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+@deprecated
library analyzer.source.embedder;
import 'dart:collection' show HashMap;
@@ -19,13 +20,17 @@
import 'package:analyzer/src/summary/idl.dart';
import 'package:yaml/yaml.dart';
+export 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
+
const String _DART_COLON_PREFIX = 'dart:';
const String _EMBEDDED_LIB_MAP_KEY = 'embedded_libs';
/// Check if this map defines embedded libraries.
+@deprecated
bool definesEmbeddedLibs(Map map) => map[_EMBEDDED_LIB_MAP_KEY] != null;
/// An SDK backed by URI mappings derived from an `_embedder.yaml` file.
+@deprecated
class EmbedderSdk extends AbstractDartSdk {
final Map<String, String> _urlMappings = new HashMap<String, String>();
@@ -175,74 +180,3 @@
return sdkSource?.uri;
}
}
-
-/// Given a packageMap, check in each package's lib directory for the
-/// existence of an `_embedder.yaml` file. If the file contains a top level
-/// YamlMap, it will be added to the [embedderYamls] map.
-class EmbedderYamlLocator {
- static const String EMBEDDER_FILE_NAME = '_embedder.yaml';
-
- /// Map from package's library directory to the parsed YamlMap.
- final Map<Folder, YamlMap> embedderYamls = new HashMap<Folder, YamlMap>();
-
- EmbedderYamlLocator(Map<String, List<Folder>> packageMap) {
- if (packageMap != null) {
- _processPackageMap(packageMap);
- }
- }
-
- /// Programatically add an _embedder.yaml mapping.
- void addEmbedderYaml(Folder libDir, String embedderYaml) {
- _processEmbedderYaml(libDir, embedderYaml);
- }
-
- void refresh(Map<String, List<Folder>> packageMap) {
- // Clear existing.
- embedderYamls.clear();
- if (packageMap != null) {
- _processPackageMap(packageMap);
- }
- }
-
- /// Given the yaml for an embedder ([embedderYaml]) and a folder
- /// ([libDir]), setup the uri mapping.
- void _processEmbedderYaml(Folder libDir, String embedderYaml) {
- YamlNode yaml;
- try {
- yaml = loadYaml(embedderYaml);
- } catch (_) {
- return;
- }
- if (yaml is! YamlMap) {
- return;
- }
- embedderYamls[libDir] = yaml;
- }
-
- /// Given a package [name] and a list of folders ([libDirs]),
- /// add any found `_embedder.yaml` files.
- void _processPackage(String name, List<Folder> libDirs) {
- for (Folder libDir in libDirs) {
- String embedderYaml = _readEmbedderYaml(libDir);
- if (embedderYaml != null) {
- _processEmbedderYaml(libDir, embedderYaml);
- }
- }
- }
-
- void _processPackageMap(Map<String, List<Folder>> packageMap) {
- packageMap.forEach(_processPackage);
- }
-
- /// Read the contents of [libDir]/[EMBEDDER_FILE_NAME] as a string.
- /// Returns null if the file doesn't exist.
- String _readEmbedderYaml(Folder libDir) {
- File file = libDir.getChild(EMBEDDER_FILE_NAME);
- try {
- return file.readAsStringSync();
- } on FileSystemException {
- // File can't be read.
- return null;
- }
- }
-}
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 377e9b1..729fa65 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -12,9 +12,9 @@
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
import 'package:analyzer/source/analysis_options_provider.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/source/package_map_resolver.dart';
import 'package:analyzer/source/sdk_ext.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/java_io.dart';
import 'package:analyzer/src/generated/sdk.dart';
@@ -210,6 +210,7 @@
Folder folder() {
return _folder ??= resourceProvider.getResource('.');
}
+
UriResolver fileResolver = fileResolverProvider == null
? new ResourceUriResolver(resourceProvider)
: fileResolverProvider(folder());
@@ -264,7 +265,8 @@
List<String> extFilePaths = extResolver.extensionFilePaths;
EmbedderYamlLocator locator = new EmbedderYamlLocator(packageMap);
Map<Folder, YamlMap> embedderYamls = locator.embedderYamls;
- EmbedderSdk embedderSdk = new EmbedderSdk(embedderYamls);
+ EmbedderSdk embedderSdk =
+ new EmbedderSdk(resourceProvider, embedderYamls);
if (embedderSdk.sdkLibraries.length > 0) {
//
// There is an embedder file that defines the content of the SDK and
@@ -357,3 +359,98 @@
return null;
}
}
+
+/**
+ * Given a package map, check in each package's lib directory for the existence
+ * of an `_embedder.yaml` file. If the file contains a top level YamlMap, it
+ * will be added to the [embedderYamls] map.
+ */
+class EmbedderYamlLocator {
+ /**
+ * The name of the embedder files being searched for.
+ */
+ static const String EMBEDDER_FILE_NAME = '_embedder.yaml';
+
+ /**
+ * A mapping from a package's library directory to the parsed YamlMap.
+ */
+ final Map<Folder, YamlMap> embedderYamls = new HashMap<Folder, YamlMap>();
+
+ /**
+ * Initialize a newly created locator by processing the packages in the given
+ * [packageMap].
+ */
+ EmbedderYamlLocator(Map<String, List<Folder>> packageMap) {
+ if (packageMap != null) {
+ _processPackageMap(packageMap);
+ }
+ }
+
+ /**
+ * Programatically add an `_embedder.yaml` mapping.
+ */
+ void addEmbedderYaml(Folder libDir, String embedderYaml) {
+ _processEmbedderYaml(libDir, embedderYaml);
+ }
+
+ /**
+ * Refresh the map of located files to those found by processing the given
+ * [packageMap].
+ */
+ void refresh(Map<String, List<Folder>> packageMap) {
+ // Clear existing.
+ embedderYamls.clear();
+ if (packageMap != null) {
+ _processPackageMap(packageMap);
+ }
+ }
+
+ /**
+ * Given the yaml for an embedder ([embedderYaml]) and a folder ([libDir]),
+ * setup the uri mapping.
+ */
+ void _processEmbedderYaml(Folder libDir, String embedderYaml) {
+ try {
+ YamlNode yaml = loadYaml(embedderYaml);
+ if (yaml is YamlMap) {
+ embedderYamls[libDir] = yaml;
+ }
+ } catch (_) {
+ // Ignored
+ }
+ }
+
+ /**
+ * Given a package [name] and a list of folders ([libDirs]), process any
+ * `_embedder.yaml` files that are found in any of the folders.
+ */
+ void _processPackage(String name, List<Folder> libDirs) {
+ for (Folder libDir in libDirs) {
+ String embedderYaml = _readEmbedderYaml(libDir);
+ if (embedderYaml != null) {
+ _processEmbedderYaml(libDir, embedderYaml);
+ }
+ }
+ }
+
+ /**
+ * Process each of the entries in the [packageMap].
+ */
+ void _processPackageMap(Map<String, List<Folder>> packageMap) {
+ packageMap.forEach(_processPackage);
+ }
+
+ /**
+ * Read and return the contents of [libDir]/[EMBEDDER_FILE_NAME], or `null` if
+ * the file doesn't exist.
+ */
+ String _readEmbedderYaml(Folder libDir) {
+ File file = libDir.getChild(EMBEDDER_FILE_NAME);
+ try {
+ return file.readAsStringSync();
+ } on FileSystemException {
+ // File can't be read.
+ return null;
+ }
+ }
+}
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index fe33e3a..24bf8d5 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -13,8 +13,8 @@
import 'package:analyzer/instrumentation/instrumentation.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
import 'package:analyzer/plugin/task.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/src/cancelable_future.dart';
+import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
import 'package:analyzer/src/context/cache.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/dart/element/type.dart';
@@ -1251,6 +1251,7 @@
setValue(ResultDescriptor result, value) {
entry.setValue(result, value, TargetedResult.EMPTY_LIST);
}
+
setValue(BUILD_DIRECTIVES_ERRORS, AnalysisError.NO_ERRORS);
setValue(BUILD_LIBRARY_ERRORS, AnalysisError.NO_ERRORS);
// CLASS_ELEMENTS
@@ -1767,6 +1768,7 @@
}
return false;
}
+
return _refHtml(librarySource);
}
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index ddb414e..6f1ec8d 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -5872,17 +5872,6 @@
* cached library cycles in the element model which may have been invalidated.
*/
void invalidateLibraryCycles() {
- if (_libraryCycle == null) {
- // We have already invalidated this node, or we have never computed
- // library cycle information for it. In the former case, we're done. In
- // the latter case, this node cannot be reachable from any node for which
- // we have computed library cycle information. Therefore, any edges added
- // or deleted in the update causing this invalidation can only be edges to
- // nodes which either have no library cycle information (and hence do not
- // need invalidation), or which do not reach this node by any path.
- // In either case, no further invalidation is needed.
- return;
- }
// If we have pre-computed library cycle information, then we must
// invalidate the information both on this element, and on certain
// other elements. Edges originating at this node may have been
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index df19008..2c59228 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -1957,11 +1957,19 @@
sj.add(j);
// compute intersection, reference as set 's'
List<InterfaceType> s = _intersection(si, sj);
+ return computeTypeAtMaxUniqueDepth(s);
+ }
+
+ /**
+ * Return the type from the [types] list that has the longest inheritence path
+ * to Object of unique length.
+ */
+ static InterfaceType computeTypeAtMaxUniqueDepth(List<InterfaceType> types) {
// for each element in Set s, compute the largest inheritance path to Object
- List<int> depths = new List<int>.filled(s.length, 0);
+ List<int> depths = new List<int>.filled(types.length, 0);
int maxDepth = 0;
- for (int n = 0; n < s.length; n++) {
- depths[n] = computeLongestInheritancePathToObject(s[n]);
+ for (int n = 0; n < types.length; n++) {
+ depths[n] = computeLongestInheritancePathToObject(types[n]);
if (depths[n] > maxDepth) {
maxDepth = depths[n];
}
@@ -1978,7 +1986,7 @@
}
}
if (numberOfTypesAtMaxDepth == 1) {
- return s[indexOfLeastUpperBound];
+ return types[indexOfLeastUpperBound];
}
}
// Should be impossible--there should always be exactly one type with the
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index 338a560..27e5549 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -119,6 +119,20 @@
_useSummary = use;
}
+ /**
+ * Add the extensions from one or more sdk extension files to this sdk. The
+ * [extensions] should be a table mapping the names of extensions to the paths
+ * where those extensions can be found.
+ */
+ void addExtensions(Map<String, String> extensions) {
+ extensions.forEach((String uri, String path) {
+ String shortName = uri.substring(uri.indexOf(':') + 1);
+ SdkLibraryImpl library = new SdkLibraryImpl(shortName);
+ library.path = path;
+ libraryMap.setLibrary(uri, library);
+ });
+ }
+
@override
Source fromFileUri(Uri uri) {
File file =
@@ -284,8 +298,7 @@
srcPath = library.path;
} else {
String libraryPath = library.path;
- int index =
- libraryPath.lastIndexOf(resourceProvider.pathContext.separator);
+ int index = libraryPath.lastIndexOf(separator);
if (index == -1) {
index = libraryPath.lastIndexOf('/');
if (index == -1) {
@@ -295,8 +308,7 @@
String prefix = libraryPath.substring(0, index + 1);
srcPath = '$prefix$relativePath';
}
- String filePath =
- srcPath.replaceAll('/', resourceProvider.pathContext.separator);
+ String filePath = srcPath.replaceAll('/', separator);
try {
File file = resourceProvider.getFile(filePath);
return file.createSource(parseUriWithException(dartUri));
@@ -522,8 +534,7 @@
String getRelativePathFromFile(File file) {
String filePath = file.path;
String libPath = libraryDirectory.path;
- if (!filePath
- .startsWith("$libPath${resourceProvider.pathContext.separator}")) {
+ if (!filePath.startsWith("$libPath$separator")) {
return null;
}
return filePath.substring(libPath.length + 1);
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 967095a..b229169 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -12,8 +12,8 @@
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/instrumentation/instrumentation.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/src/cancelable_future.dart';
+import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
import 'package:analyzer/src/context/cache.dart';
import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/generated/constant.dart';
@@ -1456,6 +1456,7 @@
buffer.write(optionName);
needsSeparator = true;
}
+
if (encoding & ENABLE_ASSERT_FLAG > 0) {
add('assert');
}
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 728435f..db9ad7ec 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -2743,6 +2743,7 @@
StaticTypeWarningCode.NON_BOOL_EXPRESSION,
StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION,
StaticTypeWarningCode.NON_BOOL_OPERAND,
+ StaticTypeWarningCode.NON_NULLABLE_FIELD_NOT_INITIALIZED,
StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT,
StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
@@ -4281,6 +4282,14 @@
"The operands of the '{0}' operator must be assignable to 'bool'");
/**
+ *
+ */
+ static const StaticTypeWarningCode NON_NULLABLE_FIELD_NOT_INITIALIZED =
+ const StaticTypeWarningCode(
+ 'NON_NULLABLE_FIELD_NOT_INITIALIZED',
+ "Variable '{0}' of non-nullable type '{1}' must be initialized");
+
+ /**
* 15.8 Parameterized Types: It is a static type warning if <i>A<sub>i</sub>,
* 1 <= i <= n</i> does not denote a type in the enclosing lexical scope.
*/
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index 1194f5f..274b7a1 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -569,41 +569,52 @@
int endOffsetOld = math.max(firstOffsetOld, lastOffsetOld);
int beginOffsetNew = math.min(firstOffsetNew, lastOffsetNew);
int endOffsetNew = math.max(firstOffsetNew, lastOffsetNew);
- // check for a whitespace only change
- if (identical(lastPair.oldToken, firstPair.oldToken) &&
- identical(lastPair.newToken, firstPair.newToken)) {
+ // A pure whitespace change.
+ if (identical(firstPair.oldToken, lastPair.oldToken) &&
+ identical(firstPair.newToken, lastPair.newToken) &&
+ firstPair.kind == _TokenDifferenceKind.OFFSET) {
_updateOffset = beginOffsetOld - 1;
_updateEndOld = endOffsetOld;
_updateEndNew = endOffsetNew;
_updateDelta = newUnit.length - _oldUnit.length;
- // A Dart documentation comment change.
- if (firstPair.kind == _TokenDifferenceKind.COMMENT_DOC) {
- bool success = _resolveCommentDoc(newUnit, firstPair);
+ logger.log('Whitespace change.');
+ _shiftTokens(firstPair.oldToken, true);
+ IncrementalResolver incrementalResolver = new IncrementalResolver(
+ _cache,
+ _sourceEntry,
+ _unitEntry,
+ _unitElement,
+ _updateOffset,
+ _updateEndOld,
+ _updateEndNew);
+ incrementalResolver._updateCache();
+ incrementalResolver._updateElementNameOffsets();
+ incrementalResolver._shiftEntryErrors();
+ _updateEntry();
+ logger.log('Success.');
+ return true;
+ }
+ // A Dart documentation comment change.
+ {
+ Token firstOldToken = firstPair.oldToken;
+ Token firstNewToken = firstPair.newToken;
+ Token lastOldToken = lastPair.oldToken;
+ Token lastNewToken = lastPair.newToken;
+ if (firstOldToken is DocumentationCommentToken &&
+ firstNewToken is DocumentationCommentToken &&
+ lastOldToken is DocumentationCommentToken &&
+ lastNewToken is DocumentationCommentToken &&
+ identical(firstOldToken.parent, lastOldToken.parent) &&
+ identical(firstNewToken.parent, lastNewToken.parent)) {
+ _updateOffset = beginOffsetOld;
+ _updateEndOld = firstOldToken.parent.offset;
+ _updateEndNew = firstNewToken.parent.offset;
+ _updateDelta = newUnit.length - _oldUnit.length;
+ bool success =
+ _resolveCommentDoc(newUnit, firstOldToken, firstNewToken);
logger.log('Documentation comment resolved: $success');
return success;
}
- // A pure whitespace change.
- if (firstPair.kind == _TokenDifferenceKind.OFFSET) {
- logger.log('Whitespace change.');
- _shiftTokens(firstPair.oldToken);
- {
- IncrementalResolver incrementalResolver = new IncrementalResolver(
- _cache,
- _sourceEntry,
- _unitEntry,
- _unitElement,
- _updateOffset,
- _updateEndOld,
- _updateEndNew);
- incrementalResolver._updateCache();
- incrementalResolver._updateElementNameOffsets();
- incrementalResolver._shiftEntryErrors();
- }
- _updateEntry();
- logger.log('Success.');
- return true;
- }
- // fall-through, end-of-line comment
}
// Find nodes covering the "old" and "new" token ranges.
AstNode oldNode =
@@ -677,14 +688,6 @@
logger.log('Failure: no enclosing function body or executable.');
return false;
}
- // fail if a comment change outside the bodies
- if (firstPair.kind == _TokenDifferenceKind.COMMENT) {
- if (beginOffsetOld <= oldNode.offset ||
- beginOffsetNew <= newNode.offset) {
- logger.log('Failure: comment outside a function body.');
- return false;
- }
- }
}
logger.log(() => 'oldNode: $oldNode');
logger.log(() => 'newNode: $newNode');
@@ -756,16 +759,13 @@
* Attempts to resolve a documentation comment change.
* Returns `true` if success.
*/
- bool _resolveCommentDoc(CompilationUnit newUnit, _TokenPair firstPair) {
- Token oldToken = firstPair.oldToken;
- Token newToken = firstPair.newToken;
- CommentToken oldComments = oldToken.precedingComments;
- CommentToken newComments = newToken.precedingComments;
- if (oldComments == null || newComments == null) {
+ bool _resolveCommentDoc(
+ CompilationUnit newUnit, CommentToken oldToken, CommentToken newToken) {
+ if (oldToken == null || newToken == null) {
return false;
}
// find nodes
- int offset = oldComments.offset;
+ int offset = oldToken.offset;
logger.log('offset: $offset');
AstNode oldNode = _findNodeCovering(_oldUnit, offset, offset);
AstNode newNode = _findNodeCovering(newUnit, offset, offset);
@@ -776,10 +776,9 @@
Comment newComment = newNode;
logger.log('oldComment.beginToken: ${oldComment.beginToken}');
logger.log('newComment.beginToken: ${newComment.beginToken}');
- _updateOffset = oldToken.offset - 1;
// update token references
- _shiftTokens(firstPair.oldToken);
- _setPrecedingComments(oldToken, newComment.tokens.first);
+ _shiftTokens(oldToken.parent);
+ _setPrecedingComments(oldToken.parent, newComment.tokens.first);
// replace node
NodeReplacer.replace(oldComment, newComment);
// update elements
@@ -848,8 +847,11 @@
}
}
- void _shiftTokens(Token token) {
+ void _shiftTokens(Token token, [bool goUpComment = false]) {
while (token != null) {
+ if (goUpComment && token is CommentToken) {
+ token = (token as CommentToken).parent;
+ }
if (token.offset > _updateOffset) {
token.offset += _updateDelta;
}
@@ -893,29 +895,21 @@
}
static _TokenDifferenceKind _compareToken(
- Token oldToken, Token newToken, int delta, bool forComment) {
- while (true) {
- if (oldToken == null && newToken == null) {
- return null;
- }
- if (oldToken == null || newToken == null) {
- return _TokenDifferenceKind.CONTENT;
- }
- if (oldToken.type != newToken.type) {
- return _TokenDifferenceKind.CONTENT;
- }
- if (oldToken.lexeme != newToken.lexeme) {
- return _TokenDifferenceKind.CONTENT;
- }
- if (newToken.offset - oldToken.offset != delta) {
- return _TokenDifferenceKind.OFFSET;
- }
- // continue if comment tokens are being checked
- if (!forComment) {
- break;
- }
- oldToken = oldToken.next;
- newToken = newToken.next;
+ Token oldToken, Token newToken, int delta) {
+ if (oldToken == null && newToken == null) {
+ return null;
+ }
+ if (oldToken == null || newToken == null) {
+ return _TokenDifferenceKind.CONTENT;
+ }
+ if (oldToken.type != newToken.type) {
+ return _TokenDifferenceKind.CONTENT;
+ }
+ if (oldToken.lexeme != newToken.lexeme) {
+ return _TokenDifferenceKind.CONTENT;
+ }
+ if (newToken.offset - oldToken.offset != delta) {
+ return _TokenDifferenceKind.OFFSET;
}
return null;
}
@@ -929,18 +923,22 @@
{
Token oldComment = oldToken.precedingComments;
Token newComment = newToken.precedingComments;
- if (_compareToken(oldComment, newComment, 0, true) != null) {
- _TokenDifferenceKind diffKind = _TokenDifferenceKind.COMMENT;
- if (oldComment is DocumentationCommentToken &&
- newComment is DocumentationCommentToken) {
- diffKind = _TokenDifferenceKind.COMMENT_DOC;
+ while (true) {
+ _TokenDifferenceKind diffKind =
+ _compareToken(oldComment, newComment, 0);
+ if (diffKind != null) {
+ return new _TokenPair(
+ diffKind, oldComment ?? oldToken, newComment ?? newToken);
}
- return new _TokenPair(diffKind, oldToken, newToken);
+ if (oldComment == null && newComment == null) {
+ break;
+ }
+ oldComment = oldComment.next;
+ newComment = newComment.next;
}
}
// compare tokens
- _TokenDifferenceKind diffKind =
- _compareToken(oldToken, newToken, 0, false);
+ _TokenDifferenceKind diffKind = _compareToken(oldToken, newToken, 0);
if (diffKind != null) {
return new _TokenPair(diffKind, oldToken, newToken);
}
@@ -954,24 +952,40 @@
static _TokenPair _findLastDifferentToken(Token oldToken, Token newToken) {
int delta = newToken.offset - oldToken.offset;
+ Token prevOldToken;
+ Token prevNewToken;
while (oldToken.previous != oldToken && newToken.previous != newToken) {
// compare tokens
- _TokenDifferenceKind diffKind =
- _compareToken(oldToken, newToken, delta, false);
+ _TokenDifferenceKind diffKind = _compareToken(oldToken, newToken, delta);
if (diffKind != null) {
- return new _TokenPair(diffKind, oldToken.next, newToken.next);
+ return new _TokenPair(diffKind, prevOldToken, prevNewToken);
}
+ prevOldToken = oldToken;
+ prevNewToken = newToken;
// compare comments
{
Token oldComment = oldToken.precedingComments;
Token newComment = newToken.precedingComments;
- if (_compareToken(oldComment, newComment, delta, true) != null) {
- _TokenDifferenceKind diffKind = _TokenDifferenceKind.COMMENT;
- if (oldComment is DocumentationCommentToken &&
- newComment is DocumentationCommentToken) {
- diffKind = _TokenDifferenceKind.COMMENT_DOC;
+ while (oldComment?.next != null) {
+ oldComment = oldComment.next;
+ }
+ while (newComment?.next != null) {
+ newComment = newComment.next;
+ }
+ while (true) {
+ _TokenDifferenceKind diffKind =
+ _compareToken(oldComment, newComment, delta);
+ if (diffKind != null) {
+ return new _TokenPair(
+ diffKind, oldComment ?? oldToken, newComment ?? newToken);
}
- return new _TokenPair(diffKind, oldToken, newToken);
+ if (oldComment == null && newComment == null) {
+ break;
+ }
+ prevOldToken = oldComment;
+ prevNewToken = newComment;
+ oldComment = oldComment.previous;
+ newComment = newComment.previous;
}
}
// next tokens
@@ -1290,8 +1304,6 @@
* Describes how two [Token]s are different.
*/
class _TokenDifferenceKind {
- static const COMMENT = const _TokenDifferenceKind('COMMENT');
- static const COMMENT_DOC = const _TokenDifferenceKind('COMMENT_DOC');
static const CONTENT = const _TokenDifferenceKind('CONTENT');
static const OFFSET = const _TokenDifferenceKind('OFFSET');
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index afa7cce..4a70c66 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -4915,6 +4915,8 @@
* inference.
*/
static void setType(AstNode node, DartType type) {
+ // TODO(jmesserly): this sets the type even when it's dynamic.
+ // Can we skip that?
node?.setProperty(_typeProperty, type);
}
@@ -6062,9 +6064,18 @@
// of the binary operator for other cases.
if (operatorType == TokenType.QUESTION_QUESTION) {
InferenceContext.setTypeFromNode(leftOperand, node);
- InferenceContext.setTypeFromNode(rightOperand, node);
}
leftOperand?.accept(this);
+ if (operatorType == TokenType.QUESTION_QUESTION) {
+ // Set the right side, either from the context, or using the information
+ // from the left side if it is more precise.
+ DartType contextType = InferenceContext.getType(node);
+ DartType leftType = leftOperand?.staticType;
+ if (contextType == null || contextType.isDynamic) {
+ contextType = leftType;
+ }
+ InferenceContext.setType(rightOperand, contextType);
+ }
rightOperand?.accept(this);
}
node.accept(elementResolver);
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index f681471..fa82560 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -441,6 +441,10 @@
if (node.parent is FunctionDeclarationStatement) {
// TypeResolverVisitor sets the return type for top-level functions, so
// we only need to handle local functions.
+ if (_strongMode && node.returnType == null) {
+ _inferLocalFunctionReturnType(node.functionExpression);
+ return null;
+ }
functionElement.returnType =
_computeStaticReturnTypeOfFunctionDeclaration(node);
_recordPropagatedTypeOfFunction(functionElement, function.body);
@@ -486,6 +490,15 @@
// node.
return null;
}
+ _inferLocalFunctionReturnType(node);
+ return null;
+ }
+
+ /**
+ * Infers the return type of a local function, either a lambda or
+ * (in strong mode) a local function declaration.
+ */
+ void _inferLocalFunctionReturnType(FunctionExpression node) {
bool recordInference = false;
ExecutableElementImpl functionElement =
node.element as ExecutableElementImpl;
@@ -517,7 +530,6 @@
if (recordInference) {
_resolver.inferenceContext.recordInference(node, functionElement.type);
}
- return null;
}
/**
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index 9154132..78d246f 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -45,7 +45,38 @@
}
@override
- bool canPromoteToType(DartType to, DartType from) => isSubtypeOf(to, from);
+ bool canPromoteToType(DartType to, DartType from) {
+ // Allow promoting to a subtype, for example:
+ //
+ // f(Base b) {
+ // if (b is SubTypeOfBase) {
+ // // promote `b` to SubTypeOfBase for this block
+ // }
+ // }
+ //
+ // This allows the variable to be used wherever the supertype (here `Base`)
+ // is expected, while gaining a more precise type.
+ if (isSubtypeOf(to, from)) {
+ return true;
+ }
+ // For a type parameter `T extends U`, allow promoting from the upper bound
+ // `U` to `S` where `S <: U`.
+ //
+ // This does restrict the variable, because `S </: T`, it can no longer be
+ // used as a `T` without another cast.
+ //
+ // However the members you could access from a variable of type `T`, were
+ // already those on the upper bound `U`. So all members on `U` will be
+ // accessible, as well as those on `S`. Pragmatically this feels like a
+ // useful enough trade-off to allow promotion.
+ //
+ // (In general we would need union types to support this feature precisely.)
+ if (from is TypeParameterType) {
+ return isSubtypeOf(to, from.resolveToBound(DynamicTypeImpl.instance));
+ }
+
+ return false;
+ }
@override
FunctionType functionTypeToConcreteType(
@@ -91,26 +122,24 @@
/// Computes the greatest lower bound of [type1] and [type2].
DartType getGreatestLowerBound(
- TypeProvider provider, DartType type1, DartType type2) {
+ TypeProvider provider, DartType type1, DartType type2,
+ {dynamicIsBottom: false}) {
// The greatest lower bound relation is reflexive.
if (identical(type1, type2)) {
return type1;
}
- // Treat dynamic as top. The GLB of dynamic and any type is just that type
- // since dynamic permits all values.
- if (type1.isDynamic) {
+ // The GLB of top and any type is just that type.
+ // Also GLB of bottom and any type is bottom.
+ if (_isTop(type1, dynamicIsBottom: dynamicIsBottom) ||
+ _isBottom(type2, dynamicIsBottom: dynamicIsBottom)) {
return type2;
}
- if (type2.isDynamic) {
+ if (_isTop(type2, dynamicIsBottom: dynamicIsBottom) ||
+ _isBottom(type1, dynamicIsBottom: dynamicIsBottom)) {
return type1;
}
- // You can't get any lower than bottom.
- if (type1.isBottom || type2.isBottom) {
- return provider.bottomType;
- }
-
// Treat void as top-like for GLB. This only comes into play with the
// return types of two functions whose GLB is being taken. We allow a
// non-void-returning function to subtype a void-returning one, so match
@@ -142,6 +171,41 @@
}
/**
+ * Compute the least upper bound of two types.
+ */
+ @override
+ DartType getLeastUpperBound(
+ TypeProvider typeProvider, DartType type1, DartType type2,
+ {bool dynamicIsBottom: false}) {
+ if (isNullableType(type1) && isNonNullableType(type2)) {
+ assert(type2 is InterfaceType);
+ type2 = getLeastNullableSupertype(type2 as InterfaceType);
+ }
+ if (isNullableType(type2) && isNonNullableType(type1)) {
+ assert(type1 is InterfaceType);
+ type1 = getLeastNullableSupertype(type1 as InterfaceType);
+ }
+ return super.getLeastUpperBound(typeProvider, type1, type2,
+ dynamicIsBottom: dynamicIsBottom);
+ }
+
+ /**
+ * Compute the least supertype of [type], which is known to be an interface
+ * type.
+ *
+ * In the event that the algorithm fails (which might occur due to a bug in
+ * the analyzer), `null` is returned.
+ */
+ DartType getLeastNullableSupertype(InterfaceType type) {
+ // compute set of supertypes
+ List<InterfaceType> s = InterfaceTypeImpl
+ .computeSuperinterfaceSet(type)
+ .where(isNullableType)
+ .toList();
+ return InterfaceTypeImpl.computeTypeAtMaxUniqueDepth(s);
+ }
+
+ /**
* Given a generic function type `F<T0, T1, ... Tn>` and a context type C,
* infer an instantiation of F, such that `F<S0, S1, ..., Sn>` <: C.
*
@@ -443,7 +507,8 @@
DartType paramType;
if (fType != null && gType != null) {
// If both functions have this parameter, include both of their types.
- paramType = getLeastUpperBound(provider, fType, gType);
+ paramType =
+ getLeastUpperBound(provider, fType, gType, dynamicIsBottom: true);
} else {
paramType = fType ?? gType;
}
@@ -527,7 +592,7 @@
@override
DartType _functionParameterBound(
TypeProvider provider, DartType f, DartType g) =>
- getGreatestLowerBound(provider, f, g);
+ getGreatestLowerBound(provider, f, g, dynamicIsBottom: true);
/**
* Guard against loops in the class hierarchy
@@ -606,10 +671,6 @@
provider.dynamicType;
}
- bool _isBottom(DartType t, {bool dynamicIsBottom: false}) {
- return (t.isDynamic && dynamicIsBottom) || t.isBottom;
- }
-
/**
* Check that [f1] is a subtype of [f2].
*
@@ -758,19 +819,22 @@
return _isFunctionSubtypeOf(t1 as FunctionType, t2 as FunctionType);
}
- bool _isTop(DartType t, {bool dynamicIsBottom: false}) {
- // TODO(leafp): Document the rules in play here
- return (t.isDynamic && !dynamicIsBottom) || t.isObject;
+ /// Check if [type] is in a set of preselected non-nullable types.
+ /// [FunctionType]s are always nullable.
+ bool isNonNullableType(DartType type) {
+ return !isNullableType(type);
}
- bool isNonNullableType(DartType type) {
- return nonnullableTypes.contains(_getTypeFullyQualifiedName(type));
+ /// Opposite of [isNonNullableType].
+ bool isNullableType(DartType type) {
+ return type is FunctionType ||
+ !nonnullableTypes.contains(_getTypeFullyQualifiedName(type));
}
/// Given a type return its name prepended with the URI to its containing
/// library and separated by a comma.
String _getTypeFullyQualifiedName(DartType type) {
- return "${type?.element?.library?.source?.uri},$type";
+ return "${type?.element?.library?.identifier},$type";
}
/**
@@ -873,16 +937,20 @@
* Compute the least upper bound of two types.
*/
DartType getLeastUpperBound(
- TypeProvider typeProvider, DartType type1, DartType type2) {
+ TypeProvider typeProvider, DartType type1, DartType type2,
+ {bool dynamicIsBottom: false}) {
// The least upper bound relation is reflexive.
if (identical(type1, type2)) {
return type1;
}
- // The least upper bound of dynamic and any type T is dynamic.
- if (type1.isDynamic) {
+ // The least upper bound of top and any type T is top.
+ // The least upper bound of bottom and any type T is T.
+ if (_isTop(type1, dynamicIsBottom: dynamicIsBottom) ||
+ _isBottom(type2, dynamicIsBottom: dynamicIsBottom)) {
return type1;
}
- if (type2.isDynamic) {
+ if (_isTop(type2, dynamicIsBottom: dynamicIsBottom) ||
+ _isBottom(type1, dynamicIsBottom: dynamicIsBottom)) {
return type2;
}
// The least upper bound of void and any type T != dynamic is void.
@@ -892,13 +960,6 @@
if (type2.isVoid) {
return type2;
}
- // The least upper bound of bottom and any type T is T.
- if (type1.isBottom) {
- return type2;
- }
- if (type2.isBottom) {
- return type1;
- }
if (type1 is TypeParameterType || type2 is TypeParameterType) {
return _typeParameterLeastUpperBound(typeProvider, type1, type2);
@@ -1516,3 +1577,12 @@
}
}
}
+
+bool _isBottom(DartType t, {bool dynamicIsBottom: false}) {
+ return (t.isDynamic && dynamicIsBottom) || t.isBottom;
+}
+
+bool _isTop(DartType t, {bool dynamicIsBottom: false}) {
+ // TODO(leafp): Document the rules in play here
+ return (t.isDynamic && !dynamicIsBottom) || t.isObject;
+}
diff --git a/pkg/analyzer/lib/src/summary/api_signature.dart b/pkg/analyzer/lib/src/summary/api_signature.dart
new file mode 100644
index 0000000..f2fd506
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary/api_signature.dart
@@ -0,0 +1,138 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.src.summary.api_signature;
+
+import 'dart:convert';
+import 'dart:typed_data';
+
+import 'package:convert/convert.dart';
+import 'package:crypto/crypto.dart';
+
+/**
+ * An instance of [ApiSignature] collects data in the form of primitive types
+ * (strings, ints, bools, etc.) from a summary "builder" object, and uses them
+ * to generate an MD5 signature of a the non-informative parts of the summary
+ * (i.e. those parts representing the API of the code being summarized).
+ *
+ * Note that the data passed to the MD5 signature algorithm is untyped. So, for
+ * instance, an API signature built from a sequence of `false` booleans is
+ * likely to match an API signature built from a sequence of zeros. The caller
+ * should take this into account; e.g. if a data structure may be represented
+ * either by a boolean or an int, the caller should encode a tag distinguishing
+ * the two representations before encoding the data.
+ */
+class ApiSignature {
+ /**
+ * Version number of the code in this class. Any time this class is changed
+ * in a way that affects the data collected in [_data], this version number
+ * should be incremented, so that a summary signed by a newer version of the
+ * signature algorithm won't accidentally have the same signature as a summary
+ * signed by an older version.
+ */
+ static const int _VERSION = 0;
+
+ /**
+ * Data accumulated so far.
+ */
+ ByteData _data = new ByteData(4096);
+
+ /**
+ * Offset into [_data] where the next byte should be written.
+ */
+ int _offset = 0;
+
+ /**
+ * Create an [ApiSignature] which is ready to accept data.
+ */
+ ApiSignature() {
+ addInt(_VERSION);
+ }
+
+ /**
+ * For testing only: create an [ApiSignature] which doesn't include any
+ * version information. This makes it easier to unit tests, since the data
+ * is stable even if [_VERSION] is changed.
+ */
+ ApiSignature.unversioned();
+
+ /**
+ * Collect a boolean value.
+ */
+ void addBool(bool b) {
+ _makeRoom(1);
+ _data.setUint8(_offset, b ? 1 : 0);
+ _offset++;
+ }
+
+ /**
+ * Collect a sequence of arbitrary bytes. Note that the length is not
+ * collected, so for example `addBytes([1, 2]);` will have the same effect as
+ * `addBytes([1]); addBytes([2]);`.
+ */
+ void addBytes(List<int> bytes) {
+ _makeRoom(bytes.length);
+ new Uint8List.view(_data.buffer)
+ .setRange(_offset, _offset + bytes.length, bytes);
+ _offset += bytes.length;
+ }
+
+ /**
+ * Collect a double-precision floating point value.
+ */
+ void addDouble(double d) {
+ _makeRoom(8);
+ _data.setFloat64(_offset, d, Endianness.LITTLE_ENDIAN);
+ _offset += 8;
+ }
+
+ /**
+ * Collect a 32-bit unsigned integer value.
+ */
+ void addInt(int i) {
+ _makeRoom(4);
+ _data.setUint32(_offset, i, Endianness.LITTLE_ENDIAN);
+ _offset += 4;
+ }
+
+ /**
+ * Collect a string.
+ */
+ void addString(String s) {
+ List<int> bytes = UTF8.encode(s);
+ addInt(bytes.length);
+ addBytes(bytes);
+ }
+
+ /**
+ * For testing only: retrieve the internal representation of the data that
+ * has been collected.
+ */
+ List<int> getBytes_forDebug() {
+ return new Uint8List.view(_data.buffer, 0, _offset).toList();
+ }
+
+ /**
+ * Return a hex-encoded MD5 signature of the data collected so far.
+ */
+ String toHex() {
+ return hex.encode(
+ md5.convert(new Uint8List.view(_data.buffer, 0, _offset)).bytes);
+ }
+
+ /**
+ * Ensure that [spaceNeeded] bytes can be added to [_data] at [_offset]
+ * (copying it to a larger object if necessary).
+ */
+ void _makeRoom(int spaceNeeded) {
+ int oldLength = _data.lengthInBytes;
+ if (_offset + spaceNeeded > oldLength) {
+ int newLength = 2 * (_offset + spaceNeeded);
+ ByteData newData = new ByteData(newLength);
+ new Uint8List.view(newData.buffer)
+ .setRange(0, oldLength, new Uint8List.view(_data.buffer));
+ _data = newData;
+ }
+ }
+}
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index bbed56e..bc4d0ab 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -10,6 +10,7 @@
import 'flat_buffers.dart' as fb;
import 'idl.dart' as idl;
import 'dart:convert' as convert;
+import 'api_signature.dart' as api_sig;
class _CacheSourceKindReader extends fb.Reader<idl.CacheSourceKind> {
const _CacheSourceKindReader() : super();
@@ -216,6 +217,17 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._errorCodeUniqueName ?? '');
+ signature.addInt(this._offset ?? 0);
+ signature.addInt(this._length ?? 0);
+ signature.addString(this._message ?? '');
+ signature.addString(this._correction ?? '');
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_correction;
fb.Offset offset_errorCodeUniqueName;
@@ -385,6 +397,37 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addInt(this._kind == null ? 0 : this._kind.index);
+ if (this._importedUris == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._importedUris.length);
+ for (var x in this._importedUris) {
+ signature.addString(x);
+ }
+ }
+ if (this._exportedUris == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._exportedUris.length);
+ for (var x in this._exportedUris) {
+ signature.addString(x);
+ }
+ }
+ if (this._partUris == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._partUris.length);
+ for (var x in this._partUris) {
+ signature.addString(x);
+ }
+ }
+ }
+
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "CaSS");
@@ -514,6 +557,20 @@
_errors?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._errors == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._errors.length);
+ for (var x in this._errors) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "CSEL");
@@ -612,6 +669,14 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addInt(this._offset ?? 0);
+ signature.addInt(this._length ?? 0);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fbBuilder.startTable();
if (_length != null && _length != 0) {
@@ -820,6 +885,41 @@
_typeArguments?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addInt(this._reference ?? 0);
+ if (this._typeArguments == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._typeArguments.length);
+ for (var x in this._typeArguments) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addInt(this._slot ?? 0);
+ signature.addInt(this._paramReference ?? 0);
+ if (this._implicitFunctionTypeIndices == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._implicitFunctionTypeIndices.length);
+ for (var x in this._implicitFunctionTypeIndices) {
+ signature.addInt(x);
+ }
+ }
+ signature.addBool(this._syntheticReturnType != null);
+ this._syntheticReturnType?.collectApiSignature(signature);
+ if (this._syntheticParams == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._syntheticParams.length);
+ for (var x in this._syntheticParams) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_implicitFunctionTypeIndices;
fb.Offset offset_syntheticParams;
@@ -995,6 +1095,21 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._uri ?? '');
+ if (this._parts == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._parts.length);
+ for (var x in this._parts) {
+ signature.addString(x);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_parts;
fb.Offset offset_uri;
@@ -1128,6 +1243,16 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addInt(this._dependency ?? 0);
+ signature.addString(this._name ?? '');
+ signature.addInt(this._unit ?? 0);
+ signature.addInt(this._kind == null ? 0 : this._kind.index);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_name;
if (_name != null) {
@@ -1341,6 +1466,54 @@
_units?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._dependencies == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._dependencies.length);
+ for (var x in this._dependencies) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._importDependencies == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._importDependencies.length);
+ for (var x in this._importDependencies) {
+ signature.addInt(x);
+ }
+ }
+ signature.addInt(this._numPrelinkedDependencies ?? 0);
+ if (this._units == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._units.length);
+ for (var x in this._units) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._exportNames == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._exportNames.length);
+ for (var x in this._exportNames) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._fallbackMode == true);
+ if (this._exportDependencies == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._exportDependencies.length);
+ for (var x in this._exportDependencies) {
+ signature.addInt(x);
+ }
+ }
+ }
+
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "LLib");
@@ -1617,6 +1790,19 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addInt(this._unit ?? 0);
+ signature.addInt(this._dependency ?? 0);
+ signature.addInt(this._kind == null ? 0 : this._kind.index);
+ signature.addString(this._name ?? '');
+ signature.addInt(this._numTypeParameters ?? 0);
+ signature.addInt(this._containingReference ?? 0);
+ signature.addInt(this._localIndex ?? 0);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_name;
if (_name != null) {
@@ -1797,6 +1983,36 @@
_types?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._references == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._references.length);
+ for (var x in this._references) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._types == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._types.length);
+ for (var x in this._types) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._constCycles == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._constCycles.length);
+ for (var x in this._constCycles) {
+ signature.addInt(x);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_constCycles;
fb.Offset offset_references;
@@ -1882,6 +2098,7 @@
}
class PackageBundleBuilder extends Object with _PackageBundleMixin implements idl.PackageBundle {
+ String _apiSignature;
List<LinkedLibraryBuilder> _linkedLibraries;
List<String> _linkedLibraryUris;
int _majorVersion;
@@ -1891,6 +2108,18 @@
List<String> _unlinkedUnitUris;
@override
+ String get apiSignature => _apiSignature ??= '';
+
+ /**
+ * MD5 hash of the non-informative fields of the [PackageBundle] (not
+ * including this one). This can be used to identify when the API of a
+ * package may have changed.
+ */
+ void set apiSignature(String _value) {
+ _apiSignature = _value;
+ }
+
+ @override
List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <LinkedLibraryBuilder>[];
/**
@@ -1966,8 +2195,9 @@
_unlinkedUnitUris = _value;
}
- PackageBundleBuilder({List<LinkedLibraryBuilder> linkedLibraries, List<String> linkedLibraryUris, int majorVersion, int minorVersion, List<String> unlinkedUnitHashes, List<UnlinkedUnitBuilder> unlinkedUnits, List<String> unlinkedUnitUris})
- : _linkedLibraries = linkedLibraries,
+ PackageBundleBuilder({String apiSignature, List<LinkedLibraryBuilder> linkedLibraries, List<String> linkedLibraryUris, int majorVersion, int minorVersion, List<String> unlinkedUnitHashes, List<UnlinkedUnitBuilder> unlinkedUnits, List<String> unlinkedUnitUris})
+ : _apiSignature = apiSignature,
+ _linkedLibraries = linkedLibraries,
_linkedLibraryUris = linkedLibraryUris,
_majorVersion = majorVersion,
_minorVersion = minorVersion,
@@ -1984,17 +2214,62 @@
_unlinkedUnits?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._linkedLibraries == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._linkedLibraries.length);
+ for (var x in this._linkedLibraries) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._linkedLibraryUris == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._linkedLibraryUris.length);
+ for (var x in this._linkedLibraryUris) {
+ signature.addString(x);
+ }
+ }
+ if (this._unlinkedUnits == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._unlinkedUnits.length);
+ for (var x in this._unlinkedUnits) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._unlinkedUnitUris == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._unlinkedUnitUris.length);
+ for (var x in this._unlinkedUnitUris) {
+ signature.addString(x);
+ }
+ }
+ signature.addInt(this._majorVersion ?? 0);
+ signature.addInt(this._minorVersion ?? 0);
+ signature.addString(this._apiSignature ?? '');
+ }
+
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "PBdl");
}
fb.Offset finish(fb.Builder fbBuilder) {
+ fb.Offset offset_apiSignature;
fb.Offset offset_linkedLibraries;
fb.Offset offset_linkedLibraryUris;
fb.Offset offset_unlinkedUnitHashes;
fb.Offset offset_unlinkedUnits;
fb.Offset offset_unlinkedUnitUris;
+ if (_apiSignature != null) {
+ offset_apiSignature = fbBuilder.writeString(_apiSignature);
+ }
if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) {
offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b.finish(fbBuilder)).toList());
}
@@ -2011,6 +2286,9 @@
offset_unlinkedUnitUris = fbBuilder.writeList(_unlinkedUnitUris.map((b) => fbBuilder.writeString(b)).toList());
}
fbBuilder.startTable();
+ if (offset_apiSignature != null) {
+ fbBuilder.addOffset(7, offset_apiSignature);
+ }
if (offset_linkedLibraries != null) {
fbBuilder.addOffset(0, offset_linkedLibraries);
}
@@ -2054,6 +2332,7 @@
_PackageBundleImpl(this._bc, this._bcOffset);
+ String _apiSignature;
List<idl.LinkedLibrary> _linkedLibraries;
List<String> _linkedLibraryUris;
int _majorVersion;
@@ -2063,6 +2342,12 @@
List<String> _unlinkedUnitUris;
@override
+ String get apiSignature {
+ _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 7, '');
+ return _apiSignature;
+ }
+
+ @override
List<idl.LinkedLibrary> get linkedLibraries {
_linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLibraryReader()).vTableGet(_bc, _bcOffset, 0, const <idl.LinkedLibrary>[]);
return _linkedLibraries;
@@ -2109,6 +2394,7 @@
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
+ if (apiSignature != '') _result["apiSignature"] = apiSignature;
if (linkedLibraries.isNotEmpty) _result["linkedLibraries"] = linkedLibraries.map((_value) => _value.toJson()).toList();
if (linkedLibraryUris.isNotEmpty) _result["linkedLibraryUris"] = linkedLibraryUris;
if (majorVersion != 0) _result["majorVersion"] = majorVersion;
@@ -2121,6 +2407,7 @@
@override
Map<String, Object> toMap() => {
+ "apiSignature": apiSignature,
"linkedLibraries": linkedLibraries,
"linkedLibraryUris": linkedLibraryUris,
"majorVersion": majorVersion,
@@ -2279,6 +2566,84 @@
_units?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._elementUnits == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._elementUnits.length);
+ for (var x in this._elementUnits) {
+ signature.addInt(x);
+ }
+ }
+ if (this._elementNameUnitMemberIds == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._elementNameUnitMemberIds.length);
+ for (var x in this._elementNameUnitMemberIds) {
+ signature.addInt(x);
+ }
+ }
+ if (this._unitLibraryUris == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._unitLibraryUris.length);
+ for (var x in this._unitLibraryUris) {
+ signature.addInt(x);
+ }
+ }
+ if (this._unitUnitUris == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._unitUnitUris.length);
+ for (var x in this._unitUnitUris) {
+ signature.addInt(x);
+ }
+ }
+ if (this._units == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._units.length);
+ for (var x in this._units) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._elementKinds == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._elementKinds.length);
+ for (var x in this._elementKinds) {
+ signature.addInt(x.index);
+ }
+ }
+ if (this._strings == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._strings.length);
+ for (var x in this._strings) {
+ signature.addString(x);
+ }
+ }
+ if (this._elementNameClassMemberIds == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._elementNameClassMemberIds.length);
+ for (var x in this._elementNameClassMemberIds) {
+ signature.addInt(x);
+ }
+ }
+ if (this._elementNameParameterIds == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._elementNameParameterIds.length);
+ for (var x in this._elementNameParameterIds) {
+ signature.addInt(x);
+ }
+ }
+ }
+
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "Indx");
@@ -2656,6 +3021,109 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addInt(this._unit ?? 0);
+ if (this._usedElementLengths == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedElementLengths.length);
+ for (var x in this._usedElementLengths) {
+ signature.addInt(x);
+ }
+ }
+ if (this._usedElementOffsets == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedElementOffsets.length);
+ for (var x in this._usedElementOffsets) {
+ signature.addInt(x);
+ }
+ }
+ if (this._usedElements == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedElements.length);
+ for (var x in this._usedElements) {
+ signature.addInt(x);
+ }
+ }
+ if (this._usedElementKinds == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedElementKinds.length);
+ for (var x in this._usedElementKinds) {
+ signature.addInt(x.index);
+ }
+ }
+ if (this._definedNames == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._definedNames.length);
+ for (var x in this._definedNames) {
+ signature.addInt(x);
+ }
+ }
+ if (this._definedNameKinds == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._definedNameKinds.length);
+ for (var x in this._definedNameKinds) {
+ signature.addInt(x.index);
+ }
+ }
+ if (this._definedNameOffsets == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._definedNameOffsets.length);
+ for (var x in this._definedNameOffsets) {
+ signature.addInt(x);
+ }
+ }
+ if (this._usedNames == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedNames.length);
+ for (var x in this._usedNames) {
+ signature.addInt(x);
+ }
+ }
+ if (this._usedNameOffsets == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedNameOffsets.length);
+ for (var x in this._usedNameOffsets) {
+ signature.addInt(x);
+ }
+ }
+ if (this._usedNameKinds == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedNameKinds.length);
+ for (var x in this._usedNameKinds) {
+ signature.addInt(x.index);
+ }
+ }
+ if (this._usedElementIsQualifiedFlags == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedElementIsQualifiedFlags.length);
+ for (var x in this._usedElementIsQualifiedFlags) {
+ signature.addBool(x);
+ }
+ }
+ if (this._usedNameIsQualifiedFlags == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._usedNameIsQualifiedFlags.length);
+ for (var x in this._usedNameIsQualifiedFlags) {
+ signature.addBool(x);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_definedNameKinds;
fb.Offset offset_definedNameOffsets;
@@ -3089,6 +3557,66 @@
_typeParameters?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ if (this._executables == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._executables.length);
+ for (var x in this._executables) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._supertype != null);
+ this._supertype?.collectApiSignature(signature);
+ if (this._fields == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._fields.length);
+ for (var x in this._fields) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._interfaces == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._interfaces.length);
+ for (var x in this._interfaces) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._isAbstract == true);
+ if (this._typeParameters == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._typeParameters.length);
+ for (var x in this._typeParameters) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._mixins == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._mixins.length);
+ for (var x in this._mixins) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._isMixinApplication == true);
+ signature.addBool(this._hasNoSupertype == true);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
fb.Offset offset_codeRange;
@@ -3397,6 +3925,28 @@
_offset = null;
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._shows == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._shows.length);
+ for (var x in this._shows) {
+ signature.addString(x);
+ }
+ }
+ if (this._hides == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._hides.length);
+ for (var x in this._hides) {
+ signature.addString(x);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_hides;
fb.Offset offset_shows;
@@ -3593,6 +4143,61 @@
_references?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._operations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._operations.length);
+ for (var x in this._operations) {
+ signature.addInt(x.index);
+ }
+ }
+ if (this._ints == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._ints.length);
+ for (var x in this._ints) {
+ signature.addInt(x);
+ }
+ }
+ if (this._references == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._references.length);
+ for (var x in this._references) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._strings == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._strings.length);
+ for (var x in this._strings) {
+ signature.addString(x);
+ }
+ }
+ if (this._doubles == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._doubles.length);
+ for (var x in this._doubles) {
+ signature.addDouble(x);
+ }
+ }
+ signature.addBool(this._isValidConst == true);
+ if (this._assignmentOperators == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._assignmentOperators.length);
+ for (var x in this._assignmentOperators) {
+ signature.addInt(x.index);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_assignmentOperators;
fb.Offset offset_doubles;
@@ -3816,6 +4421,32 @@
_expression?.flushInformative();
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ signature.addBool(this._expression != null);
+ this._expression?.collectApiSignature(signature);
+ signature.addInt(this._kind == null ? 0 : this._kind.index);
+ if (this._arguments == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._arguments.length);
+ for (var x in this._arguments) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._argumentNames == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._argumentNames.length);
+ for (var x in this._argumentNames) {
+ signature.addString(x);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_argumentNames;
fb.Offset offset_arguments;
@@ -3980,6 +4611,15 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addInt(this._length ?? 0);
+ signature.addString(this._text ?? '');
+ signature.addInt(this._offset ?? 0);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_text;
if (_text != null) {
@@ -4145,6 +4785,29 @@
_values?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ if (this._values == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._values.length);
+ for (var x in this._values) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
fb.Offset offset_codeRange;
@@ -4323,6 +4986,13 @@
_nameOffset = null;
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_documentationComment;
fb.Offset offset_name;
@@ -4832,6 +5502,71 @@
_typeParameters?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ if (this._parameters == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._parameters.length);
+ for (var x in this._parameters) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._returnType != null);
+ this._returnType?.collectApiSignature(signature);
+ signature.addInt(this._kind == null ? 0 : this._kind.index);
+ signature.addInt(this._inferredReturnTypeSlot ?? 0);
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._isFactory == true);
+ signature.addBool(this._isStatic == true);
+ signature.addBool(this._isAbstract == true);
+ signature.addBool(this._isExternal == true);
+ signature.addBool(this._isConst == true);
+ signature.addBool(this._isRedirectedConstructor == true);
+ if (this._constantInitializers == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._constantInitializers.length);
+ for (var x in this._constantInitializers) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._redirectedConstructor != null);
+ this._redirectedConstructor?.collectApiSignature(signature);
+ if (this._typeParameters == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._typeParameters.length);
+ for (var x in this._typeParameters) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addString(this._redirectedConstructorName ?? '');
+ if (this._localFunctions == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._localFunctions.length);
+ for (var x in this._localFunctions) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addInt(this._visibleLength ?? 0);
+ signature.addInt(this._visibleOffset ?? 0);
+ signature.addInt(this._constCycleSlot ?? 0);
+ signature.addBool(this._bodyExpr != null);
+ this._bodyExpr?.collectApiSignature(signature);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
fb.Offset offset_bodyExpr;
@@ -5351,6 +6086,20 @@
_uriOffset = null;
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
if (!(_annotations == null || _annotations.isEmpty)) {
@@ -5474,6 +6223,21 @@
_combinators?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._uri ?? '');
+ if (this._combinators == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._combinators.length);
+ for (var x in this._combinators) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_combinators;
fb.Offset offset_uri;
@@ -5690,6 +6454,32 @@
_uriOffset = null;
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._uri ?? '');
+ if (this._combinators == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._combinators.length);
+ for (var x in this._combinators) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._isImplicit == true);
+ signature.addInt(this._prefixReference ?? 0);
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addBool(this._isDeferred == true);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
fb.Offset offset_combinators;
@@ -5919,6 +6709,15 @@
_nameOffset = null;
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ signature.addBool(this._isOnSwitchMember == true);
+ signature.addBool(this._isOnSwitchStatement == true);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_name;
if (_name != null) {
@@ -6209,6 +7008,39 @@
_type?.flushInformative();
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ signature.addInt(this._inferredTypeSlot ?? 0);
+ signature.addBool(this._type != null);
+ this._type?.collectApiSignature(signature);
+ signature.addInt(this._kind == null ? 0 : this._kind.index);
+ signature.addBool(this._isFunctionTyped == true);
+ signature.addBool(this._isInitializingFormal == true);
+ if (this._parameters == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._parameters.length);
+ for (var x in this._parameters) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addInt(this._visibleLength ?? 0);
+ signature.addInt(this._visibleOffset ?? 0);
+ signature.addBool(this._initializer != null);
+ this._initializer?.collectApiSignature(signature);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
fb.Offset offset_codeRange;
@@ -6494,6 +7326,20 @@
_uriOffset = null;
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
if (!(_annotations == null || _annotations.isEmpty)) {
@@ -6636,6 +7482,23 @@
_members?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ signature.addInt(this._kind == null ? 0 : this._kind.index);
+ if (this._members == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._members.length);
+ for (var x in this._members) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addInt(this._numTypeParameters ?? 0);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_members;
fb.Offset offset_name;
@@ -6779,6 +7642,36 @@
_names?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ if (this._names == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._names.length);
+ for (var x in this._names) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._parts == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._parts.length);
+ for (var x in this._parts) {
+ signature.addString(x);
+ }
+ }
+ if (this._exports == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._exports.length);
+ for (var x in this._exports) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "UPNS");
@@ -6915,6 +7808,14 @@
void flushInformative() {
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ signature.addInt(this._prefixReference ?? 0);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_name;
if (_name != null) {
@@ -7094,6 +7995,39 @@
_typeParameters?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ signature.addBool(this._returnType != null);
+ this._returnType?.collectApiSignature(signature);
+ if (this._parameters == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._parameters.length);
+ for (var x in this._parameters) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._typeParameters == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._typeParameters.length);
+ for (var x in this._typeParameters) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
fb.Offset offset_codeRange;
@@ -7330,6 +8264,23 @@
_nameOffset = null;
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ signature.addBool(this._bound != null);
+ this._bound?.collectApiSignature(signature);
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
fb.Offset offset_bound;
@@ -7686,6 +8637,96 @@
_variables?.forEach((b) => b.flushInformative());
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addBool(this._publicNamespace != null);
+ this._publicNamespace?.collectApiSignature(signature);
+ if (this._references == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._references.length);
+ for (var x in this._references) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._classes == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._classes.length);
+ for (var x in this._classes) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._variables == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._variables.length);
+ for (var x in this._variables) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._executables == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._executables.length);
+ for (var x in this._executables) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._imports == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._imports.length);
+ for (var x in this._imports) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addString(this._libraryName ?? '');
+ if (this._typedefs == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._typedefs.length);
+ for (var x in this._typedefs) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._parts == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._parts.length);
+ for (var x in this._parts) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._enums == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._enums.length);
+ for (var x in this._enums) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._exports == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._exports.length);
+ for (var x in this._exports) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ if (this._libraryAnnotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._libraryAnnotations.length);
+ for (var x in this._libraryAnnotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addString(this._fallbackModePath ?? '');
+ }
+
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "UUnt");
@@ -8199,6 +9240,32 @@
_type?.flushInformative();
}
+ /**
+ * Accumulate non-[informative] data into [signature].
+ */
+ void collectApiSignature(api_sig.ApiSignature signature) {
+ signature.addString(this._name ?? '');
+ signature.addInt(this._propagatedTypeSlot ?? 0);
+ signature.addBool(this._type != null);
+ this._type?.collectApiSignature(signature);
+ signature.addBool(this._isStatic == true);
+ signature.addBool(this._isConst == true);
+ signature.addBool(this._isFinal == true);
+ if (this._annotations == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._annotations.length);
+ for (var x in this._annotations) {
+ x?.collectApiSignature(signature);
+ }
+ }
+ signature.addInt(this._inferredTypeSlot ?? 0);
+ signature.addInt(this._visibleLength ?? 0);
+ signature.addInt(this._visibleOffset ?? 0);
+ signature.addBool(this._initializer != null);
+ this._initializer?.collectApiSignature(signature);
+ }
+
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_annotations;
fb.Offset offset_codeRange;
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 329fe6b..1449743 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -1181,6 +1181,13 @@
*/
table PackageBundle {
/**
+ * MD5 hash of the non-informative fields of the [PackageBundle] (not
+ * including this one). This can be used to identify when the API of a
+ * package may have changed.
+ */
+ apiSignature:string (id: 7);
+
+ /**
* Linked libraries.
*/
linkedLibraries:[LinkedLibrary] (id: 0);
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index 60a0552..15f81a7 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -650,6 +650,14 @@
generated.readPackageBundle(buffer);
/**
+ * MD5 hash of the non-informative fields of the [PackageBundle] (not
+ * including this one). This can be used to identify when the API of a
+ * package may have changed.
+ */
+ @Id(7)
+ String get apiSignature;
+
+ /**
* Linked libraries.
*/
@Id(0)
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 98e3de4..e25da27 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -15,6 +15,7 @@
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/summary/api_signature.dart';
import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:analyzer/src/summary/name_filter.dart';
@@ -192,7 +193,7 @@
* Assemble a new [PackageBundleBuilder] using the gathered information.
*/
PackageBundleBuilder assemble() {
- return new PackageBundleBuilder(
+ PackageBundleBuilder packageBundle = new PackageBundleBuilder(
linkedLibraryUris: _linkedLibraryUris,
linkedLibraries: _linkedLibraries,
unlinkedUnitUris: _unlinkedUnitUris,
@@ -200,6 +201,10 @@
unlinkedUnitHashes: _unlinkedUnitHashes,
majorVersion: currentMajorVersion,
minorVersion: currentMinorVersion);
+ ApiSignature apiSignature = new ApiSignature();
+ packageBundle.collectApiSignature(apiSignature);
+ packageBundle.apiSignature = apiSignature.toHex();
+ return packageBundle;
}
/**
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index c074b79..b20d702 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -21,8 +21,11 @@
import 'ast_properties.dart';
-bool isKnownFunction(Expression expression) {
+bool isKnownFunction(Expression expression, {bool instanceMethods: false}) {
Element element = null;
+ if (expression is ParenthesizedExpression) {
+ expression = (expression as ParenthesizedExpression).expression;
+ }
if (expression is FunctionExpression) {
return true;
} else if (expression is PropertyAccess) {
@@ -30,10 +33,10 @@
} else if (expression is Identifier) {
element = expression.staticElement;
}
-// First class functions and static methods, where we know the original
-// declaration, will have an exact type, so we know a downcast will fail.
+ // First class functions and static methods, where we know the original
+ // declaration, will have an exact type, so we know a downcast will fail.
return element is FunctionElement ||
- element is MethodElement && element.isStatic;
+ element is MethodElement && (instanceMethods || element.isStatic);
}
DartType _elementType(Element e) {
@@ -162,8 +165,9 @@
if (expr is ParenthesizedExpression) {
checkAssignment(expr.expression, type);
} else {
- _checkDowncast(expr, type);
- _checkNonNullAssignment(expr, type);
+ if (_checkNonNullAssignment(expr, type)) {
+ _checkDowncast(expr, type);
+ }
}
}
@@ -625,6 +629,20 @@
}
@override
+ Object visitVariableDeclaration(VariableDeclaration node) {
+ if (!node.isConst &&
+ !node.isFinal &&
+ node.initializer == null &&
+ rules.isNonNullableType(node?.element?.type)) {
+ _recordMessage(
+ node,
+ StaticTypeWarningCode.NON_NULLABLE_FIELD_NOT_INITIALIZED,
+ [node.name, node?.element?.type]);
+ }
+ return super.visitVariableDeclaration(node);
+ }
+
+ @override
void visitWhileStatement(WhileStatement node) {
checkBoolean(node.condition);
node.visitChildren(this);
@@ -839,12 +857,17 @@
[declElement.name]);
}
- void _checkNonNullAssignment(Expression expression, DartType type) {
+ /// Checks if the assignment is valid with respect to non-nullable types.
+ /// Returns `false` if a nullable expression is assigned to a variable of
+ /// non-nullable type and `true` otherwise.
+ bool _checkNonNullAssignment(Expression expression, DartType type) {
var exprType = expression.staticType;
- if (rules.isNonNullableType(type) && !rules.isNonNullableType(exprType)) {
+ if (rules.isNonNullableType(type) && rules.isNullableType(exprType)) {
_recordMessage(expression, StaticTypeWarningCode.INVALID_ASSIGNMENT,
[exprType, type]);
+ return false;
}
+ return true;
}
void _checkReturnOrYield(Expression expression, AstNode node,
@@ -936,10 +959,6 @@
}
}
- // Produce a coercion which coerces something of type fromT
- // to something of type toT.
- // Returns the error coercion if the types cannot be coerced
- // according to our current criteria.
DartType _getStaticType(Expression expr) {
DartType t = expr.staticType ?? DynamicTypeImpl.instance;
@@ -985,14 +1004,9 @@
// a dynamic parameter type requires a dynamic call in general.
// However, as an optimization, if we have an original definition, we know
// dynamic is reified as Object - in this case a regular call is fine.
- if (call is SimpleIdentifier) {
- var element = call.staticElement;
- if (element is FunctionElement || element is MethodElement) {
- // An original declaration.
- return false;
- }
+ if (isKnownFunction(call, instanceMethods: true)) {
+ return false;
}
-
return rules.anyParameterType(ft, (pt) => pt.isDynamic);
}
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 4779ab9..1988ae1 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
name: analyzer
-version: 0.27.4
+version: 0.27.5-alpha.0
author: Dart Team <misc@dartlang.org>
description: Static analyzer for Dart.
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
diff --git a/pkg/analyzer/test/generated/engine_test.dart b/pkg/analyzer/test/generated/engine_test.dart
index 1d0871d..92c7007 100644
--- a/pkg/analyzer/test/generated/engine_test.dart
+++ b/pkg/analyzer/test/generated/engine_test.dart
@@ -9,8 +9,8 @@
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/src/cancelable_future.dart';
+import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
import 'package:analyzer/src/context/cache.dart';
import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/context/source.dart';
@@ -225,6 +225,12 @@
}
@override
+ CacheConsistencyValidator get cacheConsistencyValidator {
+ fail("Unexpected invocation of cacheConsistencyValidator");
+ return null;
+ }
+
+ @override
set contentCache(ContentCache value) {
fail("Unexpected invocation of setContentCache");
}
@@ -705,10 +711,4 @@
void visitContentCache(ContentCacheVisitor visitor) {
fail("Unexpected invocation of visitContentCache");
}
-
- @override
- CacheConsistencyValidator get cacheConsistencyValidator {
- fail("Unexpected invocation of cacheConsistencyValidator");
- return null;
- }
}
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart
index fa0ad49..3a06df4 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -1348,6 +1348,24 @@
''');
}
+ void test_true_emptyLine_betweenClassMembers_insert_beforeComment() {
+ _resolveUnit(r'''
+class A {
+ a() {}
+ /// BBB
+ b() {}
+}
+''');
+ _updateAndValidate(r'''
+class A {
+ a() {}
+
+ /// BBB
+ b() {}
+}
+''');
+ }
+
void test_true_emptyLine_betweenClassMembers_remove() {
_resolveUnit(r'''
class A {
@@ -1364,7 +1382,25 @@
''');
}
- void test_true_emptyLine_betweenCompilationUnitMembers_insert() {
+ void test_true_emptyLine_betweenClassMembers_remove_beforeComment() {
+ _resolveUnit(r'''
+class A {
+ a() {}
+
+ /// BBB
+ b() {}
+}
+''');
+ _updateAndValidate(r'''
+class A {
+ a() {}
+ /// BBB
+ b() {}
+}
+''');
+ }
+
+ void test_true_emptyLine_betweenUnitMembers_insert() {
_resolveUnit(r'''
a() {}
b() {}
@@ -1376,7 +1412,23 @@
''');
}
- void test_true_emptyLine_betweenCompilationUnitMembers_remove() {
+ void test_true_emptyLine_betweenUnitMembers_insert_beforeComment() {
+ _resolveUnit(r'''
+a() {}
+
+// BBB
+b() {}
+''');
+ _updateAndValidate(r'''
+a() {}
+
+
+// BBB
+b() {}
+''');
+ }
+
+ void test_true_emptyLine_betweenUnitMembers_remove() {
_resolveUnit(r'''
a() {
print(1)
@@ -1398,6 +1450,20 @@
''');
}
+ void test_true_emptyLine_betweenUnitMembers_remove_beforeComment() {
+ _resolveUnit(r'''
+a() {}
+
+// BBB
+b() {}
+''');
+ _updateAndValidate(r'''
+a() {}
+// BBB
+b() {}
+''');
+ }
+
void test_true_todoHint() {
_resolveUnit(r'''
main() {
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index 75f4ea9..6c5879f 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -1745,7 +1745,7 @@
}
''');
expectIdentifierType('f', '<S>(S) → S');
- expectIdentifierType('g', '<S>(S) → dynamic');
+ expectIdentifierType('g', '<S>(S) → <S>(S) → S');
}
void test_genericMethod_override() {
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index d82d135..c62f985 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_test.dart
@@ -164,7 +164,6 @@
FunctionType expected = _functionType([objectType, numType, numType]);
_checkLeastUpperBound(type1, type2, expected);
}
-
void test_nestedNestedFunctionsLubInnermostParamTypes() {
FunctionType type1 = _functionType([
_functionType([
@@ -1142,6 +1141,13 @@
_checkGreatestLowerBound(type1, type2, expected);
}
+ void test_functionsFuzzyArrows() {
+ FunctionType type1 = _functionType([dynamicType]);
+ FunctionType type2 = _functionType([intType]);
+ FunctionType expected = _functionType([intType]);
+ _checkGreatestLowerBound(type1, type2, expected);
+ }
+
void test_functionsGlbReturnType() {
FunctionType type1 = _functionType([], returns: intType);
FunctionType type2 = _functionType([], returns: numType);
@@ -1311,6 +1317,13 @@
super.setUp();
}
+ void test_functionsFuzzyArrows() {
+ FunctionType type1 = _functionType([dynamicType]);
+ FunctionType type2 = _functionType([intType]);
+ FunctionType expected = _functionType([dynamicType]);
+ _checkLeastUpperBound(type1, type2, expected);
+ }
+
void test_functionsGlbNamedParams() {
FunctionType type1 =
_functionType([], named: {'a': stringType, 'b': intType});
diff --git a/pkg/analyzer/test/source/embedder_test.dart b/pkg/analyzer/test/source/embedder_test.dart
index c16e6f9..ea20cd7 100644
--- a/pkg/analyzer/test/source/embedder_test.dart
+++ b/pkg/analyzer/test/source/embedder_test.dart
@@ -22,7 +22,6 @@
runReflectiveTests(DartUriResolverTest);
runReflectiveTests(EmbedderSdkTest);
runReflectiveTests(EmbedderUriResolverTest);
- runReflectiveTests(EmbedderYamlLocatorTest);
}
@reflectiveTest
@@ -39,6 +38,7 @@
expect(source, isNotNull, reason: dartUri);
expect(source.fullName, posixToOSPath(posixPath));
}
+
// Check that they map to the correct paths.
expectResolved('dart:core', '/tmp/core.dart');
expectResolved('dart:fox', '/tmp/slippy.dart');
@@ -205,26 +205,3 @@
expectRestore('dart:deep/deep/file.dart');
}
}
-
-@reflectiveTest
-class EmbedderYamlLocatorTest extends EmbedderRelatedTest {
- void test_empty() {
- EmbedderYamlLocator locator = new EmbedderYamlLocator({
- 'fox': [pathTranslator.getResource('/empty')]
- });
- expect(locator.embedderYamls, hasLength(0));
- }
-
- void test_invalid() {
- EmbedderYamlLocator locator = new EmbedderYamlLocator(null);
- locator.addEmbedderYaml(null, r'''{{{,{{}}},}}''');
- expect(locator.embedderYamls, hasLength(0));
- }
-
- void test_valid() {
- EmbedderYamlLocator locator = new EmbedderYamlLocator({
- 'fox': [pathTranslator.getResource('/tmp')]
- });
- expect(locator.embedderYamls, hasLength(1));
- }
-}
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
index 1f94afa..e6ed76f 100644
--- a/pkg/analyzer/test/src/context/builder_test.dart
+++ b/pkg/analyzer/test/src/context/builder_test.dart
@@ -22,6 +22,7 @@
import '../../generated/test_support.dart';
import '../../reflective_tests.dart';
+import '../../source/embedder_test.dart';
import '../../utils.dart';
import 'mock_sdk.dart';
@@ -29,6 +30,7 @@
initializeTestEnvironment();
runReflectiveTests(ContextBuilderTest_WithDisk);
runReflectiveTests(ContextBuilderTest_WithoutDisk);
+ runReflectiveTests(EmbedderYamlLocatorTest);
}
@reflectiveTest
@@ -695,3 +697,26 @@
expect(actual.finerGrainedInvalidation, expected.finerGrainedInvalidation);
}
}
+
+@reflectiveTest
+class EmbedderYamlLocatorTest extends EmbedderRelatedTest {
+ void test_empty() {
+ EmbedderYamlLocator locator = new EmbedderYamlLocator({
+ 'fox': [pathTranslator.getResource('/empty')]
+ });
+ expect(locator.embedderYamls, hasLength(0));
+ }
+
+ void test_invalid() {
+ EmbedderYamlLocator locator = new EmbedderYamlLocator(null);
+ locator.addEmbedderYaml(null, r'''{{{,{{}}},}}''');
+ expect(locator.embedderYamls, hasLength(0));
+ }
+
+ void test_valid() {
+ EmbedderYamlLocator locator = new EmbedderYamlLocator({
+ 'fox': [pathTranslator.getResource('/tmp')]
+ });
+ expect(locator.embedderYamls, hasLength(1));
+ }
+}
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index f5b695f..988db56 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -487,6 +487,43 @@
expect(context.getErrors(a).errors, hasLength(0));
}
+ void test_applyChanges_addNewImport_invalidateLibraryCycle() {
+ context.analysisOptions =
+ new AnalysisOptionsImpl.from(context.analysisOptions)
+ ..strongMode = true;
+ Source embedder = addSource(
+ '/a.dart',
+ r'''
+library a;
+import 'b.dart';
+//import 'c.dart';
+''');
+ addSource(
+ '/b.dart',
+ r'''
+library b;
+import 'a.dart';
+''');
+ addSource(
+ '/c.dart',
+ r'''
+library c;
+import 'b.dart';
+''');
+ _performPendingAnalysisTasks();
+ // Add a new import into a.dart, this should invalidate its library cycle.
+ // If it doesn't, we will get a task cycle exception.
+ context.setContents(
+ embedder,
+ r'''
+library a;
+import 'b.dart';
+import 'c.dart';
+''');
+ _performPendingAnalysisTasks();
+ expect(context.getCacheEntry(embedder).exception, isNull);
+ }
+
void test_cacheConsistencyValidator_computed_deleted() {
CacheConsistencyValidator validator = context.cacheConsistencyValidator;
var stat = PerformanceStatistics.cacheConsistencyValidationStatistics;
diff --git a/pkg/analyzer/test/src/dart/sdk/sdk_test.dart b/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
index e613f96..a212045 100644
--- a/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
+++ b/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
@@ -6,7 +6,7 @@
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/source/embedder.dart' show EmbedderYamlLocator;
+import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/java_engine_io.dart';
diff --git a/pkg/analyzer/test/src/summary/api_signature_test.dart b/pkg/analyzer/test/src/summary/api_signature_test.dart
new file mode 100644
index 0000000..eabb805
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/api_signature_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.src.summary.api_signature_test;
+
+import 'package:analyzer/src/summary/api_signature.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:convert/convert.dart';
+import 'package:crypto/crypto.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../reflective_tests.dart';
+
+main() {
+ groupSep = ' | ';
+ runReflectiveTests(ApiSignatureTest);
+}
+
+@reflectiveTest
+class ApiSignatureTest {
+ ApiSignature sig = new ApiSignature.unversioned();
+
+ void checkBytes(List<int> bytes) {
+ expect(sig.getBytes_forDebug(), bytes);
+ expect(sig.toHex(), hex.encode(md5.convert(bytes).bytes));
+ }
+
+ String signUnlinkedCombinator(UnlinkedCombinatorBuilder combinator) {
+ ApiSignature sig = new ApiSignature();
+ combinator.collectApiSignature(sig);
+ return sig.toHex();
+ }
+
+ void test_addBool() {
+ sig.addBool(true);
+ sig.addBool(true);
+ sig.addBool(false);
+ sig.addBool(true);
+ sig.addBool(false);
+ sig.addBool(false);
+ sig.addBool(true);
+ sig.addBool(false);
+ checkBytes([1, 1, 0, 1, 0, 0, 1, 0]);
+ }
+
+ void test_addBytes() {
+ // Check that offset works correctly by adding bytes in 2 chunks.
+ sig.addBytes([1, 2, 3, 4, 5]);
+ sig.addBytes([0xff, 0xfe, 0xfd, 0xfc, 0xfb]);
+ checkBytes([1, 2, 3, 4, 5, 0xff, 0xfe, 0xfd, 0xfc, 0xfb]);
+ }
+
+ void test_addDouble() {
+ sig.addDouble(1.0 / 3.0);
+ sig.addDouble(-1.0);
+ checkBytes([85, 85, 85, 85, 85, 85, 213, 63, 0, 0, 0, 0, 0, 0, 240, 191]);
+ }
+
+ void test_addInt() {
+ sig.addInt(1);
+ sig.addInt(1000);
+ sig.addInt(1000000);
+ sig.addInt(1000000000);
+ checkBytes(
+ [1, 0, 0, 0, 0xe8, 3, 0, 0, 0x40, 0x42, 0xf, 0, 0, 0xca, 0x9a, 0x3b]);
+ }
+
+ void test_addString() {
+ sig.addString('abc');
+ sig.addString('\u00f8');
+ checkBytes([3, 0, 0, 0, 0x61, 0x62, 0x63, 2, 0, 0, 0, 0xc3, 0xb8]);
+ }
+
+ void test_excludesInformative() {
+ // Verify that API signatures exclude informative data by checking that two
+ // UnlinkedCombinator instances that differ only in their offset result in
+ // the same signature.
+ UnlinkedCombinatorBuilder combinator1 =
+ new UnlinkedCombinatorBuilder(shows: ['foo'], offset: 1);
+ UnlinkedCombinatorBuilder combinator2 =
+ new UnlinkedCombinatorBuilder(shows: ['foo'], offset: 2);
+ expect(signUnlinkedCombinator(combinator1),
+ signUnlinkedCombinator(combinator2));
+ }
+
+ void test_includesSemantic() {
+ // Verify that API signatures include semantic data by checking that two
+ // UnlinkedCombinator instances that differ only in their "shows" lists
+ // result in different signatures.
+ UnlinkedCombinatorBuilder combinator1 =
+ new UnlinkedCombinatorBuilder(shows: ['foo'], offset: 1);
+ UnlinkedCombinatorBuilder combinator2 =
+ new UnlinkedCombinatorBuilder(shows: ['bar'], offset: 1);
+ expect(signUnlinkedCombinator(combinator1),
+ isNot(signUnlinkedCombinator(combinator2)));
+ }
+
+ void test_manyInts() {
+ // This verifies that the logic to extend the internal buffer works
+ // properly.
+ List<int> expectedResult = [];
+ for (int i = 0; i < 100000; i++) {
+ sig.addInt(i);
+ expectedResult.add(i % 0x100);
+ expectedResult.add((i ~/ 0x100) % 0x100);
+ expectedResult.add((i ~/ 0x10000) % 0x100);
+ expectedResult.add((i ~/ 0x1000000) % 0x100);
+ }
+ checkBytes(expectedResult);
+ }
+}
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index 674ce9b..196fb04 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -43,6 +43,24 @@
return linker.getLibrary(Uri.parse(uri));
}
+ void test_apiSignature_apiChanges() {
+ var bundle0 =
+ createPackageBundle('f(int i) { print(i); }', path: '/test.dart');
+ var bundle1 =
+ createPackageBundle('f(String s) { print(s); }', path: '/test.dart');
+ expect(bundle0.apiSignature, isNotEmpty);
+ expect(bundle1.apiSignature, isNotEmpty);
+ expect(bundle0.apiSignature, isNot(bundle1.apiSignature));
+ }
+
+ void test_apiSignature_localChanges() {
+ var bundle0 = createPackageBundle('f() { print(0); }', path: '/test.dart');
+ var bundle1 = createPackageBundle('f() { print(1); }', path: '/test.dart');
+ expect(bundle0.apiSignature, isNotEmpty);
+ expect(bundle1.apiSignature, isNotEmpty);
+ expect(bundle0.apiSignature, bundle1.apiSignature);
+ }
+
void test_baseClass_genericWithAccessor() {
createLinker('''
class B<T> {
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
index 420d515..cb6cfeb 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -567,6 +567,12 @@
@override
@failingTest
+ void test_inferLocalFunctionReturnType() {
+ super.test_inferLocalFunctionReturnType();
+ }
+
+ @override
+ @failingTest
void test_inferredType_opAssignToProperty_prefixedIdentifier() {
super.test_inferredType_opAssignToProperty_prefixedIdentifier();
}
@@ -600,6 +606,12 @@
@override
@failingTest
+ void test_nullCoalescingOperator() {
+ super.test_nullCoalescingOperator();
+ }
+
+ @override
+ @failingTest
void test_unsafeBlockClosureInference_closureCall() {
super.test_unsafeBlockClosureInference_closureCall();
}
diff --git a/pkg/analyzer/test/src/summary/test_all.dart b/pkg/analyzer/test/src/summary/test_all.dart
index b3a0467..6ad0f2f 100644
--- a/pkg/analyzer/test/src/summary/test_all.dart
+++ b/pkg/analyzer/test/src/summary/test_all.dart
@@ -7,6 +7,7 @@
import 'package:unittest/unittest.dart';
import '../../utils.dart';
+import 'api_signature_test.dart' as api_signature_test;
import 'flat_buffers_test.dart' as flat_buffers_test;
import 'in_summary_source_test.dart' as in_summary_source_test;
import 'incremental_cache_test.dart' as incremental_cache_test;
@@ -27,6 +28,7 @@
main() {
initializeTestEnvironment();
group('summary tests', () {
+ api_signature_test.main();
flat_buffers_test.main();
in_summary_source_test.main();
incremental_cache_test.main();
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index cedcb9b..c274834 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -1556,113 +1556,143 @@
void test_library_cycle_incremental() {
enableStrongMode();
- Source lib1Source = newSource(
- '/my_lib1.dart',
+ Source a = newSource(
+ '/a.dart',
'''
-library my_lib1;
+library a;
''');
- Source lib2Source = newSource(
- '/my_lib2.dart',
+ Source b = newSource(
+ '/b.dart',
'''
-library my_lib2;
-import 'my_lib1.dart';
+library b;
+import 'a.dart';
''');
- Source lib3Source = newSource(
- '/my_lib3.dart',
+ Source c = newSource(
+ '/c.dart',
'''
-library my_lib3;
-import 'my_lib2.dart';
+library c;
+import 'b.dart';
''');
- computeResult(lib1Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(1));
- computeResult(lib2Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(1));
- computeResult(lib3Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(1));
+ _assertLibraryCycle(a, [a]);
+ _assertLibraryCycle(b, [b]);
+ _assertLibraryCycle(c, [c]);
- // create a cycle
+ // Create a cycle.
context.setContents(
- lib1Source,
+ a,
'''
-library my_lib1;
-import 'my_lib3.dart';
+library a;
+import 'c.dart';
''');
- _expectInvalid(lib1Source);
- _expectInvalid(lib2Source);
- _expectInvalid(lib3Source);
+ _expectInvalid(a);
+ _expectInvalid(b);
+ _expectInvalid(c);
- computeResult(lib1Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(3));
- computeResult(lib2Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(3));
- computeResult(lib3Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(3));
+ _assertLibraryCycle(a, [a, b, c]);
+ _assertLibraryCycle(b, [a, b, c]);
+ _assertLibraryCycle(c, [a, b, c]);
- // break the cycle again
+ // Break the cycle again.
context.setContents(
- lib1Source,
+ a,
'''
-library my_lib1;
+library a;
''');
- _expectInvalid(lib1Source);
- _expectInvalid(lib2Source);
- _expectInvalid(lib3Source);
+ _expectInvalid(a);
+ _expectInvalid(b);
+ _expectInvalid(c);
- computeResult(lib1Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(1));
- computeResult(lib2Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(1));
- computeResult(lib3Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(1));
+ _assertLibraryCycle(a, [a]);
+ _assertLibraryCycle(b, [b]);
+ _assertLibraryCycle(c, [c]);
}
void test_library_cycle_incremental_partial() {
enableStrongMode();
- Source lib1Source = newSource(
- '/my_lib1.dart',
- '''
-library my_lib1;
+ Source a = newSource(
+ '/a.dart',
+ r'''
+library a;
''');
- Source lib2Source = newSource(
- '/my_lib2.dart',
- '''
-library my_lib2;
-import 'my_lib1.dart';
+ Source b = newSource(
+ '/b.dart',
+ r'''
+library b;
+import 'a.dart';
''');
- Source lib3Source = newSource(
- '/my_lib3.dart',
- '''
-library my_lib3;
-import 'my_lib2.dart';
+ Source c = newSource(
+ '/c.dart',
+ r'''
+library c;
+import 'b.dart';
''');
- computeResult(lib1Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(1));
- computeResult(lib2Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(1));
- // lib3 is not reachable, so we have not yet computed its library
- // cycles
+ _assertLibraryCycle(a, [a]);
+ _assertLibraryCycle(b, [b]);
+ // 'c' is not reachable, so we have not yet computed its library cycles.
- // complete the cycle, via lib3
+ // Complete the cycle, via 'c'.
context.setContents(
- lib1Source,
- '''
-library my_lib1;
-import 'my_lib3.dart';
+ a,
+ r'''
+library a;
+import 'c.dart';
''');
- _expectInvalid(lib1Source);
- _expectInvalid(lib2Source);
- _expectInvalid(lib3Source);
+ _expectInvalid(a);
+ _expectInvalid(b);
+ _expectInvalid(c);
- // Ensure that invalidation correctly invalidated everything reachable
- // through lib3
- computeResult(lib1Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(3));
- computeResult(lib2Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(3));
- computeResult(lib3Source, LIBRARY_CYCLE);
- expect(outputs[LIBRARY_CYCLE], hasLength(3));
+ // Ensure that everything reachable through 'c' was invalidated,
+ // and recomputed to include all three sources.
+ _assertLibraryCycle(a, [a, b, c]);
+ _assertLibraryCycle(b, [a, b, c]);
+ _assertLibraryCycle(c, [a, b, c]);
+ }
+
+ void test_library_cycle_incremental_partial2() {
+ enableStrongMode();
+ Source a = newSource(
+ '/a.dart',
+ r'''
+library a;
+import 'b.dart';
+''');
+ Source b = newSource(
+ '/b.dart',
+ r'''
+library b;
+import 'a.dart';
+''');
+ Source c = newSource(
+ '/c.dart',
+ r'''
+library c;
+import 'b.dart';
+''');
+
+ _assertLibraryCycle(a, [a, b]);
+ _assertLibraryCycle(b, [a, b]);
+ _assertLibraryCycle(c, [c]);
+
+ // Include 'c' into the cycle.
+ context.setContents(
+ a,
+ r'''
+library a;
+import 'b.dart';
+import 'c.dart';
+''');
+ _expectInvalid(a);
+ _expectInvalid(b);
+ _expectInvalid(c);
+
+ // Start processing with 'b', so that when we resolve 'b' directives,
+ // and invalidate library cycles, the 'a' directives are not resolved yet,
+ // so we don't know that the cycle must include 'c'.
+ _assertLibraryCycle(b, [a, b, c]);
+ _assertLibraryCycle(a, [a, b, c]);
+ _assertLibraryCycle(c, [a, b, c]);
}
void test_library_cycle_linear() {
@@ -1974,6 +2004,12 @@
expect(dep5, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart
}
+ void _assertLibraryCycle(Source source, List<Source> expected) {
+ computeResult(source, LIBRARY_CYCLE);
+ List<LibraryElement> cycle = outputs[LIBRARY_CYCLE] as List<LibraryElement>;
+ expect(cycle.map((e) => e.source), unorderedEquals(expected));
+ }
+
void _expectInvalid(Source librarySource) {
CacheEntry entry = context.getCacheEntry(librarySource);
expect(entry.getState(LIBRARY_CYCLE), CacheState.INVALID);
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 8bdd4ce..f7ce4b2 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -2612,6 +2612,20 @@
''');
}
+ void test_leastUpperBounds_fuzzyArrows() {
+ checkFile(r'''
+typedef String TakesA<T>(T item);
+
+void main() {
+ TakesA<int> f;
+ TakesA<dynamic> g;
+ TakesA<String> h;
+ g = h;
+ f = /*warning:DOWN_CAST_COMPOSITE*/f ?? g;
+}
+''');
+ }
+
void test_loadLibrary() {
addFile('''library lib1;''', name: '/lib1.dart');
checkFile(r'''
@@ -3322,7 +3336,9 @@
bool isValidKey(potentialKey)])
: _comparator = /*warning:DOWN_CAST_COMPOSITE*/(compare == null) ? Comparable.compare : compare,
_validKey = (isValidKey != null) ? isValidKey : ((v) => true) {
- _Predicate<Object> v = (isValidKey != null)
+
+ // NOTE: this is a down cast because isValidKey has fuzzy arrow type.
+ _Predicate<Object> v = /*warning:DOWN_CAST_COMPOSITE*/(isValidKey != null)
? isValidKey : (/*info:INFERRED_TYPE_CLOSURE*/(_) => true);
v = (isValidKey != null)
@@ -3406,6 +3422,29 @@
''');
}
+ void test_typePromotionFromTypeParameter() {
+ // Regression test for https://github.com/dart-lang/sdk/issues/26965
+ checkFile(r'''
+void f/*<T>*/(/*=T*/ object) {
+ if (object is String) print(object.substring(1));
+}
+void g/*<T extends num>*/(/*=T*/ object) {
+ if (object is int) print(object.isEven);
+ if (object is String) print(/*info:DYNAMIC_INVOKE*/object.substring(1));
+}
+class Clonable<T> {}
+class SubClonable<T> extends Clonable<T> {
+ T m(T t) => t;
+}
+void h/*<T extends Clonable<T>>*/(/*=T*/ object) {
+ if (/*info:NON_GROUND_TYPE_CHECK_INFO*/object is SubClonable/*<T>*/) {
+ // Note we need to cast back to T, because promotion lost that type info.
+ print(object.m(object as dynamic/*=T*/));
+ }
+}
+''');
+ }
+
void test_typeSubtyping_assigningClass() {
checkFile('''
class A {}
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index 741659a..4dbcbfe 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -588,6 +588,16 @@
''');
}
+ void test_constructors_downwardsWithConstraint() {
+ // Regression test for https://github.com/dart-lang/sdk/issues/26431
+ checkFile(r'''
+class Foo<T extends Iterable> {}
+void main() {
+ Foo<List> foo = /*info:INFERRED_TYPE_ALLOCATION*/new Foo();
+}
+ ''');
+ }
+
void test_constructors_inferenceFBounded() {
// Regression for https://github.com/dart-lang/sdk/issues/26990
var unit = checkFile('''
@@ -2508,6 +2518,42 @@
''');
}
+ void test_inferLocalFunctionReturnType() {
+ // Regression test for https://github.com/dart-lang/sdk/issues/26414
+ var unit = checkFile(r'''
+main() {
+ f0() => 42;
+ f1() async => 42;
+
+ f2 /*info:INFERRED_TYPE_CLOSURE*/() { return 42; }
+ f3 /*info:INFERRED_TYPE_CLOSURE*/() async { return 42; }
+ f4 /*info:INFERRED_TYPE_CLOSURE*/() sync* { yield 42; }
+ f5 /*info:INFERRED_TYPE_CLOSURE*/() async* { yield 42; }
+
+ num f6() => 42;
+
+ f7() => f7();
+ f8() => /*error:REFERENCED_BEFORE_DECLARATION*/f9();
+ f9() => f5();
+}
+''');
+ var fns = unit.functions[0].functions;
+ expect(fns[0].type.toString(), '() → int');
+ expect(fns[1].type.toString(), '() → Future<int>');
+
+ expect(fns[2].type.toString(), '() → int');
+ expect(fns[3].type.toString(), '() → Future<int>');
+ expect(fns[4].type.toString(), '() → Iterable<int>');
+ expect(fns[5].type.toString(), '() → Stream<int>');
+
+ expect(fns[6].type.toString(), '() → num');
+
+ // Recursive cases: these infer in declaration order.
+ expect(fns[7].type.toString(), '() → dynamic');
+ expect(fns[8].type.toString(), '() → dynamic');
+ expect(fns[9].type.toString(), '() → Stream<int>');
+ }
+
void test_inferred_nonstatic_field_depends_on_static_field_complex() {
var mainUnit = checkFile('''
class C {
@@ -3616,6 +3662,23 @@
''');
}
+ void test_nullCoalescingOperator() {
+ // Regression test for https://github.com/dart-lang/sdk/issues/26552
+ checkFile(r'''
+List<int> x;
+var y = x ?? /*info:INFERRED_TYPE_LITERAL*/[];
+List<int> z = y;
+ ''');
+ // Don't do anything if we already have a context type.
+ var unit = checkFile(r'''
+List<int> x;
+List<num> y = x ?? /*info:INFERRED_TYPE_LITERAL*/[];
+ ''');
+
+ expect(unit.topLevelVariables[1].initializer.returnType.toString(),
+ 'List<num>');
+ }
+
void test_nullLiteralShouldNotInferAsBottom() {
// Regression test for https://github.com/dart-lang/dev_compiler/issues/47
checkFile(r'''
@@ -3906,10 +3969,9 @@
}
void test_unsafeBlockClosureInference_closureCall() {
- // Note: this is a DYNAMIC_INVOKE due to dartbug.com/26962.
+ // Regression test for https://github.com/dart-lang/sdk/issues/26962
var mainUnit = checkFile('''
-var v = /*info:DYNAMIC_INVOKE*/((x) => 1.0)(
- /*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
+var v = ((x) => 1.0)(/*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
''');
var v = mainUnit.topLevelVariables[0];
expect(v.name, 'v');
@@ -4075,11 +4137,9 @@
}
void test_unsafeBlockClosureInference_functionCall_noTypeParam_viaExpr() {
- // TODO(paulberry): why is the call to f() considered a DYNAMIC_INVOKE?
var mainUnit = checkFile('''
double f(x) => 1.0;
-var v = /*info:DYNAMIC_INVOKE*/(f)(
- /*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
+var v = (f)(/*info:INFERRED_TYPE_CLOSURE*/() { return 1; });
''');
var v = mainUnit.topLevelVariables[0];
expect(v.name, 'v');
diff --git a/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart b/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
index ac056c2..e5fa7c6 100644
--- a/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
@@ -48,11 +48,17 @@
checkFile('int x = null;');
}
- void test_nonnullableTypes() {
- // If `int`s are non-nullable, then this code should throw an error.
- addFile('int x;');
+ void test_initialize_nonnullable_with_null() {
addFile('int x = /*error:INVALID_ASSIGNMENT*/null;');
+ check(nonnullableTypes: <String>['dart:core,int']);
+ }
+
+ void test_initialize_nonnullable_with_valid_value() {
addFile('int x = 0;');
+ check(nonnullableTypes: <String>['dart:core,int']);
+ }
+
+ void test_assign_null_to_nonnullable() {
addFile('''
int x = 0;
@@ -63,4 +69,119 @@
''');
check(nonnullableTypes: <String>['dart:core,int']);
}
+
+ void test_uninitialized_nonnullable_local_variable() {
+ // Ideally, we will do flow analysis and throw an error only if a variable
+ // is used before it has been initialized.
+ addFile('main() { int /*error:NON_NULLABLE_FIELD_NOT_INITIALIZED*/x; }');
+ check(nonnullableTypes: <String>['dart:core,int']);
+ }
+
+ void test_uninitialized_nonnullable_top_level_variable_declaration() {
+ // If `int`s are non-nullable, then this code should throw an error.
+ addFile('int /*error:NON_NULLABLE_FIELD_NOT_INITIALIZED*/x;');
+ check(nonnullableTypes: <String>['dart:core,int']);
+ }
+
+ void test_uninitialized_nonnullable_field_declaration() {
+ addFile('''
+void foo() {}
+
+class A {
+ // Ideally, we should allow x to be init in the constructor, but that requires
+ // too much complication in the checker, so for now we throw a static error at
+ // the declaration site.
+ int /*error:NON_NULLABLE_FIELD_NOT_INITIALIZED*/x;
+
+ A();
+}
+''');
+ check(nonnullableTypes: <String>['dart:core,int']);
+ }
+
+ void test_prefer_final_to_non_nullable_error() {
+ addFile('main() { final int /*error:FINAL_NOT_INITIALIZED*/x; }');
+ addFile('final int /*error:FINAL_NOT_INITIALIZED*/x;');
+ addFile('''
+void foo() {}
+
+class A {
+ final int x;
+
+ /*warning:FINAL_NOT_INITIALIZED_CONSTRUCTOR_1*/A();
+}
+''');
+ check(nonnullableTypes: <String>['dart:core,int']);
+ }
+
+ // Default example from NNBD document.
+ final String defaultNnbdExample = '''
+class Point {
+ final int x, y;
+ Point(this.x, this.y);
+ Point operator +(Point other) => new Point(x + other.x, y + other.y);
+ String toString() => "x: \$x, y: \$y";
+}
+
+void main() {
+ Point p1 = new Point(0, 0);
+ Point p2 = new Point(10, 10);
+ print("p1 + p2 = \${p1 + p2}");
+}
+''';
+
+ final String defaultNnbdExampleMod1 = '''
+class Point {
+ final int x, y;
+ Point(this.x, this.y);
+ Point operator +(Point other) => new Point(x + other.x, y + other.y);
+ String toString() => "x: \$x, y: \$y";
+}
+
+void main() {
+ Point p1 = new Point(0, 0);
+ Point p2 = new Point(10, /*boom*/null); // Change here.
+ print("p1 + p2 = \${p1 + p2}");
+}
+''';
+
+ final String defaultNnbdExampleMod2 = '''
+class Point {
+ final int x, y;
+ Point(this.x, this.y);
+ Point operator +(Point other) => new Point(x + other.x, y + other.y);
+ String toString() => "x: \$x, y: \$y";
+}
+
+void main() {
+ bool f = false; // Necessary, because dead code is otherwise detected.
+ Point p1 = new Point(0, 0);
+ Point p2 = new Point(10, /*boom*/f ? 10 : null); // Change here.
+ print("p1 + p2 = \${p1 + p2}");
+}
+''';
+
+ void test_nullable_fields() {
+ addFile(defaultNnbdExample);
+ // `null` can be passed as an argument to `Point` in default mode.
+ addFile(defaultNnbdExampleMod1);
+ // A nullable expression can be passed as an argument to `Point` in default
+ // mode.
+ addFile(defaultNnbdExampleMod2);
+ check();
+ }
+
+ void test_nonnullable_fields() {
+ addFile(defaultNnbdExample);
+ // `null` can be passed as an argument to `Point` in default mode.
+ addFile(_withError(defaultNnbdExampleMod1, "error:INVALID_ASSIGNMENT"));
+ // A nullable expression can be passed as an argument to `Point` in default
+ // mode.
+ addFile(_withError(defaultNnbdExampleMod2, "error:INVALID_ASSIGNMENT"));
+ check(nonnullableTypes: <String>['dart:core,int']);
+ }
+}
+
+String _withError(String file, String error) {
+ return ("" + file).replaceFirst("boom", error);
}
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index 869b38d..124a6b8 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -451,6 +451,7 @@
out("import 'flat_buffers.dart' as fb;");
out("import 'idl.dart' as idl;");
out("import 'dart:convert' as convert;");
+ out("import 'api_signature.dart' as api_sig;");
out();
for (idlModel.EnumDeclaration enm in _idl.enums.values) {
_generateEnumReader(enm);
@@ -618,6 +619,44 @@
});
out('}');
}
+ // Generate collectApiSignature().
+ {
+ out();
+ out('/**');
+ out(' * Accumulate non-[informative] data into [signature].');
+ out(' */');
+ out('void collectApiSignature(api_sig.ApiSignature signature) {');
+ indent(() {
+ List<idlModel.FieldDeclaration> sortedFields = cls.fields.toList()
+ ..sort((idlModel.FieldDeclaration a, idlModel.FieldDeclaration b) =>
+ a.id.compareTo(b.id));
+ for (idlModel.FieldDeclaration field in sortedFields) {
+ if (field.isInformative) {
+ continue;
+ }
+ String ref = 'this._${field.name}';
+ if (field.type.isList) {
+ out('if ($ref == null) {');
+ indent(() {
+ out('signature.addInt(0);');
+ });
+ out('} else {');
+ indent(() {
+ out('signature.addInt($ref.length);');
+ out('for (var x in $ref) {');
+ indent(() {
+ _generateSignatureCall(field.type.typeName, 'x', false);
+ });
+ out('}');
+ });
+ out('}');
+ } else {
+ _generateSignatureCall(field.type.typeName, ref, true);
+ }
+ }
+ });
+ out('}');
+ }
// Generate finish.
if (cls.isTopLevel) {
out();
@@ -820,7 +859,8 @@
} else {
out('$returnType get $fieldName {');
indent(() {
- String readExpr = '$readCode.vTableGet(_bc, _bcOffset, $index, $def)';
+ String readExpr =
+ '$readCode.vTableGet(_bc, _bcOffset, $index, $def)';
out('_$fieldName ??= $readExpr;');
out('return _$fieldName;');
});
@@ -918,6 +958,56 @@
}
/**
+ * Generate a call to the appropriate method of [ApiSignature] for the type
+ * [typeName], using the data named by [ref]. If [couldBeNull] is `true`,
+ * generate code to handle the possibility that [ref] is `null` (substituting
+ * in the appropriate default value).
+ */
+ void _generateSignatureCall(String typeName, String ref, bool couldBeNull) {
+ if (_idl.enums.containsKey(typeName)) {
+ if (couldBeNull) {
+ out('signature.addInt($ref == null ? 0 : $ref.index);');
+ } else {
+ out('signature.addInt($ref.index);');
+ }
+ } else if (_idl.classes.containsKey(typeName)) {
+ if (couldBeNull) {
+ out('signature.addBool($ref != null);');
+ }
+ out('$ref?.collectApiSignature(signature);');
+ } else {
+ switch (typeName) {
+ case 'String':
+ if (couldBeNull) {
+ ref += " ?? ''";
+ }
+ out("signature.addString($ref);");
+ break;
+ case 'int':
+ if (couldBeNull) {
+ ref += ' ?? 0';
+ }
+ out('signature.addInt($ref);');
+ break;
+ case 'bool':
+ if (couldBeNull) {
+ ref += ' == true';
+ }
+ out('signature.addBool($ref);');
+ break;
+ case 'double':
+ if (couldBeNull) {
+ ref += ' ?? 0.0';
+ }
+ out('signature.addDouble($ref);');
+ break;
+ default:
+ throw "Don't know how to generate signature call for $typeName";
+ }
+ }
+ }
+
+ /**
* Return the documentation text of the given [node], or `null` if the [node]
* does not have a comment. Each line is `\n` separated.
*/
diff --git a/pkg/analyzer/tool/summary/idl_model.dart b/pkg/analyzer/tool/summary/idl_model.dart
index 18b981c..375dcb2 100644
--- a/pkg/analyzer/tool/summary/idl_model.dart
+++ b/pkg/analyzer/tool/summary/idl_model.dart
@@ -123,6 +123,9 @@
final bool isList;
FieldType(this.typeName, this.isList);
+
+ @override
+ String toString() => isList ? 'List<$typeName>' : typeName;
}
/**
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index 1883318..6d3555f 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -10,7 +10,6 @@
import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit;
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/java_io.dart';
@@ -39,23 +38,26 @@
final StringBuffer errorBuffer = new StringBuffer();
final StringBuffer outBuffer = new StringBuffer();
+ final ResourceProvider resourceProvider;
final String dartSdkPath;
- AnalyzerWorkerLoop(SyncWorkerConnection connection, {this.dartSdkPath})
+ AnalyzerWorkerLoop(this.resourceProvider, SyncWorkerConnection connection,
+ {this.dartSdkPath})
: super(connection: connection);
- factory AnalyzerWorkerLoop.std(
+ factory AnalyzerWorkerLoop.std(ResourceProvider resourceProvider,
{io.Stdin stdinStream, io.Stdout stdoutStream, String dartSdkPath}) {
SyncWorkerConnection connection = new StdSyncWorkerConnection(
stdinStream: stdinStream, stdoutStream: stdoutStream);
- return new AnalyzerWorkerLoop(connection, dartSdkPath: dartSdkPath);
+ return new AnalyzerWorkerLoop(resourceProvider, connection,
+ dartSdkPath: dartSdkPath);
}
/**
* Performs analysis with given [options].
*/
void analyze(CommandLineOptions options) {
- new BuildMode(options, new AnalysisStats()).analyze();
+ new BuildMode(resourceProvider, options, new AnalysisStats()).analyze();
AnalysisEngine.instance.clearCaches();
}
@@ -123,10 +125,10 @@
* Analyzer used when the "--build-mode" option is supplied.
*/
class BuildMode {
+ final ResourceProvider resourceProvider;
final CommandLineOptions options;
final AnalysisStats stats;
- final ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
SummaryDataStore summaryDataStore;
InternalAnalysisContext context;
Map<Uri, JavaFile> uriToFileMap;
@@ -136,7 +138,7 @@
final Set<Source> processedSources = new Set<Source>();
final Map<Uri, UnlinkedUnit> uriToUnit = <Uri, UnlinkedUnit>{};
- BuildMode(this.options, this.stats);
+ BuildMode(this.resourceProvider, this.options, this.stats);
/**
* Perform package analysis according to the given [options].
@@ -285,7 +287,7 @@
]);
// Set context options.
- Driver.setAnalysisContextOptions(context, options,
+ Driver.setAnalysisContextOptions(resourceProvider, context, options,
(AnalysisOptionsImpl contextOptions) {
if (options.buildSummaryOnlyDiet) {
contextOptions.analyzeFunctionBodies = false;
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index da11426..9cddf0d 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -13,11 +13,12 @@
import 'package:analyzer/plugin/options.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
import 'package:analyzer/source/analysis_options_provider.dart';
-import 'package:analyzer/source/embedder.dart';
import 'package:analyzer/source/package_map_provider.dart';
import 'package:analyzer/source/package_map_resolver.dart';
import 'package:analyzer/source/pub_package_map_provider.dart';
import 'package:analyzer/source/sdk_ext.dart';
+import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/constant.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
@@ -94,6 +95,12 @@
/// SDK instance.
DartSdk sdk;
+ /**
+ * The resource provider used to access the file system.
+ */
+ file_system.ResourceProvider resourceProvider =
+ PhysicalResourceProvider.INSTANCE;
+
/// Collected analysis statistics.
final AnalysisStats stats = new AnalysisStats();
@@ -245,9 +252,11 @@
ErrorSeverity _buildModeAnalyze(CommandLineOptions options) {
return _analyzeAllTag.makeCurrentWhile(() {
if (options.buildModePersistentWorker) {
- new AnalyzerWorkerLoop.std(dartSdkPath: options.dartSdkPath).run();
+ new AnalyzerWorkerLoop.std(resourceProvider,
+ dartSdkPath: options.dartSdkPath)
+ .run();
} else {
- return new BuildMode(options, stats).analyze();
+ return new BuildMode(resourceProvider, options, stats).analyze();
}
});
}
@@ -338,8 +347,7 @@
Map<file_system.Folder, YamlMap> embedderMap, _PackageInfo packageInfo) {
// Create a custom package resolver if one has been specified.
if (packageResolverProvider != null) {
- file_system.Folder folder =
- PhysicalResourceProvider.INSTANCE.getResource('.');
+ file_system.Folder folder = resourceProvider.getResource('.');
UriResolver resolver = packageResolverProvider(folder);
if (resolver != null) {
UriResolver sdkResolver = new DartUriResolver(sdk);
@@ -348,7 +356,7 @@
List<UriResolver> resolvers = <UriResolver>[
sdkResolver,
resolver,
- new file_system.ResourceUriResolver(PhysicalResourceProvider.INSTANCE)
+ new file_system.ResourceUriResolver(resourceProvider)
];
return new SourceFactory(resolvers);
}
@@ -364,9 +372,8 @@
if (packageInfo.packageMap == null) {
// Fall back to pub list-package-dirs.
PubPackageMapProvider pubPackageMapProvider =
- new PubPackageMapProvider(PhysicalResourceProvider.INSTANCE, sdk);
- file_system.Resource cwd =
- PhysicalResourceProvider.INSTANCE.getResource('.');
+ new PubPackageMapProvider(resourceProvider, sdk);
+ file_system.Resource cwd = resourceProvider.getResource('.');
PackageMapInfo packageMapInfo =
pubPackageMapProvider.computePackageMap(cwd);
Map<String, List<file_system.Folder>> packageMap =
@@ -376,8 +383,8 @@
// If it failed, that's not a problem; it simply means we have no way
// to resolve packages.
if (packageMapInfo.packageMap != null) {
- packageUriResolver = new PackageMapUriResolver(
- PhysicalResourceProvider.INSTANCE, packageMap);
+ packageUriResolver =
+ new PackageMapUriResolver(resourceProvider, packageMap);
}
}
}
@@ -388,7 +395,7 @@
// 'dart:' URIs come first.
// Setup embedding.
- EmbedderSdk embedderSdk = new EmbedderSdk(embedderMap);
+ EmbedderSdk embedderSdk = new EmbedderSdk(resourceProvider, embedderMap);
if (embedderSdk.libraryMap.size() == 0) {
// The embedder uri resolver has no mappings. Use the default Dart SDK
// uri resolver.
@@ -410,8 +417,7 @@
}
// Finally files.
- resolvers.add(
- new file_system.ResourceUriResolver(PhysicalResourceProvider.INSTANCE));
+ resolvers.add(new file_system.ResourceUriResolver(resourceProvider));
return new SourceFactory(resolvers, packageInfo.packages);
}
@@ -475,7 +481,7 @@
AnalyzeFunctionBodiesPredicate dietParsingPolicy =
_chooseDietParsingPolicy(options);
- setAnalysisContextOptions(_context, options,
+ setAnalysisContextOptions(resourceProvider, _context, options,
(AnalysisOptionsImpl contextOptions) {
contextOptions.analyzeFunctionBodiesPredicate = dietParsingPolicy;
});
@@ -546,8 +552,7 @@
packageMap = _PackageRootPackageMapBuilder
.buildPackageMap(options.packageRootPath);
} else {
- file_system.Resource cwd =
- PhysicalResourceProvider.INSTANCE.getResource('.');
+ file_system.Resource cwd = resourceProvider.getResource('.');
// Look for .packages.
packages = _discoverPackagespec(new Uri.directory(cwd.path));
packageMap = _getPackageMap(packages);
@@ -564,9 +569,7 @@
Map<String, List<file_system.Folder>> folderMap =
new Map<String, List<file_system.Folder>>();
packages.asMap().forEach((String packagePath, Uri uri) {
- folderMap[packagePath] = [
- PhysicalResourceProvider.INSTANCE.getFolder(path.fromUri(uri))
- ];
+ folderMap[packagePath] = [resourceProvider.getFolder(path.fromUri(uri))];
});
return folderMap;
}
@@ -654,6 +657,7 @@
}
static void setAnalysisContextOptions(
+ file_system.ResourceProvider resourceProvider,
AnalysisContext context,
CommandLineOptions options,
void configureContextOptions(AnalysisOptionsImpl contextOptions)) {
@@ -678,7 +682,7 @@
context.analysisOptions = contextOptions;
// Process analysis options file (and notify all interested parties).
- _processAnalysisOptions(context, options);
+ _processAnalysisOptions(resourceProvider, context, options);
}
/// Perform a deep comparison of two string maps.
@@ -694,21 +698,23 @@
return true;
}
- static file_system.File _getOptionsFile(CommandLineOptions options) {
+ static file_system.File _getOptionsFile(
+ file_system.ResourceProvider resourceProvider,
+ CommandLineOptions options) {
file_system.File file;
String filePath = options.analysisOptionsFile;
if (filePath != null) {
- file = PhysicalResourceProvider.INSTANCE.getFile(filePath);
+ file = resourceProvider.getFile(filePath);
if (!file.exists) {
printAndFail('Options file not found: $filePath',
exitCode: ErrorSeverity.ERROR.ordinal);
}
} else {
filePath = AnalysisEngine.ANALYSIS_OPTIONS_FILE;
- file = PhysicalResourceProvider.INSTANCE.getFile(filePath);
+ file = resourceProvider.getFile(filePath);
if (!file.exists) {
filePath = AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE;
- file = PhysicalResourceProvider.INSTANCE.getFile(filePath);
+ file = resourceProvider.getFile(filePath);
}
}
return file;
@@ -719,8 +725,10 @@
path.normalize(new File(sourcePath).absolute.path);
static void _processAnalysisOptions(
- AnalysisContext context, CommandLineOptions options) {
- file_system.File file = _getOptionsFile(options);
+ file_system.ResourceProvider resourceProvider,
+ AnalysisContext context,
+ CommandLineOptions options) {
+ file_system.File file = _getOptionsFile(resourceProvider, options);
List<OptionsProcessor> optionsProcessors =
AnalysisEngine.instance.optionsPlugin.optionsProcessors;
try {
diff --git a/pkg/analyzer_cli/test/build_mode_test.dart b/pkg/analyzer_cli/test/build_mode_test.dart
index 9c88a0f..5e16d95 100644
--- a/pkg/analyzer_cli/test/build_mode_test.dart
+++ b/pkg/analyzer_cli/test/build_mode_test.dart
@@ -4,6 +4,7 @@
library analyzer_cli.test.built_mode;
+import 'package:analyzer/file_system/memory_file_system.dart';
import 'package:analyzer_cli/src/build_mode.dart';
import 'package:analyzer_cli/src/driver.dart';
import 'package:analyzer_cli/src/options.dart';
@@ -17,6 +18,25 @@
defineReflectiveTests(WorkerLoopTest);
}
+typedef void _TestWorkerLoopAnalyze(CommandLineOptions options);
+
+/**
+ * [AnalyzerWorkerLoop] for testing.
+ */
+class TestAnalyzerWorkerLoop extends AnalyzerWorkerLoop {
+ final _TestWorkerLoopAnalyze _analyze;
+
+ TestAnalyzerWorkerLoop(SyncWorkerConnection connection, [this._analyze])
+ : super(new MemoryResourceProvider(), connection);
+
+ @override
+ void analyze(CommandLineOptions options) {
+ if (_analyze != null) {
+ _analyze(options);
+ }
+ }
+}
+
@reflectiveTest
class WorkerLoopTest {
final TestStdinSync stdinStream = new TestStdinSync();
@@ -30,16 +50,6 @@
void setUp() {}
- List<int> _serializeProto(GeneratedMessage message) {
- var buffer = message.writeToBuffer();
-
- var writer = new CodedBufferWriter();
- writer.writeInt32NoTag(buffer.length);
- writer.writeRawBytes(buffer);
-
- return writer.toBuffer();
- }
-
test_run() {
var request = new WorkRequest();
request.arguments.addAll([
@@ -119,23 +129,14 @@
stdinStream.close();
new TestAnalyzerWorkerLoop(connection).run();
}
-}
-typedef void _TestWorkerLoopAnalyze(CommandLineOptions options);
+ List<int> _serializeProto(GeneratedMessage message) {
+ var buffer = message.writeToBuffer();
-/**
- * [AnalyzerWorkerLoop] for testing.
- */
-class TestAnalyzerWorkerLoop extends AnalyzerWorkerLoop {
- final _TestWorkerLoopAnalyze _analyze;
+ var writer = new CodedBufferWriter();
+ writer.writeInt32NoTag(buffer.length);
+ writer.writeRawBytes(buffer);
- TestAnalyzerWorkerLoop(SyncWorkerConnection connection, [this._analyze])
- : super(connection);
-
- @override
- void analyze(CommandLineOptions options) {
- if (_analyze != null) {
- _analyze(options);
- }
+ return writer.toBuffer();
}
}
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 7f73dcc..bdda974 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -27,7 +27,6 @@
import 'compile_time_constants.dart';
import 'constants/values.dart';
import 'core_types.dart' show CoreClasses, CoreTypes;
-import 'dart_backend/dart_backend.dart' as dart_backend;
import 'dart_types.dart' show DartType, DynamicType, InterfaceType, Types;
import 'deferred_load.dart' show DeferredLoadTask;
import 'diagnostics/code_location.dart';
@@ -302,19 +301,13 @@
if (makeBackend != null) {
backend = makeBackend(this);
- } else if (options.emitJavaScript) {
+ } else {
js_backend.JavaScriptBackend jsBackend = new js_backend.JavaScriptBackend(
this,
generateSourceMap: options.generateSourceMap,
useStartupEmitter: options.useStartupEmitter,
useNewSourceInfo: options.useNewSourceInfo);
backend = jsBackend;
- } else {
- backend = new dart_backend.DartBackend(this, options.strips,
- multiFile: options.dart2dartMultiFile);
- if (options.dumpInfo) {
- throw new ArgumentError('--dump-info is not supported for dart2dart.');
- }
}
if (options.dumpInfo && options.useStartupEmitter) {
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 1b41be1..c4ab29f 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -115,8 +115,6 @@
List<String> explicitOutputArguments = <String>[];
bool wantHelp = false;
bool wantVersion = false;
- String outputLanguage = 'JavaScript';
- bool stripArgumentSet = false;
bool analyzeOnly = false;
bool analyzeAll = false;
bool resolveOnly = false;
@@ -173,20 +171,10 @@
optionsImplyCompilation.add(argument);
if (argument == '--output-type=dart' ||
argument == '--output-type=dart-multi') {
- outputLanguage = OUTPUT_LANGUAGE_DART;
- if (explicitOutputArguments.isNotEmpty) {
- out = currentDirectory.resolve('out.dart');
- sourceMapOut = currentDirectory.resolve('out.dart.map');
- }
- diagnosticHandler(
- null,
- null,
- null,
- "--output-type=dart is deprecated. It will remain available "
- "in Dart 1.11, but will be removed in Dart 1.12.",
- api.Diagnostic.WARNING);
+ helpAndFail(
+ "--output-type=dart is no longer supported. It was deprecated "
+ "since Dart 1.11 and removed in Dart 1.19.");
}
- passThrough(argument);
}
void setResolutionInput(String argument) {
@@ -208,14 +196,14 @@
return filenames.join("\n");
}
- void implyCompilation(String argument) {
+ implyCompilation(String argument) {
optionsImplyCompilation.add(argument);
passThrough(argument);
}
- void setStrip(String argument) {
- stripArgumentSet = true;
- implyCompilation(argument);
+ setStrip(String argument) {
+ helpAndFail("Option '--force-strip' is not in use now that"
+ "--output-type=dart is no longer supported.");
}
void setAnalyzeOnly(String argument) {
@@ -326,6 +314,7 @@
new OptionHandler(Flags.fatalWarnings, passThrough),
new OptionHandler(
Flags.suppressHints, (_) => diagnosticHandler.showHints = false),
+ // TODO(sigmund): remove entirely after Dart 1.20
new OptionHandler(
'--output-type=dart|--output-type=dart-multi|--output-type=js',
setOutputType),
@@ -370,7 +359,7 @@
new OptionHandler(Flags.disableTypeInference, implyCompilation),
new OptionHandler(Flags.terse, passThrough),
new OptionHandler('--deferred-map=.+', implyCompilation),
- new OptionHandler(Flags.dumpInfo, setDumpInfo),
+ new OptionHandler(Flags.dumpInfo, implyCompilation),
new OptionHandler(
'--disallow-unsafe-eval', (_) => hasDisallowUnsafeEval = true),
new OptionHandler(Option.showPackageWarnings, passThrough),
@@ -429,10 +418,6 @@
" '$precompiledName'.");
}
- if (outputLanguage != OUTPUT_LANGUAGE_DART && stripArgumentSet) {
- helpAndFail("Option '--force-strip' may only be used with "
- "'--output-type=dart'.");
- }
if (arguments.isEmpty) {
helpAndFail('No Dart file specified.');
}
@@ -487,10 +472,6 @@
"in combination with the '${Flags.analyzeOnly}' option.");
}
}
- if (dumpInfo && outputLanguage == OUTPUT_LANGUAGE_DART) {
- helpAndFail("Option '${Flags.dumpInfo}' is not supported in "
- "combination with the '--output-type=dart' option.");
- }
options.add('--out=$out');
options.add('--source-map=$sourceMapOut');
@@ -511,11 +492,11 @@
diagnosticHandler
.info('Compiled ${inputProvider.dartCharactersRead} characters Dart '
'-> ${outputProvider.totalCharactersWritten} characters '
- '$outputLanguage in '
+ 'JavaScript in '
'${relativize(currentDirectory, out, Platform.isWindows)}');
if (diagnosticHandler.verbose) {
String input = uriPathToNative(arguments[0]);
- print('Dart file ($input) compiled to $outputLanguage.');
+ print('Dart file ($input) compiled to JavaScript.');
print('Wrote the following files:');
for (String filename in outputProvider.allOutputFiles) {
print(" $filename");
@@ -523,7 +504,7 @@
} else if (explicitOutputArguments.isNotEmpty) {
String input = uriPathToNative(arguments[0]);
String output = relativize(currentDirectory, out, Platform.isWindows);
- print('Dart file ($input) compiled to $outputLanguage: $output');
+ print('Dart file ($input) compiled to JavaScript: $output');
}
return result;
}
@@ -672,9 +653,6 @@
The following options are only used for compiler development and may
be removed in a future version:
- --output-type=dart
- Output Dart code instead of JavaScript.
-
--throw-on-error
Throw an exception if a compile-time error is detected.
@@ -703,8 +681,6 @@
Generates an out.info.json file with information about the generated code.
You can inspect the generated file with the viewer at:
https://dart-lang.github.io/dump-info-visualizer/
- This feature is currently not supported in combination with the
- '--output-type=dart' option.
--generate-code-with-compile-time-errors
Generates output even if the program contains compile-time errors. Use the
diff --git a/pkg/compiler/lib/src/dart_backend/backend.dart b/pkg/compiler/lib/src/dart_backend/backend.dart
deleted file mode 100644
index c9d69ae..0000000
--- a/pkg/compiler/lib/src/dart_backend/backend.dart
+++ /dev/null
@@ -1,546 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart_backend;
-
-// TODO(ahe): This class is simply wrong. This backend should use
-// elements when it can, not AST nodes. Perhaps a [Map<Element,
-// TreeElements>] is what is needed.
-class ElementAst {
- final Node ast;
- final TreeElements treeElements;
-
- ElementAst(this.ast, this.treeElements);
-}
-
-class DartBackend extends Backend {
- final List<CompilerTask> tasks;
- final bool stripAsserts;
-
- bool get supportsReflection => true;
-
- // TODO(zarah) Maybe change this to a command-line option.
- // Right now, it is set by the tests.
- bool useMirrorHelperLibrary = false;
-
- /// Updated to a [MirrorRenamerImpl] instance if the [useMirrorHelperLibrary]
- /// field is set and mirror are needed.
- MirrorRenamer mirrorRenamer = const MirrorRenamer();
-
- final DartOutputter outputter;
-
- // Used in test.
- PlaceholderRenamer get placeholderRenamer => outputter.renamer;
- Map<ClassNode, List<Node>> get memberNodes => outputter.output.memberNodes;
-
- ConstantSystem get constantSystem {
- return constantCompilerTask.constantCompiler.constantSystem;
- }
-
- BackendConstantEnvironment get constants => constantCompilerTask;
-
- DartConstantTask constantCompilerTask;
-
- DartImpactTransformer impactTransformer;
-
- final Set<ClassElement> usedTypeLiterals = new Set<ClassElement>();
-
- /// The set of visible platform classes that are implemented by instantiated
- /// user classes.
- final Set<ClassElement> _userImplementedPlatformClasses =
- new Set<ClassElement>();
-
- bool enableCodegenWithErrorsIfSupported(Spannable node) {
- reporter.reportHintMessage(node, MessageKind.GENERIC, {
- 'text': "Generation of code with compile time errors is not "
- "supported for dart2dart."
- });
- return false;
- }
-
- /**
- * Tells whether it is safe to remove type declarations from variables,
- * functions parameters. It becomes not safe if:
- * 1) TypeError is used somewhere in the code,
- * 2) The code has typedefs in right hand side of IS checks,
- * 3) The code has classes which extend typedefs, have type arguments typedefs
- * or type variable bounds typedefs.
- * These restrictions can be less strict.
- */
- bool isSafeToRemoveTypeDeclarations(
- Map<ClassElement, Iterable<Element>> classMembers) {
- ClassElement typeErrorElement = compiler.coreLibrary.find('TypeError');
- if (classMembers.containsKey(typeErrorElement) ||
- compiler.resolverWorld.isChecks
- .any((DartType type) => type.element == typeErrorElement)) {
- return false;
- }
- Set<DartType> processedTypes = new Set<DartType>();
- List<DartType> workQueue = new List<DartType>();
- workQueue
- .addAll(classMembers.keys.map((classElement) => classElement.thisType));
- workQueue.addAll(compiler.resolverWorld.isChecks);
-
- while (!workQueue.isEmpty) {
- DartType type = workQueue.removeLast();
- if (processedTypes.contains(type)) continue;
- processedTypes.add(type);
- if (type is FunctionType) return false;
- if (type is TypedefType) return false;
- if (type is InterfaceType) {
- InterfaceType interfaceType = type;
- // Check all type arguments.
- interfaceType.typeArguments.forEach(workQueue.add);
- ClassElement element = type.element;
- // Check all supertypes.
- if (element.allSupertypes != null) {
- element.allSupertypes.forEach(workQueue.add);
- }
- }
- }
- return true;
- }
-
- DartBackend(Compiler compiler, List<String> strips, {bool multiFile})
- : tasks = <CompilerTask>[],
- stripAsserts = strips.indexOf('asserts') != -1,
- constantCompilerTask = new DartConstantTask(compiler),
- outputter = new DartOutputter(
- compiler.reporter, compiler.outputProvider,
- forceStripTypes: strips.indexOf('types') != -1,
- multiFile: multiFile,
- enableMinification: compiler.options.enableMinification),
- super(compiler) {
- impactTransformer = new DartImpactTransformer(this);
- }
-
- DiagnosticReporter get reporter => compiler.reporter;
-
- Resolution get resolution => compiler.resolution;
-
- bool classNeedsRti(ClassElement cls) => false;
- bool methodNeedsRti(FunctionElement function) => false;
-
- void enqueueHelpers(ResolutionEnqueuer world, Registry registry) {
- // Right now resolver doesn't always resolve interfaces needed
- // for literals, so force them. TODO(antonm): fix in the resolver.
- final LITERAL_TYPE_NAMES = const [
- 'Map',
- 'List',
- 'num',
- 'int',
- 'double',
- 'bool'
- ];
- final coreLibrary = compiler.coreLibrary;
- for (final name in LITERAL_TYPE_NAMES) {
- ClassElement classElement = coreLibrary.findLocal(name);
- classElement.ensureResolved(resolution);
- }
- // Enqueue the methods that the VM might invoke on user objects because
- // we don't trust the resolution to always get these included.
- world.registerDynamicUse(new DynamicUse(Selectors.toString_, null));
- world.registerDynamicUse(new DynamicUse(Selectors.hashCode_, null));
- world.registerDynamicUse(
- new DynamicUse(new Selector.binaryOperator('=='), null));
- world.registerDynamicUse(new DynamicUse(Selectors.compareTo, null));
- }
-
- WorldImpact codegen(CodegenWorkItem work) {
- return const WorldImpact();
- }
-
- /**
- * Tells whether we should output given element. Corelib classes like
- * Object should not be in the resulting code.
- */
- @override
- bool shouldOutput(Element element) {
- return (!element.library.isPlatformLibrary &&
- !element.isSynthesized &&
- element is! AbstractFieldElement) ||
- mirrorRenamer.isMirrorHelperLibrary(element.library);
- }
-
- int assembleProgram() {
- ElementAst computeElementAst(AstElement element) {
- return new ElementAst(
- element.resolvedAst.node, element.resolvedAst.elements);
- }
-
- // TODO(johnniwinther): Remove the need for this method.
- void postProcessElementAst(AstElement element, ElementAst elementAst,
- newTypedefElementCallback, newClassElementCallback) {
- ReferencedElementCollector collector = new ReferencedElementCollector(
- reporter,
- element,
- elementAst,
- newTypedefElementCallback,
- newClassElementCallback);
- collector.collect();
- }
-
- int totalSize = outputter.assembleProgram(
- libraries: compiler.libraryLoader.libraries,
- instantiatedClasses: compiler.resolverWorld.directlyInstantiatedClasses,
- resolvedElements: compiler.enqueuer.resolution.processedElements,
- usedTypeLiterals: usedTypeLiterals,
- postProcessElementAst: postProcessElementAst,
- computeElementAst: computeElementAst,
- shouldOutput: shouldOutput,
- isSafeToRemoveTypeDeclarations: isSafeToRemoveTypeDeclarations,
- sortElements: Elements.sortedByPosition,
- mirrorRenamer: mirrorRenamer,
- mainFunction: compiler.mainFunction,
- outputUri: compiler.options.outputUri);
-
- // Output verbose info about size ratio of resulting bundle to all
- // referenced non-platform sources.
- logResultBundleSizeInfo(outputter.libraryInfo.userLibraries,
- outputter.elementInfo.topLevelElements, totalSize);
-
- return totalSize;
- }
-
- void logResultBundleSizeInfo(Iterable<LibraryElement> userLibraries,
- Iterable<Element> topLevelElements, int totalOutputSize) {
- // Sum total size of scripts in each referenced library.
- int nonPlatformSize = 0;
- for (LibraryElement lib in userLibraries) {
- for (CompilationUnitElement compilationUnit in lib.compilationUnits) {
- nonPlatformSize += compilationUnit.script.file.length;
- }
- }
- int percentage = totalOutputSize * 100 ~/ nonPlatformSize;
- log('Total used non-platform files size: ${nonPlatformSize} bytes, '
- 'Output total size: $totalOutputSize bytes (${percentage}%)');
- }
-
- log(String message) => reporter.log('[DartBackend] $message');
-
- @override
- Future onLibrariesLoaded(LoadedLibraries loadedLibraries) {
- // All platform classes must be resolved to ensure that their member names
- // are preserved.
- loadedLibraries.forEachLibrary((LibraryElement library) {
- if (library.isPlatformLibrary) {
- library.forEachLocalMember((Element element) {
- if (element.isClass) {
- ClassElement classElement = element;
- classElement.ensureResolved(resolution);
- }
- });
- }
- });
- if (useMirrorHelperLibrary &&
- loadedLibraries.containsLibrary(Uris.dart_mirrors)) {
- return compiler.libraryLoader
- .loadLibrary(compiler.resolvedUriTranslator.translate(
- loadedLibraries.getLibrary(Uris.dart_mirrors),
- MirrorRenamerImpl.DART_MIRROR_HELPER,
- null))
- .then((LibraryElement library) {
- mirrorRenamer = new MirrorRenamerImpl(compiler, this, library);
- });
- }
- return new Future.value();
- }
-
- @override
- void registerStaticUse(Element element, Enqueuer enqueuer) {
- if (element == compiler.mirrorSystemGetNameFunction) {
- FunctionElement getNameFunction = mirrorRenamer.getNameFunction;
- if (getNameFunction != null) {
- enqueuer.addToWorkList(getNameFunction);
- }
- }
- }
-
- @override
- void registerInstantiatedType(
- InterfaceType type, Enqueuer enqueuer, Registry registry,
- {bool mirrorUsage: false}) {
- registerPlatformMembers(type, registerUse: registry.registerDynamicUse);
- super.registerInstantiatedType(type, enqueuer, registry,
- mirrorUsage: mirrorUsage);
- }
-
- /// Register dynamic access of members of [type] that implement members
- /// of types defined in the platform libraries.
- void registerPlatformMembers(InterfaceType type,
- {void registerUse(DynamicUse dynamicUse)}) {
- // Without patching, dart2dart has no way of performing sound tree-shaking
- // in face external functions. Therefore we employ another scheme:
- //
- // Based on the assumption that the platform code only relies on the
- // interfaces of it's own classes, we can approximate the semantics of
- // external functions by eagerly registering dynamic invocation of instance
- // members defined the platform interfaces.
- //
- // Since we only need to generate code for non-platform classes we can
- // restrict this registration to platform interfaces implemented by
- // instantiated non-platform classes.
- //
- // Consider for instance this program:
- //
- // import 'dart:math' show Random;
- //
- // class MyRandom implements Random {
- // int nextInt() => 0;
- // }
- //
- // main() {
- // print([0, 1, 2].shuffle(new MyRandom()));
- // }
- //
- // Here `MyRandom` is a subtype if `Random` defined in 'dart:math'. By the
- // assumption, all methods defined `Random` are potentially called, and
- // therefore, though there are no visible call sites from the user node,
- // dynamic invocation of for instance `nextInt` should be registered. In
- // this case, `nextInt` is actually called by the standard implementation of
- // `shuffle`.
-
- ClassElement cls = type.element;
- if (!cls.library.isPlatformLibrary) {
- for (Link<DartType> link = cls.allSupertypes;
- !link.isEmpty;
- link = link.tail) {
- InterfaceType supertype = link.head;
- ClassElement superclass = supertype.element;
- LibraryElement library = superclass.library;
- if (library.isPlatformLibrary) {
- if (_userImplementedPlatformClasses.add(superclass)) {
- // Register selectors for all instance methods since these might
- // be called on user classes from within the platform
- // implementation.
- superclass.forEachLocalMember((MemberElement element) {
- if (element.isConstructor || element.isStatic) return;
-
- element.computeType(resolution);
- Selector selector = new Selector.fromElement(element);
- registerUse(new DynamicUse(selector, null));
- });
- }
- }
- }
- }
- }
-
- @override
- bool enableDeferredLoadingIfSupported(Spannable node, Registry registry) {
- // TODO(sigurdm): Implement deferred loading for dart2dart.
- reporter.reportWarningMessage(
- node, MessageKind.DEFERRED_LIBRARY_DART_2_DART);
- return false;
- }
-
- @override
- Uri resolvePatchUri(String libraryName, Uri) {
- // Dart2dart does not use patches.
- return null;
- }
-}
-
-class DartImpactTransformer extends ImpactTransformer {
- final DartBackend backend;
-
- DartImpactTransformer(this.backend);
-
- @override
- WorldImpact transformResolutionImpact(ResolutionImpact worldImpact) {
- TransformedWorldImpact transformed =
- new TransformedWorldImpact(worldImpact);
- for (TypeUse typeUse in worldImpact.typeUses) {
- if (typeUse.kind == TypeUseKind.TYPE_LITERAL &&
- typeUse.type.isInterfaceType) {
- backend.usedTypeLiterals.add(typeUse.type.element);
- }
- if (typeUse.kind == TypeUseKind.INSTANTIATION) {
- backend.registerPlatformMembers(typeUse.type,
- registerUse: transformed.registerDynamicUse);
- }
- }
- return transformed;
- }
-}
-
-class EmitterUnparser extends Unparser {
- final Map<Node, String> renames;
-
- EmitterUnparser(this.renames, {bool minify, bool stripTypes})
- : super(minify: minify, stripTypes: stripTypes);
-
- visit(Node node) {
- if (node != null && renames.containsKey(node)) {
- write(renames[node]);
- } else {
- super.visit(node);
- }
- }
-
- unparseSendReceiver(Send node, {bool spacesNeeded: false}) {
- // TODO(smok): Remove ugly hack for library prefices.
- if (node.receiver != null && renames[node.receiver] == '') return;
- super.unparseSendReceiver(node, spacesNeeded: spacesNeeded);
- }
-
- unparseFunctionName(Node name) {
- if (name != null && renames.containsKey(name)) {
- write(renames[name]);
- } else {
- super.unparseFunctionName(name);
- }
- }
-}
-
-/**
- * Some elements are not recorded by resolver now,
- * for example, typedefs or classes which are only
- * used in signatures, as/is operators or in super clauses
- * (just to name a few). Retraverse AST to pick those up.
- */
-class ReferencedElementCollector extends Visitor {
- final DiagnosticReporter reporter;
- final Element element;
- final ElementAst elementAst;
- final newTypedefElementCallback;
- final newClassElementCallback;
-
- ReferencedElementCollector(this.reporter, this.element, this.elementAst,
- this.newTypedefElementCallback, this.newClassElementCallback);
-
- visitNode(Node node) {
- node.visitChildren(this);
- }
-
- visitTypeAnnotation(TypeAnnotation typeAnnotation) {
- TreeElements treeElements = elementAst.treeElements;
- final DartType type = treeElements.getType(typeAnnotation);
- assert(invariant(typeAnnotation, type != null,
- message: "Missing type for type annotation: $treeElements."));
- if (type.isTypedef) newTypedefElementCallback(type.element);
- if (type.isInterfaceType) newClassElementCallback(type.element);
- typeAnnotation.visitChildren(this);
- }
-
- void collect() {
- reporter.withCurrentElement(element, () {
- elementAst.ast.accept(this);
- });
- }
-}
-
-Comparator compareBy(f) => (x, y) => f(x).compareTo(f(y));
-
-List sorted(Iterable l, comparison) {
- final result = new List.from(l);
- result.sort(comparison);
- return result;
-}
-
-compareElements(e0, e1) {
- int result = compareBy((e) => e.library.canonicalUri.toString())(e0, e1);
- if (result != 0) return result;
- return compareBy((e) => e.position.charOffset)(e0, e1);
-}
-
-/// [ConstantCompilerTask] for compilation of constants for the Dart backend.
-///
-/// Since this task needs no distinction between frontend and backend constants
-/// it also serves as the [BackendConstantEnvironment].
-class DartConstantTask extends ConstantCompilerTask
- implements BackendConstantEnvironment {
- final DartConstantCompiler constantCompiler;
-
- DartConstantTask(Compiler compiler)
- : this.constantCompiler = new DartConstantCompiler(compiler),
- super(compiler.measurer);
-
- String get name => 'ConstantHandler';
-
- @override
- ConstantSystem get constantSystem => constantCompiler.constantSystem;
-
- @override
- bool hasConstantValue(ConstantExpression expression) {
- return constantCompiler.hasConstantValue(expression);
- }
-
- @override
- ConstantValue getConstantValue(ConstantExpression expression) {
- return constantCompiler.getConstantValue(expression);
- }
-
- @override
- ConstantValue getConstantValueForVariable(VariableElement element) {
- return constantCompiler.getConstantValueForVariable(element);
- }
-
- @override
- ConstantExpression getConstantForNode(Node node, TreeElements elements) {
- return constantCompiler.getConstantForNode(node, elements);
- }
-
- @override
- ConstantValue getConstantValueForNode(Node node, TreeElements elements) {
- return getConstantValue(
- constantCompiler.getConstantForNode(node, elements));
- }
-
- @override
- ConstantValue getConstantValueForMetadata(MetadataAnnotation metadata) {
- return getConstantValue(metadata.constant);
- }
-
- @override
- ConstantExpression compileConstant(VariableElement element) {
- return measure(() {
- return constantCompiler.compileConstant(element);
- });
- }
-
- @override
- void evaluate(ConstantExpression constant) {
- return measure(() {
- return constantCompiler.evaluate(constant);
- });
- }
-
- @override
- ConstantExpression compileVariable(VariableElement element) {
- return measure(() {
- return constantCompiler.compileVariable(element);
- });
- }
-
- @override
- ConstantExpression compileNode(Node node, TreeElements elements,
- {bool enforceConst: true}) {
- return measure(() {
- return constantCompiler.compileNodeWithDefinitions(node, elements,
- isConst: enforceConst);
- });
- }
-
- @override
- ConstantExpression compileMetadata(
- MetadataAnnotation metadata, Node node, TreeElements elements) {
- return measure(() {
- return constantCompiler.compileMetadata(metadata, node, elements);
- });
- }
-
- // TODO(johnniwinther): Remove this when values are computed from the
- // expressions.
- @override
- void copyConstantValues(DartConstantTask task) {
- constantCompiler.constantValueMap
- .addAll(task.constantCompiler.constantValueMap);
- }
-
- @override
- void registerLazyStatic(FieldElement element) {
- // Do nothing.
- }
-}
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
deleted file mode 100644
index fd7a45f..0000000
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library backend_ast_emitter;
-
-import 'backend_ast_nodes.dart';
-import '../dart_types.dart';
-import '../elements/elements.dart';
-
-class TypeGenerator {
- /// TODO(johnniwinther): Remove this when issue 21283 has been resolved.
- static int pseudoNameCounter = 0;
-
- static Parameter emitParameter(DartType type,
- {String name, Element element}) {
- if (name == null && element != null) {
- name = element.name;
- }
- if (name == null) {
- name = '_${pseudoNameCounter++}';
- }
- Parameter parameter;
- if (type.isFunctionType) {
- FunctionType functionType = type;
- TypeAnnotation returnType = createOptionalType(functionType.returnType);
- Parameters innerParameters = createParametersFromType(functionType);
- parameter = new Parameter.function(name, returnType, innerParameters);
- } else {
- TypeAnnotation typeAnnotation = createOptionalType(type);
- parameter = new Parameter(name, type: typeAnnotation);
- }
- parameter.element = element;
- return parameter;
- }
-
- static Parameters createParametersFromType(FunctionType functionType) {
- pseudoNameCounter = 0;
- if (functionType.namedParameters.isEmpty) {
- return new Parameters(createParameters(functionType.parameterTypes),
- createParameters(functionType.optionalParameterTypes), false);
- } else {
- return new Parameters(
- createParameters(functionType.parameterTypes),
- createParameters(functionType.namedParameterTypes,
- names: functionType.namedParameters),
- true);
- }
- }
-
- static List<Parameter> createParameters(Iterable<DartType> parameterTypes,
- {Iterable<String> names: const <String>[],
- Iterable<Element> elements: const <Element>[]}) {
- Iterator<String> name = names.iterator;
- Iterator<Element> element = elements.iterator;
- return parameterTypes.map((DartType type) {
- name.moveNext();
- element.moveNext();
- return emitParameter(type, name: name.current, element: element.current);
- }).toList();
- }
-
- /// Like [createTypeAnnotation] except the dynamic type is converted to null.
- static TypeAnnotation createOptionalType(DartType type) {
- if (type.treatAsDynamic) {
- return null;
- } else {
- return createType(type);
- }
- }
-
- /// Creates the [TypeAnnotation] for a [type] that is not function type.
- static TypeAnnotation createType(DartType type) {
- if (type is GenericType) {
- if (type.treatAsRaw) {
- return new TypeAnnotation(type.element.name)..dartType = type;
- }
- return new TypeAnnotation(type.element.name,
- type.typeArguments.map(createType).toList(growable: false))
- ..dartType = type;
- } else if (type is VoidType) {
- return new TypeAnnotation('void')..dartType = type;
- } else if (type is TypeVariableType) {
- return new TypeAnnotation(type.name)..dartType = type;
- } else if (type is DynamicType) {
- return new TypeAnnotation("dynamic")..dartType = type;
- } else if (type is MalformedType) {
- return new TypeAnnotation(type.name)..dartType = type;
- } else {
- throw "Unsupported type annotation: $type";
- }
- }
-}
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
deleted file mode 100644
index 1c8abd0..0000000
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
+++ /dev/null
@@ -1,1556 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library backend_ast_nodes;
-
-import '../constants/values.dart' as values;
-import '../dart_types.dart' as types;
-import '../elements/elements.dart' as elements;
-import '../tree/tree.dart' as tree;
-import '../util/characters.dart' as characters;
-
-/// The following nodes correspond to [tree.Send] expressions:
-/// [FieldExpression], [IndexExpression], [Assignment], [Increment],
-/// [CallFunction], [CallMethod], [CallNew], [CallStatic], [UnaryOperator],
-/// [BinaryOperator], and [TypeOperator].
-abstract class Node {}
-
-/// Receiver is an [Expression] or the [SuperReceiver].
-abstract class Receiver extends Node {}
-
-/// Argument is an [Expression] or a [NamedArgument].
-abstract class Argument extends Node {}
-
-abstract class Expression extends Node implements Receiver, Argument {
- bool get assignable => false;
-}
-
-abstract class RootNode extends Node {
- elements.Element get element;
-}
-
-class FieldDefinition extends RootNode {
- final elements.Element element;
- final Expression initializer;
- FieldDefinition(this.element, this.initializer);
-}
-
-abstract class Statement extends Node {}
-
-/// Used as receiver in expressions that dispatch to the super class.
-/// For instance, an expression such as `super.f()` is represented
-/// by a [CallMethod] node with [SuperReceiver] as its receiver.
-class SuperReceiver extends Receiver {
- static final SuperReceiver _instance = new SuperReceiver._create();
-
- factory SuperReceiver() => _instance;
- SuperReceiver._create();
-}
-
-/// Named arguments may occur in the argument list of
-/// [CallFunction], [CallMethod], [CallNew], and [CallStatic].
-class NamedArgument extends Argument {
- final String name;
- final Expression expression;
-
- NamedArgument(this.name, this.expression);
-}
-
-class TypeAnnotation extends Node {
- final String name;
- final List<TypeAnnotation> typeArguments;
-
- types.DartType dartType;
-
- TypeAnnotation(this.name, [this.typeArguments = const <TypeAnnotation>[]]);
-}
-
-// STATEMENTS
-
-class Block extends Statement {
- final List<Statement> statements;
-
- Block(this.statements);
-}
-
-class Break extends Statement {
- final String label;
-
- Break([this.label]);
-}
-
-class Continue extends Statement {
- final String label;
-
- Continue([this.label]);
-}
-
-class EmptyStatement extends Statement {
- static final EmptyStatement _instance = new EmptyStatement._create();
-
- factory EmptyStatement() => _instance;
- EmptyStatement._create();
-}
-
-class ExpressionStatement extends Statement {
- final Expression expression;
-
- ExpressionStatement(this.expression);
-}
-
-class For extends Statement {
- final Node initializer;
- final Expression condition;
- final List<Expression> updates;
- final Statement body;
-
- /// Initializer must be [VariableDeclarations] or [Expression] or null.
- For(this.initializer, this.condition, this.updates, this.body) {
- assert(initializer == null ||
- initializer is VariableDeclarations ||
- initializer is Expression);
- }
-}
-
-class ForIn extends Statement {
- final Node leftHandValue;
- final Expression expression;
- final Statement body;
-
- /// [leftHandValue] must be [Identifier] or [VariableDeclarations] with
- /// exactly one definition, and that variable definition must have no
- /// initializer.
- ForIn(Node leftHandValue, this.expression, this.body)
- : this.leftHandValue = leftHandValue {
- assert(leftHandValue is Identifier ||
- (leftHandValue is VariableDeclarations &&
- leftHandValue.declarations.length == 1 &&
- leftHandValue.declarations[0].initializer == null));
- }
-}
-
-class While extends Statement {
- final Expression condition;
- final Statement body;
-
- While(this.condition, this.body);
-}
-
-class DoWhile extends Statement {
- final Statement body;
- final Expression condition;
-
- DoWhile(this.body, this.condition);
-}
-
-class If extends Statement {
- final Expression condition;
- final Statement thenStatement;
- final Statement elseStatement;
-
- If(this.condition, this.thenStatement, [this.elseStatement]);
-}
-
-class LabeledStatement extends Statement {
- final String label;
- final Statement statement;
-
- LabeledStatement(this.label, this.statement);
-}
-
-class Rethrow extends Statement {}
-
-class Return extends Statement {
- final Expression expression;
-
- Return([this.expression]);
-}
-
-class Switch extends Statement {
- final Expression expression;
- final List<SwitchCase> cases;
-
- Switch(this.expression, this.cases);
-}
-
-/// A sequence of case clauses followed by a sequence of statements.
-/// Represents the default case if [expressions] is null.
-///
-/// NOTE:
-/// Control will never fall through to the following SwitchCase, even if
-/// the list of statements is empty. An empty list of statements will be
-/// unparsed to a semicolon to guarantee this behaviour.
-class SwitchCase extends Node {
- final List<Expression> expressions;
- final List<Statement> statements;
-
- SwitchCase(this.expressions, this.statements);
- SwitchCase.defaultCase(this.statements) : expressions = null;
-
- bool get isDefaultCase => expressions == null;
-}
-
-/// A try statement. The try, catch and finally blocks will automatically
-/// be printed inside a block statement if necessary.
-class Try extends Statement {
- final Statement tryBlock;
- final List<CatchBlock> catchBlocks;
- final Statement finallyBlock;
-
- Try(this.tryBlock, this.catchBlocks, [this.finallyBlock]) {
- assert(catchBlocks.length > 0 || finallyBlock != null);
- }
-}
-
-class CatchBlock extends Node {
- final TypeAnnotation onType;
- final VariableDeclaration exceptionVar;
- final VariableDeclaration stackVar;
- final Statement body;
-
- /// At least onType or exceptionVar must be given.
- /// stackVar may only be given if exceptionVar is also given.
- CatchBlock(this.body, {this.onType, this.exceptionVar, this.stackVar}) {
- // Must specify at least a type or an exception binding.
- assert(onType != null || exceptionVar != null);
-
- // We cannot bind the stack trace without binding the exception too.
- assert(stackVar == null || exceptionVar != null);
- }
-}
-
-class VariableDeclarations extends Statement {
- final TypeAnnotation type;
- final bool isFinal;
- final bool isConst;
- final List<VariableDeclaration> declarations;
-
- VariableDeclarations(this.declarations,
- {this.type, this.isFinal: false, this.isConst: false}) {
- // Cannot be both final and const.
- assert(!isFinal || !isConst);
- }
-}
-
-class VariableDeclaration extends Node {
- final String name;
- final Expression initializer;
-
- elements.Element element;
-
- VariableDeclaration(this.name, [this.initializer]);
-}
-
-class FunctionDeclaration extends Statement {
- final FunctionExpression function;
-
- TypeAnnotation get returnType => function.returnType;
- Parameters get parameters => function.parameters;
- String get name => function.name;
- Statement get body => function.body;
-
- FunctionDeclaration(this.function);
-}
-
-class Parameters extends Node {
- final List<Parameter> requiredParameters;
- final List<Parameter> optionalParameters;
- final bool hasNamedParameters;
-
- Parameters(this.requiredParameters,
- [this.optionalParameters, this.hasNamedParameters = false]);
-
- Parameters.named(this.requiredParameters, this.optionalParameters)
- : hasNamedParameters = true;
-
- Parameters.positional(this.requiredParameters, this.optionalParameters)
- : hasNamedParameters = false;
-
- bool get hasOptionalParameters =>
- optionalParameters != null && optionalParameters.length > 0;
-}
-
-class Parameter extends Node {
- final String name;
-
- /// Type of parameter, or return type of function parameter.
- final TypeAnnotation type;
-
- Expression defaultValue;
-
- /// Parameters to function parameter. Null for non-function parameters.
- final Parameters parameters;
-
- elements.FormalElement element;
-
- Parameter(this.name, {this.type, this.defaultValue}) : parameters = null;
-
- Parameter.function(this.name, TypeAnnotation returnType, this.parameters,
- [this.defaultValue])
- : type = returnType {
- assert(parameters != null);
- }
-
- /// True if this is a function parameter.
- bool get isFunction => parameters != null;
-}
-
-// EXPRESSIONS
-
-abstract class Initializer extends Expression {}
-
-class FieldInitializer extends Initializer {
- final elements.FieldElement element;
- final Expression body;
-
- FieldInitializer(this.element, this.body);
-}
-
-class SuperInitializer extends Initializer {
- final elements.ConstructorElement target;
- final List<Argument> arguments;
-
- SuperInitializer(this.target, this.arguments);
-}
-
-class FunctionExpression extends Expression implements RootNode {
- final TypeAnnotation returnType;
- String name;
- final Parameters parameters;
- final Statement body;
- final bool isGetter;
- final bool isSetter;
-
- elements.FunctionElement element;
-
- FunctionExpression(this.parameters, this.body,
- {this.name,
- this.returnType,
- this.isGetter: false,
- this.isSetter: false}) {
- // Function must have a name if it has a return type
- assert(returnType == null || name != null);
- }
-}
-
-class ConstructorDefinition extends FunctionExpression {
- final List<Initializer> initializers;
- final bool isConst;
-
- ConstructorDefinition(Parameters parameters, Statement body,
- this.initializers, String name, this.isConst)
- : super(parameters, body, name: name);
-}
-
-class Conditional extends Expression {
- final Expression condition;
- final Expression thenExpression;
- final Expression elseExpression;
-
- Conditional(this.condition, this.thenExpression, this.elseExpression);
-}
-
-/// An identifier expression.
-/// The unparser does not concern itself with scoping rules, and it is the
-/// responsibility of the AST creator to ensure that the identifier resolves
-/// to the proper definition.
-/// For the time being, this class is also used to reference static fields and
-/// top-level variables that are qualified with a class and/or library name,
-/// assuming the [element] is set. This is likely to change when the old backend
-/// is replaced.
-class Identifier extends Expression {
- final String name;
-
- elements.Element element;
-
- Identifier(this.name);
-
- bool get assignable => true;
-}
-
-class Literal extends Expression {
- final values.PrimitiveConstantValue value;
-
- Literal(this.value);
-}
-
-class LiteralList extends Expression {
- final bool isConst;
- final TypeAnnotation typeArgument;
- final List<Expression> values;
-
- LiteralList(this.values, {this.typeArgument, this.isConst: false});
-}
-
-class LiteralMap extends Expression {
- final bool isConst;
- final List<TypeAnnotation> typeArguments;
- final List<LiteralMapEntry> entries;
-
- LiteralMap(this.entries, {this.typeArguments, this.isConst: false}) {
- assert(this.typeArguments == null ||
- this.typeArguments.length == 0 ||
- this.typeArguments.length == 2);
- }
-}
-
-class LiteralMapEntry extends Node {
- final Expression key;
- final Expression value;
-
- LiteralMapEntry(this.key, this.value);
-}
-
-class LiteralSymbol extends Expression {
- final String id;
-
- /// [id] should not include the # symbol
- LiteralSymbol(this.id);
-}
-
-/// A type literal. This is distinct from [Identifier] since the unparser
-/// needs to this distinguish a static invocation from a method invocation
-/// on a type literal.
-class LiteralType extends Expression {
- final String name;
-
- types.DartType type;
-
- LiteralType(this.name);
-}
-
-/// Reference to a type variable.
-/// This is distinct from [Identifier] since the unparser needs to this
-/// distinguish a function invocation `T()` from a type variable invocation
-/// `(T)()` (the latter is invalid, but must be generated anyway).
-class ReifyTypeVar extends Expression {
- final String name;
-
- elements.TypeVariableElement element;
-
- ReifyTypeVar(this.name);
-}
-
-/// StringConcat is used in place of string interpolation and juxtaposition.
-/// Semantically, each subexpression is evaluated and converted to a string
-/// by `toString()`. These string are then concatenated and returned.
-/// StringConcat unparses to a string literal, possibly with interpolations.
-/// The unparser will flatten nested StringConcats.
-/// A StringConcat node may have any number of children, including zero and one.
-class StringConcat extends Expression {
- final List<Expression> expressions;
-
- StringConcat(this.expressions);
-}
-
-/// Expression of form `e.f`.
-class FieldExpression extends Expression {
- final Receiver object;
- final String fieldName;
-
- FieldExpression(this.object, this.fieldName);
-
- bool get assignable => true;
-}
-
-/// Expression of form `e1[e2]`.
-class IndexExpression extends Expression {
- final Receiver object;
- final Expression index;
-
- IndexExpression(this.object, this.index);
-
- bool get assignable => true;
-}
-
-/// Expression of form `e(..)`
-/// Note that if [callee] is a [FieldExpression] this will translate into
-/// `(e.f)(..)` and not `e.f(..)`. Use a [CallMethod] to generate
-/// the latter type of expression.
-class CallFunction extends Expression {
- final Expression callee;
- final List<Argument> arguments;
-
- CallFunction(this.callee, this.arguments);
-}
-
-/// Expression of form `e.f(..)`.
-class CallMethod extends Expression {
- final Receiver object;
- final String methodName;
- final List<Argument> arguments;
-
- CallMethod(this.object, this.methodName, this.arguments);
-}
-
-/// Expression of form `new T(..)`, `new T.f(..)`, `const T(..)`,
-/// or `const T.f(..)`.
-class CallNew extends Expression {
- final bool isConst;
- final TypeAnnotation type;
- final String constructorName;
- final List<Argument> arguments;
-
- elements.FunctionElement constructor;
- types.DartType dartType;
-
- CallNew(this.type, this.arguments,
- {this.constructorName, this.isConst: false});
-}
-
-/// Expression of form `T.f(..)`.
-class CallStatic extends Expression {
- final String className;
- final String methodName;
- final List<Argument> arguments;
-
- elements.Element element;
-
- CallStatic(this.className, this.methodName, this.arguments);
-}
-
-/// Expression of form `!e` or `-e` or `~e`.
-class UnaryOperator extends Expression {
- final String operatorName;
- final Receiver operand;
-
- UnaryOperator(this.operatorName, this.operand) {
- assert(isUnaryOperator(operatorName));
- }
-}
-
-/// Expression of form `e1 + e2`, `e1 - e2`, etc.
-/// This node also represents application of the logical operators && and ||.
-class BinaryOperator extends Expression {
- final Receiver left;
- final String operator;
- final Expression right;
-
- BinaryOperator(this.left, this.operator, this.right) {
- assert(isBinaryOperator(operator));
- }
-}
-
-/// Expression of form `e is T` or `e is! T` or `e as T`.
-class TypeOperator extends Expression {
- final Expression expression;
- final String operator;
- final TypeAnnotation type;
-
- TypeOperator(this.expression, this.operator, this.type) {
- assert(operator == 'is' || operator == 'as' || operator == 'is!');
- }
-}
-
-class Increment extends Expression {
- final Expression expression;
- final String operator;
- final bool isPrefix;
-
- Increment(this.expression, this.operator, this.isPrefix) {
- assert(operator == '++' || operator == '--');
- assert(expression.assignable);
- }
-
- Increment.prefix(Expression expression, String operator)
- : this(expression, operator, true);
-
- Increment.postfix(Expression expression, String operator)
- : this(expression, operator, false);
-}
-
-class Assignment extends Expression {
- static final _operators = new Set.from([
- '=',
- '|=',
- '^=',
- '&=',
- '<<=',
- '>>=',
- '+=',
- '-=',
- '*=',
- '/=',
- '%=',
- '~/='
- ]);
-
- final Expression left;
- final String operator;
- final Expression right;
-
- Assignment(this.left, this.operator, this.right) {
- assert(_operators.contains(operator));
- assert(left.assignable);
- }
-}
-
-class Throw extends Expression {
- final Expression expression;
-
- Throw(this.expression);
-}
-
-class This extends Expression {
- static final This _instance = new This._create();
-
- factory This() => _instance;
- This._create();
-}
-
-// UNPARSER
-
-bool isUnaryOperator(String op) {
- return op == '!' || op == '-' || op == '~';
-}
-
-bool isBinaryOperator(String op) {
- return BINARY_PRECEDENCE.containsKey(op);
-}
-
-/// True if the given operator can be converted to a compound assignment.
-bool isCompoundableOperator(String op) {
- switch (BINARY_PRECEDENCE[op]) {
- case BITWISE_OR:
- case BITWISE_XOR:
- case BITWISE_AND:
- case SHIFT:
- case ADDITIVE:
- case MULTIPLICATIVE:
- return true;
- default:
- return false;
- }
-}
-
-// Precedence levels
-const int EXPRESSION = 1;
-const int CONDITIONAL = 2;
-const int LOGICAL_OR = 3;
-const int LOGICAL_AND = 4;
-const int EQUALITY = 6;
-const int RELATIONAL = 7;
-const int BITWISE_OR = 8;
-const int BITWISE_XOR = 9;
-const int BITWISE_AND = 10;
-const int SHIFT = 11;
-const int ADDITIVE = 12;
-const int MULTIPLICATIVE = 13;
-const int UNARY = 14;
-const int POSTFIX_INCREMENT = 15;
-const int TYPE_LITERAL = 19;
-const int PRIMARY = 20;
-
-/// Precedence level required for the callee in a [FunctionCall].
-const int CALLEE = 21;
-
-const Map<String, int> BINARY_PRECEDENCE = const {
- '&&': LOGICAL_AND,
- '||': LOGICAL_OR,
- '==': EQUALITY,
- '!=': EQUALITY,
- '>': RELATIONAL,
- '>=': RELATIONAL,
- '<': RELATIONAL,
- '<=': RELATIONAL,
- '|': BITWISE_OR,
- '^': BITWISE_XOR,
- '&': BITWISE_AND,
- '>>': SHIFT,
- '<<': SHIFT,
- '+': ADDITIVE,
- '-': ADDITIVE,
- '*': MULTIPLICATIVE,
- '%': MULTIPLICATIVE,
- '/': MULTIPLICATIVE,
- '~/': MULTIPLICATIVE,
-};
-
-/// Return true if binary operators with the given precedence level are
-/// (left) associative. False if they are non-associative.
-bool isAssociativeBinaryOperator(int precedence) {
- return precedence != EQUALITY && precedence != RELATIONAL;
-}
-
-/// True if [x] is a letter, digit, or underscore.
-/// Such characters may not follow a shorthand string interpolation.
-bool isIdentifierPartNoDollar(dynamic x) {
- if (x is! int) {
- return false;
- }
- return (characters.$0 <= x && x <= characters.$9) ||
- (characters.$A <= x && x <= characters.$Z) ||
- (characters.$a <= x && x <= characters.$z) ||
- (x == characters.$_);
-}
-
-/// The unparser will apply the following syntactic rewritings:
-/// Use short-hand function returns:
-/// foo(){return E} ==> foo() => E;
-/// Remove empty else branch:
-/// if (E) S else ; ==> if (E) S
-/// Flatten nested blocks:
-/// {S; {S; S}; S} ==> {S; S; S; S}
-/// Remove empty statements from block:
-/// {S; ; S} ==> {S; S}
-/// Unfold singleton blocks:
-/// {S} ==> S
-/// Empty block to empty statement:
-/// {} ==> ;
-/// Introduce not-equals operator:
-/// !(E == E) ==> E != E
-/// Introduce is-not operator:
-/// !(E is T) ==> E is!T
-///
-/// The following transformations will NOT be applied here:
-/// Use implicit this:
-/// this.foo ==> foo (preconditions too complex for unparser)
-/// Merge adjacent variable definitions:
-/// var x; var y ==> var x,y; (hoisting will be done elsewhere)
-/// Merge adjacent labels:
-/// foo: bar: S ==> foobar: S (scoping is categorically ignored)
-///
-/// The following transformations might be applied here in the future:
-/// Use implicit dynamic types:
-/// dynamic x = E ==> var x = E
-/// <dynamic>[] ==> []
-class Unparser {
- StringSink output;
-
- Unparser(this.output);
-
- void write(String s) {
- output.write(s);
- }
-
- /// Outputs each element from [items] separated by [separator].
- /// The actual printing must be performed by the [callback].
- void writeEach(String separator, Iterable items, void callback(any)) {
- bool first = true;
- for (var x in items) {
- if (first) {
- first = false;
- } else {
- write(separator);
- }
- callback(x);
- }
- }
-
- void writeOperator(String operator) {
- write(" ");
- write(operator);
- write(" ");
- }
-
- /// Unfolds singleton blocks and returns the inner statement.
- /// If an empty block is found, the [EmptyStatement] is returned instead.
- Statement unfoldBlocks(Statement stmt) {
- while (stmt is Block && stmt.statements.length == 1) {
- Statement inner = (stmt as Block).statements[0];
- if (definesVariable(inner)) {
- return stmt; // Do not unfold block with lexical scope.
- }
- stmt = inner;
- }
- if (stmt is Block && stmt.statements.length == 0)
- return new EmptyStatement();
- return stmt;
- }
-
- void writeArgument(Argument arg) {
- if (arg is NamedArgument) {
- write(arg.name);
- write(':');
- writeExpression(arg.expression);
- } else {
- writeExpression(arg);
- }
- }
-
- /// Prints the expression [e].
- void writeExpression(Expression e) {
- writeExp(e, EXPRESSION);
- }
-
- /// Prints [e] as an expression with precedence of at least [minPrecedence],
- /// using parentheses if necessary to raise the precedence level.
- /// Abusing terminology slightly, the function accepts a [Receiver] which
- /// may also be the [SuperReceiver] object.
- void writeExp(Receiver e, int minPrecedence, {beginStmt: false}) {
- void withPrecedence(int actual, void action()) {
- if (actual < minPrecedence) {
- write("(");
- beginStmt = false;
- action();
- write(")");
- } else {
- action();
- }
- }
- if (e is SuperReceiver) {
- write('super');
- } else if (e is FunctionExpression) {
- assert(!e.isGetter && !e.isSetter);
- Statement stmt = unfoldBlocks(e.body);
- int precedence = stmt is Return ? EXPRESSION : PRIMARY;
- withPrecedence(precedence, () {
- // A named function expression at the beginning of a statement
- // can be mistaken for a function declaration.
- // (Note: Functions with a return type also have a name)
- bool needParen = beginStmt && e.name != null;
- if (needParen) {
- write('(');
- }
- if (e.returnType != null) {
- writeType(e.returnType);
- write(' ');
- }
- if (e.name != null) {
- write(e.name);
- }
- writeParameters(e.parameters);
- if (stmt is Return) {
- write('=> ');
- writeExp(stmt.expression, EXPRESSION);
- } else {
- writeBlock(stmt);
- }
- if (needParen) {
- write(')');
- }
- });
- } else if (e is Conditional) {
- withPrecedence(CONDITIONAL, () {
- writeExp(e.condition, LOGICAL_OR, beginStmt: beginStmt);
- write(' ? ');
- writeExp(e.thenExpression, EXPRESSION);
- write(' : ');
- writeExp(e.elseExpression, EXPRESSION);
- });
- } else if (e is Identifier) {
- write(e.name);
- } else if (e is Literal) {
- if (e.value.isString) {
- writeStringLiteral(e);
- } else if (e.value.isDouble) {
- double v = e.value.primitiveValue;
- if (v == double.INFINITY) {
- withPrecedence(MULTIPLICATIVE, () {
- write('1/0.0');
- });
- } else if (v == double.NEGATIVE_INFINITY) {
- withPrecedence(MULTIPLICATIVE, () {
- write('-1/0.0');
- });
- } else if (v.isNaN) {
- withPrecedence(MULTIPLICATIVE, () {
- write('0/0.0');
- });
- } else {
- write(v.toString());
- }
- } else {
- write(e.value.toDartText());
- }
- } else if (e is LiteralList) {
- if (e.isConst) {
- write(' const ');
- }
- if (e.typeArgument != null) {
- write('<');
- writeType(e.typeArgument);
- write('>');
- }
- write('[');
- writeEach(',', e.values, writeExpression);
- write(']');
- } else if (e is LiteralMap) {
- // The curly brace can be mistaken for a block statement if we
- // are at the beginning of a statement.
- bool needParen = beginStmt;
- if (e.isConst) {
- write(' const ');
- needParen = false;
- }
- if (e.typeArguments.length > 0) {
- write('<');
- writeEach(',', e.typeArguments, writeType);
- write('>');
- needParen = false;
- }
- if (needParen) {
- write('(');
- }
- write('{');
- writeEach(',', e.entries, (LiteralMapEntry en) {
- writeExp(en.key, EXPRESSION);
- write(' : ');
- writeExp(en.value, EXPRESSION);
- });
- write('}');
- if (needParen) {
- write(')');
- }
- } else if (e is LiteralSymbol) {
- write('#');
- write(e.id);
- } else if (e is LiteralType) {
- withPrecedence(TYPE_LITERAL, () {
- write(e.name);
- });
- } else if (e is ReifyTypeVar) {
- withPrecedence(PRIMARY, () {
- write(e.name);
- });
- } else if (e is StringConcat) {
- writeStringLiteral(e);
- } else if (e is UnaryOperator) {
- Receiver operand = e.operand;
- // !(x == y) ==> x != y.
- if (e.operatorName == '!' &&
- operand is BinaryOperator &&
- operand.operator == '==') {
- withPrecedence(EQUALITY, () {
- writeExp(operand.left, RELATIONAL);
- writeOperator('!=');
- writeExp(operand.right, RELATIONAL);
- });
- }
- // !(x is T) ==> x is!T
- else if (e.operatorName == '!' &&
- operand is TypeOperator &&
- operand.operator == 'is') {
- withPrecedence(RELATIONAL, () {
- writeExp(operand.expression, BITWISE_OR, beginStmt: beginStmt);
- write(' is!');
- writeType(operand.type);
- });
- } else {
- withPrecedence(UNARY, () {
- writeOperator(e.operatorName);
- writeExp(e.operand, UNARY);
- });
- }
- } else if (e is BinaryOperator) {
- int precedence = BINARY_PRECEDENCE[e.operator];
- withPrecedence(precedence, () {
- // All binary operators are left-associative or non-associative.
- // For each operand, we use either the same precedence level as
- // the current operator, or one higher.
- int deltaLeft = isAssociativeBinaryOperator(precedence) ? 0 : 1;
- writeExp(e.left, precedence + deltaLeft, beginStmt: beginStmt);
- writeOperator(e.operator);
- writeExp(e.right, precedence + 1);
- });
- } else if (e is TypeOperator) {
- withPrecedence(RELATIONAL, () {
- writeExp(e.expression, BITWISE_OR, beginStmt: beginStmt);
- write(' ');
- write(e.operator);
- write(' ');
- writeType(e.type);
- });
- } else if (e is Assignment) {
- withPrecedence(EXPRESSION, () {
- writeExp(e.left, PRIMARY, beginStmt: beginStmt);
- writeOperator(e.operator);
- writeExp(e.right, EXPRESSION);
- });
- } else if (e is FieldExpression) {
- withPrecedence(PRIMARY, () {
- writeExp(e.object, PRIMARY, beginStmt: beginStmt);
- write('.');
- write(e.fieldName);
- });
- } else if (e is IndexExpression) {
- withPrecedence(CALLEE, () {
- writeExp(e.object, PRIMARY, beginStmt: beginStmt);
- write('[');
- writeExp(e.index, EXPRESSION);
- write(']');
- });
- } else if (e is CallFunction) {
- withPrecedence(CALLEE, () {
- writeExp(e.callee, CALLEE, beginStmt: beginStmt);
- write('(');
- writeEach(',', e.arguments, writeArgument);
- write(')');
- });
- } else if (e is CallMethod) {
- withPrecedence(CALLEE, () {
- writeExp(e.object, PRIMARY, beginStmt: beginStmt);
- write('.');
- write(e.methodName);
- write('(');
- writeEach(',', e.arguments, writeArgument);
- write(')');
- });
- } else if (e is CallNew) {
- withPrecedence(CALLEE, () {
- write(' ');
- write(e.isConst ? 'const ' : 'new ');
- writeType(e.type);
- if (e.constructorName != null) {
- write('.');
- write(e.constructorName);
- }
- write('(');
- writeEach(',', e.arguments, writeArgument);
- write(')');
- });
- } else if (e is CallStatic) {
- withPrecedence(CALLEE, () {
- write(e.className);
- write('.');
- write(e.methodName);
- write('(');
- writeEach(',', e.arguments, writeArgument);
- write(')');
- });
- } else if (e is Increment) {
- int precedence = e.isPrefix ? UNARY : POSTFIX_INCREMENT;
- withPrecedence(precedence, () {
- if (e.isPrefix) {
- write(e.operator);
- writeExp(e.expression, PRIMARY);
- } else {
- writeExp(e.expression, PRIMARY, beginStmt: beginStmt);
- write(e.operator);
- }
- });
- } else if (e is Throw) {
- withPrecedence(EXPRESSION, () {
- write('throw ');
- writeExp(e.expression, EXPRESSION);
- });
- } else if (e is This) {
- write('this');
- } else {
- throw "Unexpected expression: $e";
- }
- }
-
- void writeParameters(Parameters params) {
- write('(');
- writeEach(',', params.requiredParameters, (Parameter p) {
- if (p.type != null) {
- writeType(p.type);
- write(' ');
- }
- write(p.name);
- if (p.parameters != null) {
- writeParameters(p.parameters);
- }
- });
- if (params.hasOptionalParameters) {
- if (params.requiredParameters.length > 0) {
- write(',');
- }
- write(params.hasNamedParameters ? '{' : '[');
- writeEach(',', params.optionalParameters, (Parameter p) {
- if (p.type != null) {
- writeType(p.type);
- write(' ');
- }
- write(p.name);
- if (p.parameters != null) {
- writeParameters(p.parameters);
- }
- if (p.defaultValue != null) {
- write(params.hasNamedParameters ? ':' : '=');
- writeExp(p.defaultValue, EXPRESSION);
- }
- });
- write(params.hasNamedParameters ? '}' : ']');
- }
- write(')');
- }
-
- void writeStatement(Statement stmt, {bool shortIf: true}) {
- stmt = unfoldBlocks(stmt);
- if (stmt is Block) {
- write('{');
- stmt.statements.forEach(writeBlockMember);
- write('}');
- } else if (stmt is Break) {
- write('break');
- if (stmt.label != null) {
- write(' ');
- write(stmt.label);
- }
- write(';');
- } else if (stmt is Continue) {
- write('continue');
- if (stmt.label != null) {
- write(' ');
- write(stmt.label);
- }
- write(';');
- } else if (stmt is EmptyStatement) {
- write(';');
- } else if (stmt is ExpressionStatement) {
- writeExp(stmt.expression, EXPRESSION, beginStmt: true);
- write(';');
- } else if (stmt is For) {
- write('for(');
- Node init = stmt.initializer;
- if (init is Expression) {
- writeExp(init, EXPRESSION);
- } else if (init is VariableDeclarations) {
- writeVariableDefinitions(init);
- }
- write(';');
- if (stmt.condition != null) {
- writeExp(stmt.condition, EXPRESSION);
- }
- write(';');
- writeEach(',', stmt.updates, writeExpression);
- write(')');
- writeStatement(stmt.body, shortIf: shortIf);
- } else if (stmt is ForIn) {
- write('for(');
- Node lhv = stmt.leftHandValue;
- if (lhv is Identifier) {
- write(lhv.name);
- } else {
- writeVariableDefinitions(lhv as VariableDeclarations);
- }
- write(' in ');
- writeExp(stmt.expression, EXPRESSION);
- write(')');
- writeStatement(stmt.body, shortIf: shortIf);
- } else if (stmt is While) {
- write('while(');
- writeExp(stmt.condition, EXPRESSION);
- write(')');
- writeStatement(stmt.body, shortIf: shortIf);
- } else if (stmt is DoWhile) {
- write('do ');
- writeStatement(stmt.body);
- write('while(');
- writeExp(stmt.condition, EXPRESSION);
- write(');');
- } else if (stmt is If) {
- // if (E) S else ; ==> if (E) S
- Statement elsePart = unfoldBlocks(stmt.elseStatement);
- if (elsePart is EmptyStatement) {
- elsePart = null;
- }
- if (!shortIf && elsePart == null) {
- write('{');
- }
- write('if(');
- writeExp(stmt.condition, EXPRESSION);
- write(')');
- writeStatement(stmt.thenStatement, shortIf: elsePart == null);
- if (elsePart != null) {
- write('else ');
- writeStatement(elsePart, shortIf: shortIf);
- }
- if (!shortIf && elsePart == null) {
- write('}');
- }
- } else if (stmt is LabeledStatement) {
- write(stmt.label);
- write(':');
- writeStatement(stmt.statement, shortIf: shortIf);
- } else if (stmt is Rethrow) {
- write('rethrow;');
- } else if (stmt is Return) {
- write('return');
- if (stmt.expression != null) {
- write(' ');
- writeExp(stmt.expression, EXPRESSION);
- }
- write(';');
- } else if (stmt is Switch) {
- write('switch(');
- writeExp(stmt.expression, EXPRESSION);
- write('){');
- for (SwitchCase caze in stmt.cases) {
- if (caze.isDefaultCase) {
- write('default:');
- } else {
- for (Expression exp in caze.expressions) {
- write('case ');
- writeExp(exp, EXPRESSION);
- write(':');
- }
- }
- if (caze.statements.isEmpty) {
- write(';'); // Prevent fall-through.
- } else {
- caze.statements.forEach(writeBlockMember);
- }
- }
- write('}');
- } else if (stmt is Try) {
- write('try');
- writeBlock(stmt.tryBlock);
- for (CatchBlock block in stmt.catchBlocks) {
- if (block.onType != null) {
- write('on ');
- writeType(block.onType);
- }
- if (block.exceptionVar != null) {
- write('catch(');
- write(block.exceptionVar.name);
- if (block.stackVar != null) {
- write(',');
- write(block.stackVar.name);
- }
- write(')');
- }
- writeBlock(block.body);
- }
- if (stmt.finallyBlock != null) {
- write('finally');
- writeBlock(stmt.finallyBlock);
- }
- } else if (stmt is VariableDeclarations) {
- writeVariableDefinitions(stmt);
- write(';');
- } else if (stmt is FunctionDeclaration) {
- assert(!stmt.function.isGetter && !stmt.function.isSetter);
- if (stmt.returnType != null) {
- writeType(stmt.returnType);
- write(' ');
- }
- write(stmt.name);
- writeParameters(stmt.parameters);
- Statement body = unfoldBlocks(stmt.body);
- if (body is Return) {
- write('=> ');
- writeExp(body.expression, EXPRESSION);
- write(';');
- } else {
- writeBlock(body);
- }
- } else {
- throw "Unexpected statement: $stmt";
- }
- }
-
- /// Writes a variable definition statement without the trailing semicolon
- void writeVariableDefinitions(VariableDeclarations vds) {
- if (vds.isConst)
- write('const ');
- else if (vds.isFinal) write('final ');
- if (vds.type != null) {
- writeType(vds.type);
- write(' ');
- }
- if (!vds.isConst && !vds.isFinal && vds.type == null) {
- write('var ');
- }
- writeEach(',', vds.declarations, (VariableDeclaration vd) {
- write(vd.name);
- if (vd.initializer != null) {
- write('=');
- writeExp(vd.initializer, EXPRESSION);
- }
- });
- }
-
- /// True of statements that introduce variables in the scope of their
- /// surrounding block. Blocks containing such statements cannot be unfolded.
- static bool definesVariable(Statement s) {
- return s is VariableDeclarations || s is FunctionDeclaration;
- }
-
- /// Writes the given statement in a context where only blocks are allowed.
- void writeBlock(Statement stmt) {
- if (stmt is Block) {
- writeStatement(stmt);
- } else {
- write('{');
- writeBlockMember(stmt);
- write('}');
- }
- }
-
- /// Outputs a statement that is a member of a block statement (or a similar
- /// sequence of statements, such as in switch statement).
- /// This will flatten blocks and skip empty statement.
- void writeBlockMember(Statement stmt) {
- if (stmt is Block && !stmt.statements.any(definesVariable)) {
- stmt.statements.forEach(writeBlockMember);
- } else if (stmt is EmptyStatement) {
- // do nothing
- } else {
- writeStatement(stmt);
- }
- }
-
- void writeType(TypeAnnotation type) {
- write(type.name);
- if (type.typeArguments != null && type.typeArguments.length > 0) {
- write('<');
- writeEach(',', type.typeArguments, writeType);
- write('>');
- }
- }
-
- /// A list of string quotings that the printer may use to quote strings.
- // Ignore multiline quotings for now. Would need to make sure that no
- // newline (potentially prefixed by whitespace) follows the quoting.
- static const _QUOTINGS = const <tree.StringQuoting>[
- const tree.StringQuoting(characters.$DQ, raw: false, leftQuoteLength: 1),
- const tree.StringQuoting(characters.$DQ, raw: true, leftQuoteLength: 1),
- const tree.StringQuoting(characters.$SQ, raw: false, leftQuoteLength: 1),
- const tree.StringQuoting(characters.$SQ, raw: true, leftQuoteLength: 1),
- ];
-
- static StringLiteralOutput analyzeStringLiteral(Expression node) {
- // Flatten the StringConcat tree.
- List parts = []; // Expression or int (char node)
- void collectParts(Expression e) {
- if (e is StringConcat) {
- e.expressions.forEach(collectParts);
- } else if (e is Literal && e.value.isString) {
- for (int char in e.value.primitiveValue) {
- parts.add(char);
- }
- } else {
- parts.add(e);
- }
- }
- collectParts(node);
-
- // We use a dynamic algorithm to compute the optimal way of printing
- // the string literal.
- //
- // Using string juxtapositions, it is possible to switch from one quoting
- // to another, e.g. the constant "''''" '""""' uses this trick.
- //
- // As we move through the string from left to right, we maintain a strategy
- // for each StringQuoting Q, denoting the best way to print the current
- // prefix so that we end with a string literal quoted with Q.
- // At every step, each strategy is either:
- // 1) Updated to include the cost of printing the next character.
- // 2) Abandoned because it is cheaper to use another strategy as prefix,
- // and then switching quotation using a juxtaposition.
-
- int getQuoteCost(tree.StringQuoting quot) {
- return quot.leftQuoteLength + quot.rightQuoteLength;
- }
-
- // Create initial scores for each StringQuoting and index them
- // into raw/non-raw and single-quote/double-quote.
- List<OpenStringChunk> best = <OpenStringChunk>[];
- List<int> raws = <int>[];
- List<int> nonRaws = <int>[];
- List<int> sqs = <int>[];
- List<int> dqs = <int>[];
- for (tree.StringQuoting q in _QUOTINGS) {
- OpenStringChunk chunk = new OpenStringChunk(null, q, getQuoteCost(q));
- int index = best.length;
- best.add(chunk);
-
- if (q.raw) {
- raws.add(index);
- } else {
- nonRaws.add(index);
- }
- if (q.quote == characters.$SQ) {
- sqs.add(index);
- } else {
- dqs.add(index);
- }
- }
-
- /// Applies additional cost to each track in [penalized], and considers
- /// switching from each [penalized] to a [nonPenalized] track.
- void penalize(List<int> penalized, List<int> nonPenalized, int endIndex,
- num cost(tree.StringQuoting q)) {
- for (int j in penalized) {
- // Check if another track can benefit from switching from this track.
- for (int k in nonPenalized) {
- num newCost = best[j].cost +
- 1 // Whitespace in string juxtaposition
- +
- getQuoteCost(best[k].quoting);
- if (newCost < best[k].cost) {
- best[k] = new OpenStringChunk(
- best[j].end(endIndex), best[k].quoting, newCost);
- }
- }
- best[j].cost += cost(best[j].quoting);
- }
- }
-
- // Iterate through the string and update the score for each StringQuoting.
- for (int i = 0; i < parts.length; i++) {
- var part = parts[i];
- if (part is int) {
- int char = part;
- switch (char) {
- case characters.$$:
- case characters.$BACKSLASH:
- penalize(nonRaws, raws, i, (q) => 1);
- break;
- case characters.$DQ:
- penalize(dqs, sqs, i, (q) => q.raw ? double.INFINITY : 1);
- break;
- case characters.$SQ:
- penalize(sqs, dqs, i, (q) => q.raw ? double.INFINITY : 1);
- break;
- case characters.$LF:
- case characters.$CR:
- case characters.$FF:
- case characters.$BS:
- case characters.$VTAB:
- case characters.$TAB:
- case characters.$EOF:
- penalize(raws, nonRaws, i, (q) => double.INFINITY);
- break;
- }
- } else {
- // Penalize raw literals for string interpolation.
- penalize(raws, nonRaws, i, (q) => double.INFINITY);
-
- // Splitting a string can sometimes allow us to use a shorthand
- // string interpolation that would otherwise be illegal.
- // E.g. "...${foo}x..." -> "...$foo" 'x...'
- // If are other factors that make splitting advantageous,
- // we can gain even more by doing the split here.
- if (part is Identifier &&
- !part.name.contains(r'$') &&
- i + 1 < parts.length &&
- isIdentifierPartNoDollar(parts[i + 1])) {
- for (int j in nonRaws) {
- for (int k = 0; k < best.length; k++) {
- num newCost = best[j].cost +
- 1 // Whitespace in string juxtaposition
- -
- 2 // Save two curly braces
- +
- getQuoteCost(best[k].quoting);
- if (newCost < best[k].cost) {
- best[k] = new OpenStringChunk(
- best[j].end(i + 1), best[k].quoting, newCost);
- }
- }
- }
- }
- }
- }
-
- // Select the cheapest strategy
- OpenStringChunk bestChunk = best[0];
- for (OpenStringChunk chunk in best) {
- if (chunk.cost < bestChunk.cost) {
- bestChunk = chunk;
- }
- }
-
- return new StringLiteralOutput(parts, bestChunk.end(parts.length));
- }
-
- void writeStringLiteral(Expression node) {
- StringLiteralOutput output = analyzeStringLiteral(node);
- List parts = output.parts;
- void printChunk(StringChunk chunk) {
- int startIndex;
- if (chunk.previous != null) {
- printChunk(chunk.previous);
- write(' '); // String juxtaposition requires a space between literals.
- startIndex = chunk.previous.endIndex;
- } else {
- startIndex = 0;
- }
- if (chunk.quoting.raw) {
- write('r');
- }
- write(chunk.quoting.quoteChar);
- bool raw = chunk.quoting.raw;
- int quoteCode = chunk.quoting.quote;
- for (int i = startIndex; i < chunk.endIndex; i++) {
- var part = parts[i];
- if (part is int) {
- int char = part;
- write(getEscapedCharacter(char, quoteCode, raw));
- } else if (part is Identifier &&
- !part.name.contains(r'$') &&
- (i == chunk.endIndex - 1 ||
- !isIdentifierPartNoDollar(parts[i + 1]))) {
- write(r'$');
- write(part.name);
- } else {
- write(r'${');
- writeExpression(part);
- write('}');
- }
- }
- write(chunk.quoting.quoteChar);
- }
- printChunk(output.chunk);
- }
-
- static String getEscapedCharacter(int char, int quoteCode, bool raw) {
- switch (char) {
- case characters.$$:
- return raw ? r'$' : r'\$';
- case characters.$BACKSLASH:
- return raw ? r'\' : r'\\';
- case characters.$DQ:
- return quoteCode == char ? r'\"' : r'"';
- case characters.$SQ:
- return quoteCode == char ? r"\'" : r"'";
- case characters.$LF:
- return r'\n';
- case characters.$CR:
- return r'\r';
- case characters.$FF:
- return r'\f';
- case characters.$BS:
- return r'\b';
- case characters.$TAB:
- return r'\t';
- case characters.$VTAB:
- return r'\v';
- case characters.$EOF:
- return r'\x00';
- default:
- return new String.fromCharCode(char);
- }
- }
-}
-
-/// The contents of a string literal together with a strategy for printing it.
-class StringLiteralOutput {
- /// Mix of [Expression] and `int`. Each expression is a string interpolation,
- /// and each `int` is the character code of a character in a string literal.
- final List parts;
- final StringChunk chunk;
-
- StringLiteralOutput(this.parts, this.chunk);
-}
-
-/// Strategy for printing a prefix of a string literal.
-/// A chunk represents the substring going from [:previous.endIndex:] to
-/// [endIndex] (or from 0 to [endIndex] if [previous] is null).
-class StringChunk {
- final StringChunk previous;
- final tree.StringQuoting quoting;
- final int endIndex;
-
- StringChunk(this.previous, this.quoting, this.endIndex);
-}
-
-/// [StringChunk] that has not yet been assigned an [endIndex].
-/// It additionally has a [cost] denoting the number of auxilliary characters
-/// (quotes, spaces, etc) needed to print the literal using this strategy
-class OpenStringChunk {
- final StringChunk previous;
- final tree.StringQuoting quoting;
- num cost;
-
- OpenStringChunk(this.previous, this.quoting, this.cost);
-
- StringChunk end(int endIndex) {
- return new StringChunk(previous, quoting, endIndex);
- }
-}
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart
deleted file mode 100644
index 469858d..0000000
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart
+++ /dev/null
@@ -1,1353 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart_tree_printer;
-
-import '../common.dart';
-import '../constants/values.dart' as values;
-import '../dart_types.dart' as types;
-import '../elements/elements.dart' as elements;
-import '../resolution/tree_elements.dart' show TreeElementMapping;
-import '../tokens/token.dart';
-import '../tokens/token_constants.dart';
-import '../tokens/precedence.dart';
-import '../tokens/precedence_constants.dart';
-import '../tree/tree.dart' as tree;
-import '../util/util.dart';
-import 'backend_ast_nodes.dart';
-import 'backend_ast_emitter.dart' show TypeGenerator;
-
-/// Translates the backend AST to Dart frontend AST.
-tree.Node emit(TreeElementMapping treeElements, RootNode root) {
- return new TreePrinter(treeElements).makeDefinition(root);
-}
-
-/// If true, the unparser will insert a coment in front of every function
-/// it emits. This helps indicate which functions were translated by the new
-/// backend.
-bool INSERT_NEW_BACKEND_COMMENT =
- const bool.fromEnvironment("INSERT_NEW_BACKEND_COMMENT");
-
-/// Converts backend ASTs to frontend ASTs.
-class TreePrinter {
- TreeElementMapping treeElements;
-
- TreePrinter([this.treeElements]);
-
- tree.Node makeDefinition(RootNode node) {
- if (node is FieldDefinition) {
- tree.Node definition;
- if (node.initializer == null) {
- definition = makeIdentifier(node.element.name);
- } else {
- definition = new tree.SendSet(
- null,
- makeIdentifier(node.element.name),
- new tree.Operator(assignmentToken("=")),
- singleton(makeExpression(node.initializer)));
- }
- setElement(definition, node.element, node);
- return new tree.VariableDefinitions(
- null, // TODO(sigurdm): Type
- makeVarModifiers(
- useVar: true,
- isFinal: node.element.isFinal,
- isStatic: node.element.isStatic,
- isConst: node.element.isConst),
- makeList(null, [definition], close: semicolon));
- } else if (node is FunctionExpression) {
- return makeExpression(node);
- } else {
- assert(false);
- return null;
- }
- }
-
- void setElement(tree.Node node, elements.Element element, source) {
- if (treeElements != null) {
- if (element == null) {
- throw "Missing element from ${source}";
- }
- treeElements[node] = element;
- }
- }
-
- void setType(tree.Node node, types.DartType type, source) {
- if (treeElements != null) {
- if (type == null) {
- throw "Missing type from ${source}";
- }
- treeElements.setType(node, type);
- }
- }
-
- // Group tokens: () [] {} <>
- static BeginGroupToken makeGroup(PrecedenceInfo open, PrecedenceInfo close) {
- BeginGroupToken openTok = new BeginGroupToken(open, -1);
- openTok.endGroup = new SymbolToken(close, -1);
- return openTok;
- }
-
- final BeginGroupToken openParen =
- makeGroup(OPEN_PAREN_INFO, CLOSE_PAREN_INFO);
- final BeginGroupToken openBrace =
- makeGroup(OPEN_CURLY_BRACKET_INFO, CLOSE_CURLY_BRACKET_INFO);
- final BeginGroupToken openBracket =
- makeGroup(OPEN_SQUARE_BRACKET_INFO, CLOSE_SQUARE_BRACKET_INFO);
- final BeginGroupToken lt = makeGroup(LT_INFO, GT_INFO);
-
- Token get closeParen => openParen.endGroup;
- Token get closeBrace => openBrace.endGroup;
- Token get closeBracket => openBracket.endGroup;
- Token get gt => lt.endGroup;
-
- // Symbol tokens
- final Token semicolon = new SymbolToken(SEMICOLON_INFO, -1);
- final Token indexToken = new SymbolToken(INDEX_INFO, -1); // "[]"
- final Token question = new SymbolToken(QUESTION_INFO, -1);
- final Token colon = new SymbolToken(COLON_INFO, -1);
- final Token hash = new SymbolToken(HASH_INFO, -1);
- final Token bang = new SymbolToken(BANG_INFO, -1);
- final Token eq = new SymbolToken(EQ_INFO, -1);
-
- // Keyword tokens
- static Token makeIdToken(String text) {
- return new StringToken.fromString(IDENTIFIER_INFO, text, -1);
- }
-
- final Token newToken = makeIdToken('new');
- final Token constToken = makeIdToken('const');
- final Token throwToken = makeIdToken('throw');
- final Token rethrowToken = makeIdToken('rethrow');
- final Token breakToken = makeIdToken('break');
- final Token continueToken = makeIdToken('continue');
- final Token doToken = makeIdToken('do');
- final Token whileToken = makeIdToken('while');
- final Token ifToken = makeIdToken('if');
- final Token elseToken = makeIdToken('else');
- final Token awaitToken = makeIdToken('await');
- final Token forToken = makeIdToken('for');
- final Token inToken = makeIdToken('in');
- final Token returnToken = makeIdToken('return');
- final Token switchToken = makeIdToken('switch');
- final Token caseToken = makeIdToken('case');
- final Token defaultToken = makeIdToken('default');
- final Token tryToken = makeIdToken('try');
- final Token catchToken = makeIdToken('catch');
- final Token onToken = makeIdToken('on');
- final Token finallyToken = makeIdToken('finally');
- final Token getToken = makeIdToken('get');
- final Token setToken = makeIdToken('set');
- final Token classToken = makeIdToken('class');
- final Token extendsToken = makeIdToken('extends');
- final Token withToken = makeIdToken('with');
- final Token implementsToken = makeIdToken('implements');
- final Token typedefToken = makeIdToken('typedef');
- final Token enumToken = makeIdToken('enum');
-
- static tree.Identifier makeIdentifier(String name) {
- return new tree.Identifier(
- new StringToken.fromString(IDENTIFIER_INFO, name, -1));
- }
-
- static tree.Operator makeOperator(String name) {
- return new tree.Operator(
- new StringToken.fromString(IDENTIFIER_INFO, name, -1));
- }
-
- // Utilities for creating NodeLists
- Link<tree.Node> makeLink(Iterable<tree.Node> nodes) {
- LinkBuilder builder = new LinkBuilder();
- for (tree.Node node in nodes) {
- builder.addLast(node);
- }
- return builder.toLink();
- }
-
- tree.NodeList blankList() {
- return new tree.NodeList(null, makeLink([]), null, '');
- }
-
- tree.NodeList singleton(tree.Node node) {
- return new tree.NodeList(null, makeLink([node]), null, '');
- }
-
- tree.NodeList makeList(String delimiter, Iterable<tree.Node> nodes,
- {Token open, Token close}) {
- return new tree.NodeList(open, makeLink(nodes), close, delimiter);
- }
-
- tree.NodeList parenList(String delimiter, Iterable<tree.Node> nodes) {
- return makeList(delimiter, nodes, open: openParen, close: closeParen);
- }
-
- tree.NodeList bracketList(String delimiter, Iterable<tree.Node> nodes) {
- return makeList(delimiter, nodes, open: openBracket, close: closeBracket);
- }
-
- tree.NodeList braceList(String delimiter, Iterable<tree.Node> nodes) {
- return makeList(delimiter, nodes, open: openBrace, close: closeBrace);
- }
-
- tree.NodeList argList(Iterable<tree.Node> nodes) {
- return parenList(',', nodes);
- }
-
- tree.NodeList typeArgList(Iterable<tree.Node> nodes) {
- return makeList(',', nodes, open: lt, close: gt);
- }
-
- /// Converts a qualified name into nested Sends.
- tree.Node makeName(String name) {
- if (name == null) {
- return null;
- }
- List<String> names = name.split('.').toList(growable: false);
- tree.Node node = makeIdentifier(names[0]);
- for (int i = 1; i < names.length; i++) {
- node = new tree.Send(node, makeIdentifier(names[i]));
- }
- return node;
- }
-
- static Token assignmentToken(String operatorName) {
- switch (operatorName) {
- case '=':
- return new SymbolToken(EQ_INFO, -1);
- case '+=':
- return new SymbolToken(PLUS_EQ_INFO, -1);
- case '-=':
- return new SymbolToken(MINUS_EQ_INFO, -1);
- case '*=':
- return new SymbolToken(STAR_EQ_INFO, -1);
- case '/=':
- return new SymbolToken(SLASH_EQ_INFO, -1);
- case '~/=':
- return new SymbolToken(TILDE_SLASH_EQ_INFO, -1);
- case '%=':
- return new SymbolToken(PERCENT_EQ_INFO, -1);
- case '&=':
- return new SymbolToken(AMPERSAND_EQ_INFO, -1);
- case '^=':
- return new SymbolToken(CARET_EQ_INFO, -1);
- case '|=':
- return new SymbolToken(BAR_EQ_INFO, -1);
- case '>>=':
- return new SymbolToken(GT_GT_EQ_INFO, -1);
- case '<<=':
- return new SymbolToken(LT_LT_EQ_INFO, -1);
- default:
- throw "Unrecognized assignment operator: $operatorName";
- }
- }
-
- static Token binopToken(String operatorName) {
- switch (operatorName) {
- case '+':
- return new SymbolToken(PLUS_INFO, -1);
- case '-':
- return new SymbolToken(MINUS_INFO, -1);
- case '*':
- return new SymbolToken(STAR_INFO, -1);
- case '/':
- return new SymbolToken(SLASH_INFO, -1);
- case '~/':
- return new SymbolToken(TILDE_SLASH_INFO, -1);
- case '%':
- return new SymbolToken(PERCENT_INFO, -1);
- case '&':
- return new SymbolToken(AMPERSAND_INFO, -1);
- case '^':
- return new SymbolToken(CARET_INFO, -1);
- case '|':
- return new SymbolToken(BAR_INFO, -1);
- case '>>':
- return new SymbolToken(GT_GT_INFO, -1);
- case '<<':
- return new SymbolToken(LT_LT_INFO, -1);
- case '==':
- return new SymbolToken(EQ_EQ_INFO, -1);
- case '!=':
- return new SymbolToken(BANG_EQ_INFO, -1);
- case '>':
- return new SymbolToken(GT_INFO, -1);
- case '>=':
- return new SymbolToken(GT_EQ_INFO, -1);
- case '<':
- return new SymbolToken(LT_INFO, -1);
- case '<=':
- return new SymbolToken(LT_EQ_INFO, -1);
- case '&&':
- return new SymbolToken(AMPERSAND_AMPERSAND_INFO, -1);
- case '||':
- return new SymbolToken(BAR_BAR_INFO, -1);
- default:
- throw "Unrecognized binary operator: $operatorName";
- }
- }
-
- static Token incrementToken(String operatorName) {
- switch (operatorName) {
- case '++':
- return new SymbolToken(PLUS_PLUS_INFO, -1);
- case '--':
- return new SymbolToken(MINUS_MINUS_INFO, -1);
- default:
- throw "Unrecognized increment operator: $operatorName";
- }
- }
-
- static Token typeOpToken(String operatorName) {
- switch (operatorName) {
- // "is!" is not an operator in the frontend AST.
- case 'is':
- return new SymbolToken(IS_INFO, -1);
- case 'as':
- return new SymbolToken(AS_INFO, -1);
- default:
- throw 'Unrecognized type operator: $operatorName';
- }
- }
-
- Token unopToken(String operatorName) {
- switch (operatorName) {
- case '-':
- return new SymbolToken(MINUS_INFO, -1);
- case '~':
- return new SymbolToken(TILDE_INFO, -1);
- case '!':
- return bang;
- default:
- throw "Unrecognized unary operator: $operatorName";
- }
- }
-
- tree.Node makeStaticReceiver(elements.Element element) {
- if (treeElements == null) return null;
- if (element.isStatic) {
- elements.ClassElement enclosingClass = element.enclosingClass;
- tree.Send send = new tree.Send(null, makeIdentifier(enclosingClass.name));
- treeElements[send] = enclosingClass;
- return send;
- } else {
- return null;
- }
- }
-
- tree.Node makeArgument(Argument arg) {
- if (arg is Expression) {
- return makeExpression(arg);
- } else if (arg is NamedArgument) {
- return new tree.NamedArgument(
- makeIdentifier(arg.name), colon, makeExpression(arg.expression));
- } else {
- throw "Unrecognized argument type: ${arg}";
- }
- }
-
- tree.Node makeExpression(Expression exp) {
- return makeExp(exp, EXPRESSION);
- }
-
- /// Converts [exp] to a [tree.Node] that unparses to an expression with
- /// a precedence level of at least [minPrecedence]. The expression will be
- /// wrapped in a parenthesis if necessary.
- tree.Node makeExp(Receiver exp, int minPrecedence, {bool beginStmt: false}) {
- tree.Node result;
- int precedence;
- bool needParen = false;
- if (exp is SuperReceiver) {
- precedence = CALLEE;
- result = makeIdentifier('super');
- } else if (exp is Assignment) {
- Expression left = exp.left;
- tree.Node receiver;
- tree.Node selector;
- tree.NodeList arguments;
- elements.Element element;
- if (left is Identifier) {
- receiver = makeStaticReceiver(left.element);
- selector = makeIdentifier(left.name);
- arguments = singleton(makeExpression(exp.right));
- element = left.element;
- } else if (left is FieldExpression) {
- receiver = makeExp(left.object, PRIMARY, beginStmt: beginStmt);
- selector = makeIdentifier(left.fieldName);
- arguments = singleton(makeExpression(exp.right));
- } else if (left is IndexExpression) {
- receiver = makeExp(left.object, PRIMARY, beginStmt: beginStmt);
- selector = new tree.Operator(indexToken);
- arguments = bracketList(
- ',', [makeExpression(left.index), makeExpression(exp.right)]);
- } else {
- throw "Unexpected left-hand side of assignment: ${left}";
- }
- tree.Operator op = new tree.Operator(assignmentToken(exp.operator));
- result = new tree.SendSet(receiver, selector, op, arguments);
- if (left is Identifier) {
- setElement(result, element, exp);
- }
- precedence = EXPRESSION;
- } else if (exp is FieldInitializer) {
- precedence = EXPRESSION;
- tree.Node receiver = makeIdentifier('this');
- tree.Node selector = makeIdentifier(exp.element.name);
- tree.Operator op = new tree.Operator(assignmentToken("="));
- // We pass CALLEE to ensure we write eg.:
- // class B { var x; B() : x = (() {return a;}) {}}
- // Not the invalid:
- // class B { var x; B() : x = () {return a;} {}}
- result = new tree.SendSet(
- receiver, selector, op, singleton(makeExp(exp.body, CALLEE)));
- setElement(result, exp.element, exp);
- } else if (exp is SuperInitializer) {
- precedence = EXPRESSION;
- tree.Node receiver = makeIdentifier('super');
- tree.NodeList arguments =
- argList(exp.arguments.map(makeArgument).toList());
- if (exp.target.name == "") {
- result = new tree.Send(null, receiver, arguments);
- } else {
- result =
- new tree.Send(receiver, makeIdentifier(exp.target.name), arguments);
- }
- setElement(result, exp.target, exp);
- } else if (exp is BinaryOperator) {
- precedence = BINARY_PRECEDENCE[exp.operator];
- int deltaLeft = isAssociativeBinaryOperator(precedence) ? 0 : 1;
- result = new tree.Send(
- makeExp(exp.left, precedence + deltaLeft, beginStmt: beginStmt),
- new tree.Operator(binopToken(exp.operator)),
- singleton(makeExp(exp.right, precedence + 1)));
- } else if (exp is CallFunction) {
- precedence = CALLEE;
- tree.Node selector;
- Expression callee = exp.callee;
- elements.Element element;
- tree.Node receiver;
- if (callee is Identifier) {
- receiver = makeStaticReceiver(callee.element);
- selector = makeIdentifier(callee.name);
- element = callee.element;
- } else {
- selector = makeExp(callee, CALLEE, beginStmt: beginStmt);
- }
- result = new tree.Send(
- receiver, selector, argList(exp.arguments.map(makeArgument)));
- if (callee is Identifier) {
- setElement(result, element, exp);
- }
- } else if (exp is CallMethod) {
- precedence = CALLEE;
- // TODO(sra): Elide receiver when This, but only if not in a scope that
- // shadows the method (e.g. constructor body).
- tree.Node receiver = makeExp(exp.object, PRIMARY, beginStmt: beginStmt);
- result = new tree.Send(receiver, makeIdentifier(exp.methodName),
- argList(exp.arguments.map(makeArgument)));
- } else if (exp is CallNew) {
- precedence = CALLEE;
- tree.Node selector = makeName(exp.type.name);
- if (exp.type.typeArguments.length > 0) {
- selector = new tree.TypeAnnotation(
- selector, typeArgList(exp.type.typeArguments.map(makeType)));
- setType(selector, exp.dartType, exp);
- }
- if (exp.constructorName != null) {
- selector = new tree.Send(selector, makeIdentifier(exp.constructorName));
- }
- tree.Send send = new tree.Send(
- null, selector, argList(exp.arguments.map(makeArgument)));
- result =
- new tree.NewExpression(exp.isConst ? constToken : newToken, send);
- setType(result, exp.dartType, exp);
- setElement(send, exp.constructor, exp);
- } else if (exp is CallStatic) {
- precedence = CALLEE;
- result = new tree.Send(
- makeStaticReceiver(exp.element),
- makeIdentifier(exp.methodName),
- argList(exp.arguments.map(makeArgument)));
- setElement(result, exp.element, exp);
- } else if (exp is Conditional) {
- precedence = CONDITIONAL;
- result = new tree.Conditional(
- makeExp(exp.condition, LOGICAL_OR, beginStmt: beginStmt),
- makeExp(exp.thenExpression, EXPRESSION),
- makeExp(exp.elseExpression, EXPRESSION),
- question,
- colon);
- } else if (exp is FieldExpression) {
- precedence = PRIMARY;
- // TODO(sra): Elide receiver when This, but only if not in a scope that
- // shadows the method (e.g. constructor body).
- tree.Node receiver = makeExp(exp.object, PRIMARY, beginStmt: beginStmt);
- result = new tree.Send(receiver, makeIdentifier(exp.fieldName));
- } else if (exp is ConstructorDefinition) {
- precedence = EXPRESSION;
- tree.NodeList parameters = makeParameters(exp.parameters);
- tree.NodeList initializers =
- exp.initializers == null || exp.initializers.isEmpty
- ? null
- : makeList(",", exp.initializers.map(makeExpression).toList());
- tree.Node body = exp.isConst || exp.body == null
- ? new tree.EmptyStatement(semicolon)
- : makeFunctionBody(exp.body);
- result = new tree.FunctionExpression(
- constructorName(exp),
- // GENERIC_METHODS: In order to support generic methods fully,
- // we must retrieve and pass the actual type variables here.
- null, // typeVariables
- parameters,
- body,
- null, // return type
- makeFunctionModifiers(exp),
- initializers,
- null, // get/set
- null); // async modifier
- setElement(result, exp.element, exp);
- } else if (exp is FunctionExpression) {
- precedence = PRIMARY;
- if (beginStmt && exp.name != null) {
- needParen = true; // Do not mistake for function declaration.
- }
- Token getOrSet = exp.isGetter ? getToken : exp.isSetter ? setToken : null;
- tree.NodeList parameters =
- exp.isGetter ? makeList("", []) : makeParameters(exp.parameters);
- tree.Node body = makeFunctionBody(exp.body);
- result = new tree.FunctionExpression(
- functionName(exp),
- // GENERIC_METHODS: In order to support generic methods fully,
- // we must retrieve and pass the actual type variables here.
- null, // typeVariables
- parameters,
- body,
- exp.returnType == null || exp.element.isConstructor
- ? null
- : makeType(exp.returnType),
- makeFunctionModifiers(exp),
- null, // initializers
- getOrSet, // get/set
- null); // async modifier
- elements.Element element = exp.element;
- if (element != null) setElement(result, element, exp);
- } else if (exp is Identifier) {
- precedence = CALLEE;
- result = new tree.Send(
- makeStaticReceiver(exp.element), makeIdentifier(exp.name));
- setElement(result, exp.element, exp);
- } else if (exp is Increment) {
- Expression lvalue = exp.expression;
- tree.Node receiver;
- tree.Node selector;
- tree.Node argument;
- bool innerBeginStmt = beginStmt && !exp.isPrefix;
- if (lvalue is Identifier) {
- receiver = makeStaticReceiver(lvalue.element);
- selector = makeIdentifier(lvalue.name);
- } else if (lvalue is FieldExpression) {
- receiver = makeExp(lvalue.object, PRIMARY, beginStmt: innerBeginStmt);
- selector = makeIdentifier(lvalue.fieldName);
- } else if (lvalue is IndexExpression) {
- receiver = makeExp(lvalue.object, PRIMARY, beginStmt: innerBeginStmt);
- selector = new tree.Operator(indexToken);
- argument = makeExpression(lvalue.index);
- } else {
- throw "Unrecognized left-hand side: ${lvalue}";
- }
- tree.Operator op = new tree.Operator(incrementToken(exp.operator));
- if (exp.isPrefix) {
- precedence = UNARY;
- result = new tree.SendSet.prefix(receiver, selector, op, argument);
- } else {
- precedence = POSTFIX_INCREMENT;
- result = new tree.SendSet.postfix(receiver, selector, op, argument);
- }
- if (lvalue is Identifier) {
- setElement(result, lvalue.element, exp);
- }
- } else if (exp is IndexExpression) {
- precedence = CALLEE;
- result = new tree.Send(
- makeExp(exp.object, PRIMARY, beginStmt: beginStmt),
- new tree.Operator(indexToken),
- bracketList(',', [makeExpression(exp.index)]));
- } else if (exp is Literal) {
- precedence = CALLEE;
- values.PrimitiveConstantValue value = exp.value;
- Token tok = new StringToken.fromString(
- STRING_INFO, '${value.primitiveValue}', -1);
- if (value.isString) {
- result = unparseStringLiteral(exp);
- } else if (value.isInt) {
- result = new tree.LiteralInt(tok, null);
- } else if (value.isDouble) {
- if (value.primitiveValue == double.INFINITY) {
- precedence = MULTIPLICATIVE;
- tok = new StringToken.fromString(STRING_INFO, '1/0.0', -1);
- } else if (value.primitiveValue == double.NEGATIVE_INFINITY) {
- precedence = MULTIPLICATIVE;
- tok = new StringToken.fromString(STRING_INFO, '-1/0.0', -1);
- } else if (value.primitiveValue.isNaN) {
- precedence = MULTIPLICATIVE;
- tok = new StringToken.fromString(STRING_INFO, '0/0.0', -1);
- }
- result = new tree.LiteralDouble(tok, null);
- } else if (value.isBool) {
- result = new tree.LiteralBool(tok, null);
- } else if (value.isNull) {
- result = new tree.LiteralNull(tok);
- } else {
- throw "Unrecognized constant: ${value}";
- }
- } else if (exp is LiteralList) {
- precedence = PRIMARY;
- tree.NodeList typeArgs = null;
- if (exp.typeArgument != null) {
- typeArgs = typeArgList([makeType(exp.typeArgument)]);
- }
- result = new tree.LiteralList(
- typeArgs,
- bracketList(',', exp.values.map(makeExpression)),
- exp.isConst ? constToken : null);
- } else if (exp is LiteralMap) {
- precedence = PRIMARY;
- if (beginStmt) {
- // The opening brace can be confused with a block statement.
- needParen = true;
- }
- tree.NodeList typeArgs = null;
- if (exp.typeArguments != null && exp.typeArguments.length > 0) {
- typeArgs = typeArgList(exp.typeArguments.map(makeType));
- }
- result = new tree.LiteralMap(
- typeArgs,
- braceList(',', exp.entries.map(makeLiteralMapEntry)),
- exp.isConst ? constToken : null);
- } else if (exp is LiteralSymbol) {
- precedence = PRIMARY;
- result = new tree.LiteralSymbol(
- hash, makeList('.', exp.id.split('.').map(makeIdentifier)));
- } else if (exp is LiteralType) {
- precedence = TYPE_LITERAL;
- elements.Element optionalElement = exp.type.element;
- result = new tree.Send(
- optionalElement == null ? null : makeStaticReceiver(optionalElement),
- makeIdentifier(exp.name));
- treeElements.setType(result, exp.type);
- if (optionalElement != null) {
- // dynamic does not have an element
- setElement(result, optionalElement, exp);
- }
- } else if (exp is ReifyTypeVar) {
- precedence = PRIMARY;
- result = new tree.Send(null, makeIdentifier(exp.name));
- setElement(result, exp.element, exp);
- setType(result, exp.element.type, exp);
- } else if (exp is StringConcat) {
- precedence = PRIMARY;
- result = unparseStringLiteral(exp);
- } else if (exp is This) {
- precedence = CALLEE;
- result = makeIdentifier('this');
- } else if (exp is Throw) {
- precedence = EXPRESSION; // ???
- result = new tree.Throw(makeExpression(exp.expression), throwToken,
- throwToken); // endToken not used by unparser
- } else if (exp is TypeOperator) {
- precedence = RELATIONAL;
- tree.Operator operator;
- tree.Node rightOperand = makeType(exp.type);
- if (exp.operator == 'is!') {
- operator = new tree.Operator(typeOpToken('is'));
- rightOperand =
- new tree.Send(rightOperand, new tree.Operator(bang), blankList());
- } else {
- operator = new tree.Operator(typeOpToken(exp.operator));
- }
- result = new tree.Send(
- makeExp(exp.expression, BITWISE_OR, beginStmt: beginStmt),
- operator,
- singleton(rightOperand));
- } else if (exp is UnaryOperator) {
- precedence = UNARY;
- result = new tree.Send.prefix(makeExp(exp.operand, UNARY),
- new tree.Operator(unopToken(exp.operatorName)));
- } else {
- throw "Unknown expression type: ${exp}";
- }
-
- needParen = needParen || precedence < minPrecedence;
- if (needParen) {
- result = parenthesize(result);
- }
- return result;
- }
-
- /// Creates a LiteralString with [verbatim] as the value.
- /// No (un)quoting or (un)escaping will be performed by this method.
- /// The [DartString] inside the literal will be set to null because the
- /// code emitter does not use it.
- tree.LiteralString makeVerbatimStringLiteral(String verbatim) {
- Token tok = new StringToken.fromString(STRING_INFO, verbatim, -1);
- return new tree.LiteralString(tok, null);
- }
-
- tree.LiteralMapEntry makeLiteralMapEntry(LiteralMapEntry en) {
- return new tree.LiteralMapEntry(
- makeExpression(en.key), colon, makeExpression(en.value));
- }
-
- /// A comment token to be inserted when [INSERT_NEW_BACKEND_COMMENT] is true.
- final SymbolToken newBackendComment = new SymbolToken(
- const PrecedenceInfo('/* new backend */ ', 0, OPEN_CURLY_BRACKET_TOKEN),
- -1);
-
- tree.Node makeFunctionBody(Statement stmt) {
- if (INSERT_NEW_BACKEND_COMMENT) {
- return new tree.Block(
- makeList('', [makeBlock(stmt)], open: newBackendComment));
- } else {
- return makeBlock(stmt);
- }
- }
-
- /// Produces a statement in a context where only blocks are allowed.
- tree.Node makeBlock(Statement stmt) {
- if (stmt is Block || stmt is EmptyStatement) {
- return makeStatement(stmt);
- } else {
- return new tree.Block(braceList('', [makeStatement(stmt)]));
- }
- }
-
- /// Adds the given statement to a block. If the statement itself is a block
- /// it will be flattened (if this does not change lexical scoping).
- void addBlockMember(Statement stmt, List<tree.Node> accumulator) {
- if (stmt is Block && !stmt.statements.any(Unparser.definesVariable)) {
- for (Statement innerStmt in stmt.statements) {
- addBlockMember(innerStmt, accumulator);
- }
- } else if (stmt is EmptyStatement) {
- // No need to include empty statements inside blocks
- } else {
- accumulator.add(makeStatement(stmt));
- }
- }
-
- /// True if [stmt] is equivalent to an empty statement.
- bool isEmptyStatement(Statement stmt) {
- return stmt is EmptyStatement ||
- (stmt is Block && stmt.statements.every(isEmptyStatement));
- }
-
- tree.Node makeStatement(Statement stmt, {bool shortIf: true}) {
- if (stmt is Block) {
- List<tree.Node> body = <tree.Node>[];
- for (Statement innerStmt in stmt.statements) {
- addBlockMember(innerStmt, body);
- }
- return new tree.Block(braceList('', body));
- } else if (stmt is Break) {
- return new tree.BreakStatement(
- stmt.label == null ? null : makeIdentifier(stmt.label),
- breakToken,
- semicolon);
- } else if (stmt is Continue) {
- return new tree.ContinueStatement(
- stmt.label == null ? null : makeIdentifier(stmt.label),
- continueToken,
- semicolon);
- } else if (stmt is DoWhile) {
- return new tree.DoWhile(
- makeStatement(stmt.body, shortIf: shortIf),
- parenthesize(makeExpression(stmt.condition)),
- doToken,
- whileToken,
- semicolon);
- } else if (stmt is EmptyStatement) {
- return new tree.EmptyStatement(semicolon);
- } else if (stmt is ExpressionStatement) {
- return new tree.ExpressionStatement(
- makeExp(stmt.expression, EXPRESSION, beginStmt: true), semicolon);
- } else if (stmt is For) {
- tree.Node initializer;
- if (stmt.initializer is VariableDeclarations) {
- initializer = makeVariableDeclarations(stmt.initializer);
- } else if (stmt.initializer is Expression) {
- initializer = makeExpression(stmt.initializer);
- } else {
- initializer = null;
- }
- tree.Node condition;
- if (stmt.condition != null) {
- condition = new tree.ExpressionStatement(
- makeExpression(stmt.condition), semicolon);
- } else {
- condition = new tree.EmptyStatement(semicolon);
- }
- return new tree.For(
- initializer,
- condition,
- makeList(',', stmt.updates.map(makeExpression)),
- makeStatement(stmt.body, shortIf: shortIf),
- forToken);
- } else if (stmt is ForIn) {
- tree.Node left;
- if (stmt.leftHandValue is Identifier) {
- left = makeExpression(stmt.leftHandValue);
- } else {
- left = makeVariableDeclarations(stmt.leftHandValue);
- }
- return new tree.SyncForIn(left, makeExpression(stmt.expression),
- makeStatement(stmt.body, shortIf: shortIf), forToken, inToken);
- } else if (stmt is FunctionDeclaration) {
- tree.FunctionExpression function = new tree.FunctionExpression(
- stmt.name != null ? makeIdentifier(stmt.name) : null,
- // GENERIC_METHODS: In order to support generic methods fully,
- // we must retrieve and pass the actual type variables here.
- null, // typeVariables
- makeParameters(stmt.parameters),
- makeFunctionBody(stmt.body),
- stmt.returnType != null ? makeType(stmt.returnType) : null,
- makeEmptyModifiers(),
- null, // initializers
- null, // get/set
- null); // async modifier
- setElement(function, stmt.function.element, stmt);
- return new tree.FunctionDeclaration(function);
- } else if (stmt is If) {
- if (stmt.elseStatement == null || isEmptyStatement(stmt.elseStatement)) {
- tree.Node node = new tree.If(
- parenthesize(makeExpression(stmt.condition)),
- makeStatement(stmt.thenStatement),
- null, // else statement
- ifToken,
- null); // else token
- if (shortIf)
- return node;
- else
- return new tree.Block(braceList('', [node]));
- } else {
- return new tree.If(
- parenthesize(makeExpression(stmt.condition)),
- makeStatement(stmt.thenStatement, shortIf: false),
- makeStatement(stmt.elseStatement, shortIf: shortIf),
- ifToken,
- elseToken); // else token
- }
- } else if (stmt is LabeledStatement) {
- List<tree.Label> labels = [];
- Statement inner = stmt;
- while (inner is LabeledStatement) {
- LabeledStatement lbl = inner as LabeledStatement;
- labels.add(new tree.Label(makeIdentifier(lbl.label), colon));
- inner = lbl.statement;
- }
- return new tree.LabeledStatement(
- makeList('', labels), makeStatement(inner, shortIf: shortIf));
- } else if (stmt is Rethrow) {
- return new tree.Rethrow(rethrowToken, semicolon);
- } else if (stmt is Return) {
- return new tree.Return(returnToken, semicolon,
- stmt.expression == null ? null : makeExpression(stmt.expression));
- } else if (stmt is Switch) {
- return new tree.SwitchStatement(
- parenthesize(makeExpression(stmt.expression)),
- braceList('', stmt.cases.map(makeSwitchCase)),
- switchToken);
- } else if (stmt is Try) {
- return new tree.TryStatement(
- makeBlock(stmt.tryBlock),
- makeList(null, stmt.catchBlocks.map(makeCatchBlock)),
- stmt.finallyBlock == null ? null : makeBlock(stmt.finallyBlock),
- tryToken,
- stmt.finallyBlock == null ? null : finallyToken);
- } else if (stmt is VariableDeclarations) {
- return makeVariableDeclarations(stmt, useVar: true, endToken: semicolon);
- } else if (stmt is While) {
- return new tree.While(parenthesize(makeExpression(stmt.condition)),
- makeStatement(stmt.body, shortIf: shortIf), whileToken);
- } else {
- throw "Unrecognized statement: ${stmt}";
- }
- }
-
- tree.Node makeVariableDeclaration(VariableDeclaration vd) {
- tree.Node id = makeIdentifier(vd.name);
- setElement(id, vd.element, vd);
- if (vd.initializer == null) {
- return id;
- }
- tree.Node send = new tree.SendSet(null, id, new tree.Operator(eq),
- singleton(makeExpression(vd.initializer)));
- setElement(send, vd.element, vd);
- return send;
- }
-
- /// If [useVar] is true, the variable definition will use `var` as modifier
- /// if no other modifiers are present.
- /// [endToken] will be used to terminate the declaration list.
- tree.Node makeVariableDeclarations(VariableDeclarations decl,
- {bool useVar: false, Token endToken: null}) {
- return new tree.VariableDefinitions(
- decl.type == null ? null : makeType(decl.type),
- makeVarModifiers(
- isConst: decl.isConst,
- isFinal: decl.isFinal,
- useVar: useVar && decl.type == null),
- makeList(',', decl.declarations.map(makeVariableDeclaration),
- close: endToken));
- }
-
- tree.CatchBlock makeCatchBlock(CatchBlock block) {
- List<tree.VariableDefinitions> formals = [];
- if (block.exceptionVar != null) {
- tree.Node exceptionName = makeIdentifier(block.exceptionVar.name);
- setElement(exceptionName, block.exceptionVar.element, block.exceptionVar);
- formals.add(new tree.VariableDefinitions(
- null, makeEmptyModifiers(), singleton(exceptionName)));
- }
- if (block.stackVar != null) {
- tree.Node stackTraceName = makeIdentifier(block.stackVar.name);
- setElement(stackTraceName, block.stackVar.element, block.stackVar);
- formals.add(new tree.VariableDefinitions(
- null, makeEmptyModifiers(), singleton(stackTraceName)));
- }
- return new tree.CatchBlock(
- block.onType == null ? null : makeType(block.onType),
- block.exceptionVar == null ? null : argList(formals),
- makeBlock(block.body),
- block.onType == null ? null : onToken,
- block.exceptionVar == null ? null : catchToken);
- }
-
- tree.SwitchCase makeSwitchCase(SwitchCase caze) {
- if (caze.isDefaultCase) {
- return new tree.SwitchCase(
- blankList(),
- defaultToken,
- makeList('', caze.statements.map(makeStatement)),
- null); // startToken unused by unparser
- } else {
- return new tree.SwitchCase(
- makeList('', caze.expressions.map(makeCaseMatch)),
- null, // defaultKeyword,
- makeList('', caze.statements.map(makeStatement)),
- null); // startToken unused by unparser
- }
- }
-
- tree.CaseMatch makeCaseMatch(Expression exp) {
- return new tree.CaseMatch(caseToken, makeExpression(exp), colon);
- }
-
- tree.TypeAnnotation makeType(TypeAnnotation type) {
- tree.NodeList typeArgs;
- if (type.typeArguments.length > 0) {
- typeArgs = typeArgList(type.typeArguments.map(makeType));
- } else {
- typeArgs = null;
- }
- tree.TypeAnnotation result =
- new tree.TypeAnnotation(makeIdentifier(type.name), typeArgs);
- setType(result, type.dartType, type);
- return result;
- }
-
- tree.NodeList makeParameters(Parameters params) {
- List<tree.Node> nodes =
- params.requiredParameters.map(makeParameter).toList();
- if (params.hasOptionalParameters) {
- Token assign = params.hasNamedParameters ? colon : eq;
- Token open = params.hasNamedParameters ? openBrace : openBracket;
- Token close = params.hasNamedParameters ? closeBrace : closeBracket;
- Iterable<tree.Node> opt =
- params.optionalParameters.map((p) => makeParameter(p, assign));
- nodes.add(new tree.NodeList(open, makeLink(opt), close, ','));
- }
- return argList(nodes);
- }
-
- /// [assignOperator] is used for writing the default value.
- tree.Node makeParameter(Parameter param, [Token assignOperator]) {
- if (param.isFunction) {
- tree.Node definition = new tree.FunctionExpression(
- makeIdentifier(param.name),
- // GENERIC_METHODS: In order to support generic methods fully,
- // we must retrieve and pass the actual type variables here.
- null, // typeVariables
- makeParameters(param.parameters),
- null, // body
- param.type == null ? null : makeType(param.type),
- makeEmptyModifiers(), // TODO: Function parameter modifiers?
- null, // initializers
- null, // get/set
- null); // async modifier
- if (param.element != null) {
- setElement(definition, param.element, param);
- }
- if (param.defaultValue != null) {
- definition = new tree.SendSet(
- null,
- definition,
- new tree.Operator(assignOperator),
- singleton(makeExpression(param.defaultValue)));
- }
- return new tree.VariableDefinitions(
- null, makeEmptyModifiers(), singleton(definition));
- } else {
- tree.Node definition;
- if (param.defaultValue != null) {
- definition = new tree.SendSet(
- null,
- makeIdentifier(param.name),
- new tree.Operator(assignOperator),
- singleton(makeExpression(param.defaultValue)));
- } else {
- definition = makeIdentifier(param.name);
- }
- if (param.element != null) {
- setElement(definition, param.element, param);
- }
- return new tree.VariableDefinitions(
- param.type == null ? null : makeType(param.type),
- makeEmptyModifiers(), // TODO: Parameter modifiers?
- singleton(definition));
- }
- }
-
- tree.Modifiers makeEmptyModifiers() {
- return new tree.Modifiers(blankList());
- }
-
- tree.Modifiers makeModifiers(
- {bool isExternal: false,
- bool isStatic: false,
- bool isAbstract: false,
- bool isFactory: false,
- bool isConst: false,
- bool isFinal: false,
- bool isVar: false}) {
- List<tree.Node> nodes = [];
- if (isExternal) {
- nodes.add(makeIdentifier('external'));
- }
- if (isStatic) {
- nodes.add(makeIdentifier('static'));
- }
- if (isAbstract) {
- nodes.add(makeIdentifier('abstract'));
- }
- if (isFactory) {
- nodes.add(makeIdentifier('factory'));
- }
- if (isConst) {
- nodes.add(makeIdentifier('const'));
- }
- if (isFinal) {
- nodes.add(makeIdentifier('final'));
- }
- if (isVar) {
- nodes.add(makeIdentifier('var'));
- }
- return new tree.Modifiers(makeList(' ', nodes));
- }
-
- tree.Modifiers makeVarModifiers(
- {bool isConst: false,
- bool isFinal: false,
- bool useVar: false,
- bool isStatic: false}) {
- return makeModifiers(
- isStatic: isStatic,
- isConst: isConst,
- isFinal: isFinal,
- isVar: useVar && !(isConst || isFinal));
- }
-
- tree.Modifiers makeFunctionModifiers(FunctionExpression exp) {
- if (exp.element == null) return makeEmptyModifiers();
- return makeModifiers(
- isExternal: exp.element.isExternal,
- isStatic: exp.element.isStatic,
- isFactory: exp.element.isFactoryConstructor,
- isConst: exp.element.isConst);
- }
-
- tree.Node makeNodeForClassElement(elements.ClassElement cls) {
- if (cls.isMixinApplication) {
- return makeNamedMixinApplication(cls);
- } else if (cls.isEnumClass) {
- return makeEnum(cls);
- } else {
- return makeClassNode(cls);
- }
- }
-
- tree.Typedef makeTypedef(elements.TypedefElement typdef) {
- types.FunctionType functionType = typdef.alias;
- final tree.TypeAnnotation returnType =
- makeType(TypeGenerator.createType(functionType.returnType));
-
- final tree.Identifier name = makeIdentifier(typdef.name);
- final tree.NodeList typeParameters =
- makeTypeParameters(typdef.typeVariables);
- final tree.NodeList formals =
- makeParameters(TypeGenerator.createParametersFromType(functionType));
-
- final Token typedefKeyword = typedefToken;
- final Token endToken = semicolon;
-
- return new tree.Typedef(
- returnType, name, typeParameters, formals, typedefKeyword, endToken);
- }
-
- /// Create a [tree.NodeList] containing the type variable declarations in
- /// [typeVaraiables.
- tree.NodeList makeTypeParameters(List<types.DartType> typeVariables) {
- if (typeVariables.isEmpty) {
- return new tree.NodeList.empty();
- } else {
- List<tree.Node> typeVariableList = <tree.Node>[];
- for (types.TypeVariableType typeVariable in typeVariables) {
- tree.Node id = makeIdentifier(typeVariable.name);
- treeElements[id] = typeVariable.element;
- tree.Node bound;
- if (!typeVariable.element.bound.isObject) {
- bound =
- makeType(TypeGenerator.createType(typeVariable.element.bound));
- }
- tree.TypeVariable node = new tree.TypeVariable(id, extendsToken, bound);
- treeElements.setType(node, typeVariable);
- typeVariableList.add(node);
- }
- return makeList(',', typeVariableList, open: lt, close: gt);
- }
- }
-
- /// Create a [tree.NodeList] containing the declared interfaces.
- ///
- /// [interfaces] is from [elements.ClassElement] in reverse declaration order
- /// and it contains mixins. To produce a list of the declared interfaces only,
- /// interfaces in [mixinTypes] are omitted.
- ///
- /// [forNamedMixinApplication] is because the structure of the [tree.NodeList]
- /// differs between [tree.NamedMixinApplication] and [tree.ClassNode].
- // TODO(johnniwinther): Normalize interfaces on[tree.NamedMixinApplication]
- // and [tree.ClassNode].
- tree.NodeList makeInterfaces(
- Link<types.DartType> interfaces, Set<types.DartType> mixinTypes,
- {bool forNamedMixinApplication: false}) {
- Link<tree.Node> typeAnnotations = const Link<tree.Node>();
- for (Link<types.DartType> link = interfaces;
- !link.isEmpty;
- link = link.tail) {
- types.DartType interface = link.head;
- if (!mixinTypes.contains(interface)) {
- typeAnnotations = typeAnnotations
- .prepend(makeType(TypeGenerator.createType(interface)));
- }
- }
- if (typeAnnotations.isEmpty) {
- return forNamedMixinApplication ? null : new tree.NodeList.empty();
- } else {
- return new tree.NodeList(
- forNamedMixinApplication ? null : implementsToken,
- typeAnnotations,
- null,
- ',');
- }
- }
-
- /// Creates a [tree.NamedMixinApplication] node for [cls].
- // TODO(johnniwinther): Unify creation of mixin lists between
- // [NamedMixinApplicationElement] and [ClassElement].
- tree.NamedMixinApplication makeNamedMixinApplication(
- elements.MixinApplicationElement cls) {
- assert(invariant(cls, !cls.isUnnamedMixinApplication,
- message: "Cannot create ClassNode for unnamed mixin application "
- "$cls."));
- tree.Modifiers modifiers = makeModifiers(isAbstract: cls.isAbstract);
- tree.Identifier name = makeIdentifier(cls.name);
- tree.NodeList typeParameters = makeTypeParameters(cls.typeVariables);
-
- Set<types.DartType> mixinTypes = new Set<types.DartType>();
- Link<tree.Node> mixins = const Link<tree.Node>();
-
- void addMixin(types.DartType mixinType) {
- mixinTypes.add(mixinType);
- mixins = mixins.prepend(makeType(TypeGenerator.createType(mixinType)));
- }
-
- addMixin(cls.mixinType);
-
- tree.Node superclass;
- types.InterfaceType supertype = cls.supertype;
- while (supertype.element.isUnnamedMixinApplication) {
- elements.MixinApplicationElement mixinApplication = supertype.element;
- addMixin(cls.asInstanceOf(mixinApplication.mixin));
- supertype = mixinApplication.supertype;
- }
- superclass =
- makeType(TypeGenerator.createType(cls.asInstanceOf(supertype.element)));
- tree.Node supernode = new tree.MixinApplication(
- superclass, new tree.NodeList(null, mixins, null, ','));
-
- tree.NodeList interfaces = makeInterfaces(cls.interfaces, mixinTypes,
- forNamedMixinApplication: true);
-
- return new tree.NamedMixinApplication(name, typeParameters, modifiers,
- supernode, interfaces, classToken, semicolon);
- }
-
- tree.Enum makeEnum(elements.EnumClassElement cls) {
- return new tree.Enum(
- enumToken,
- makeIdentifier(cls.name),
- makeList(',', cls.enumValues.map((e) => makeIdentifier(e.name)),
- open: openBrace, close: closeBrace));
- }
-
- /// Creates a [tree.ClassNode] node for [cls].
- tree.ClassNode makeClassNode(elements.ClassElement cls) {
- assert(invariant(cls, !cls.isUnnamedMixinApplication,
- message: "Cannot create ClassNode for unnamed mixin application "
- "$cls."));
- tree.Modifiers modifiers = makeModifiers(isAbstract: cls.isAbstract);
- tree.Identifier name = makeIdentifier(cls.name);
- tree.NodeList typeParameters = makeTypeParameters(cls.typeVariables);
- tree.Node supernode;
- types.InterfaceType supertype = cls.supertype;
- Set<types.DartType> mixinTypes = new Set<types.DartType>();
- Link<tree.Node> mixins = const Link<tree.Node>();
-
- void addMixin(types.DartType mixinType) {
- mixinTypes.add(mixinType);
- mixins = mixins.prepend(makeType(TypeGenerator.createType(mixinType)));
- }
-
- if (supertype != null) {
- if (supertype.element.isUnnamedMixinApplication) {
- while (supertype.element.isUnnamedMixinApplication) {
- elements.MixinApplicationElement mixinApplication = supertype.element;
- addMixin(cls.asInstanceOf(mixinApplication.mixin));
- supertype = mixinApplication.supertype;
- }
- tree.Node superclass = makeType(
- TypeGenerator.createType(cls.asInstanceOf(supertype.element)));
- supernode = new tree.MixinApplication(
- superclass, new tree.NodeList(null, mixins, null, ','));
- } else if (!supertype.isObject) {
- supernode = makeType(TypeGenerator.createType(supertype));
- }
- }
- tree.NodeList interfaces = makeInterfaces(cls.interfaces, mixinTypes);
-
- Token extendsKeyword = supernode != null ? extendsToken : null;
- return new tree.ClassNode(
- modifiers,
- name,
- typeParameters,
- supernode,
- interfaces,
- openBrace,
- extendsKeyword,
- null, // No body.
- closeBrace);
- }
-
- tree.Node constructorName(ConstructorDefinition exp) {
- String name = exp.name;
- tree.Identifier className = makeIdentifier(exp.element.enclosingClass.name);
- tree.Node result =
- name == "" ? className : new tree.Send(className, makeIdentifier(name));
- setElement(result, exp.element, exp);
- return result;
- }
-
- tree.Node functionName(FunctionExpression exp) {
- String name = exp.name;
- if (name == null) return null;
- if (isUserDefinableOperator(name)) {
- return makeOperator("operator$name");
- } else if (name == "unary-") {
- return makeOperator("operator-");
- }
- return makeIdentifier(name);
- }
-
- tree.Node parenthesize(tree.Node node) {
- return new tree.ParenthesizedExpression(node, openParen);
- }
-
- tree.Node unparseStringLiteral(Expression exp) {
- StringLiteralOutput output = Unparser.analyzeStringLiteral(exp);
- List parts = output.parts;
- tree.Node printStringChunk(StringChunk chunk) {
- bool raw = chunk.quoting.raw;
- int quoteCode = chunk.quoting.quote;
-
- List<tree.StringInterpolationPart> literalParts = [];
- tree.LiteralString firstLiteral;
- tree.Node currentInterpolation;
-
- // sb contains the current unfinished LiteralString
- StringBuffer sb = new StringBuffer();
- if (raw) {
- sb.write('r');
- }
- for (int i = 0; i < chunk.quoting.leftQuoteCharCount; i++) {
- sb.write(chunk.quoting.quoteChar);
- }
-
- // Print every character and string interpolation
- int startIndex = chunk.previous != null ? chunk.previous.endIndex : 0;
- for (int i = startIndex; i < chunk.endIndex; i++) {
- var part = parts[i];
- if (part is Expression) {
- // Finish the previous string interpolation, if there is one.
- tree.LiteralString lit = makeVerbatimStringLiteral(sb.toString());
- if (currentInterpolation != null) {
- literalParts.add(
- new tree.StringInterpolationPart(currentInterpolation, lit));
- } else {
- firstLiteral = lit;
- }
- sb.clear();
- currentInterpolation = makeExpression(part);
- } else {
- int char = part;
- sb.write(Unparser.getEscapedCharacter(char, quoteCode, raw));
- }
- }
-
- // Print ending quotes
- for (int i = 0; i < chunk.quoting.rightQuoteLength; i++) {
- sb.write(chunk.quoting.quoteChar);
- }
-
- // Finish the previous string interpolation, if there is one.
- // Then wrap everything in a StringInterpolation, if relevant.
- tree.LiteralString lit = makeVerbatimStringLiteral(sb.toString());
- tree.Node node;
- if (firstLiteral == null) {
- node = lit;
- } else {
- literalParts
- .add(new tree.StringInterpolationPart(currentInterpolation, lit));
- node = new tree.StringInterpolation(
- firstLiteral, makeList('', literalParts));
- }
-
- // Juxtapose with the previous string chunks, if any.
- if (chunk.previous != null) {
- return new tree.StringJuxtaposition(
- printStringChunk(chunk.previous), node);
- } else {
- return node;
- }
- }
- return printStringChunk(output.chunk);
- }
-}
diff --git a/pkg/compiler/lib/src/dart_backend/dart_backend.dart b/pkg/compiler/lib/src/dart_backend/dart_backend.dart
deleted file mode 100644
index 729091f..0000000
--- a/pkg/compiler/lib/src/dart_backend/dart_backend.dart
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart_backend;
-
-import 'dart:async' show Future;
-import 'dart:math' show max;
-
-import '../../compiler.dart' show CompilerOutputProvider;
-import '../common.dart';
-import '../common/backend_api.dart' show Backend, ImpactTransformer;
-import '../common/codegen.dart' show CodegenWorkItem;
-import '../common/names.dart' show Selectors, Uris;
-import '../common/registry.dart' show Registry;
-import '../common/resolution.dart' show Resolution, ResolutionImpact;
-import '../common/tasks.dart' show CompilerTask;
-import '../compiler.dart' show Compiler;
-import '../compile_time_constants.dart';
-import '../constants/constant_system.dart';
-import '../constants/expressions.dart';
-import '../constants/values.dart';
-import '../dart_types.dart';
-import '../elements/elements.dart';
-import '../enqueue.dart' show Enqueuer, ResolutionEnqueuer;
-import '../library_loader.dart' show LoadedLibraries;
-import '../mirror_renamer/mirror_renamer.dart';
-import '../resolution/tree_elements.dart' show TreeElements, TreeElementMapping;
-import '../tokens/keyword.dart' show Keyword;
-import '../tree/tree.dart';
-import '../universe/selector.dart' show Selector;
-import '../universe/use.dart' show DynamicUse, TypeUse, TypeUseKind;
-import '../universe/world_impact.dart' show WorldImpact, TransformedWorldImpact;
-import '../util/util.dart';
-import 'backend_ast_to_frontend_ast.dart' as backend2frontend;
-
-part 'backend.dart';
-part 'renamer.dart';
-part 'placeholder_collector.dart';
-part 'outputter.dart';
diff --git a/pkg/compiler/lib/src/dart_backend/outputter.dart b/pkg/compiler/lib/src/dart_backend/outputter.dart
deleted file mode 100644
index ce9022a..0000000
--- a/pkg/compiler/lib/src/dart_backend/outputter.dart
+++ /dev/null
@@ -1,576 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart_backend;
-
-typedef bool IsSafeToRemoveTypeDeclarations(
- Map<ClassElement, Iterable<Element>> classMembers);
-typedef void ElementCallback<E>(E element);
-typedef void ElementPostProcessFunction(
- AstElement element,
- ElementAst elementAst,
- ElementCallback<TypedefElement> typedefCallback,
- ElementCallback<ClassElement> classCallback);
-typedef ElementAst ComputeElementAstFunction(AstElement element);
-typedef bool ElementFilter(Element element);
-typedef List<Element> ElementSorter(Iterable<Element> elements);
-
-/// Output engine for dart2dart that is shared between the dart2js and the
-/// analyzer implementations of dart2dart.
-class DartOutputter {
- final DiagnosticReporter reporter;
- final CompilerOutputProvider outputProvider;
- final bool forceStripTypes;
-
- // TODO(antonm): make available from command-line options.
- final bool outputAst = false;
- final bool enableMinification;
-
- /// If `true`, libraries are generated into separate files.
- final bool multiFile;
-
- /// Internal structures accessible for tests and logging.
- // TODO(johnniwinther): Clean this up.
- PlaceholderRenamer renamer;
- MainOutputGenerator output;
- LibraryInfo libraryInfo;
- ElementInfo elementInfo;
-
- // TODO(johnniwinther): Support recompilation.
- DartOutputter(this.reporter, this.outputProvider,
- {bool this.forceStripTypes: false,
- bool this.enableMinification: false,
- bool this.multiFile: false});
-
- /// Generate Dart code for the program starting at [mainFunction].
- ///
- /// [libraries] is the set of all libraries (user/package/sdk) that are
- /// referenced in the program.
- ///
- /// [instantiatedClasses] is the set of classes that are potentially
- /// instantiated in the program.
- ///
- /// [resolvedElements] is the set of methods, constructors, and fields that
- /// are potentially accessed/called in the program.
- ///
- /// The [sortElements] function is used to sort [instantiatedClasses] and
- /// [resolvedElements] in the generated output.
- ///
- /// Returns the total size of the generated code.
- int assembleProgram(
- {MirrorRenamer mirrorRenamer: const MirrorRenamer(),
- Iterable<LibraryElement> libraries,
- Iterable<Element> instantiatedClasses,
- Iterable<Element> resolvedElements,
- Iterable<ClassElement> usedTypeLiterals: const <ClassElement>[],
- FunctionElement mainFunction,
- Uri outputUri,
- ElementPostProcessFunction postProcessElementAst,
- ComputeElementAstFunction computeElementAst,
- ElementFilter shouldOutput,
- IsSafeToRemoveTypeDeclarations isSafeToRemoveTypeDeclarations,
- ElementSorter sortElements}) {
- assert(invariant(NO_LOCATION_SPANNABLE, libraries != null,
- message: "'libraries' must be non-null."));
- assert(invariant(NO_LOCATION_SPANNABLE, instantiatedClasses != null,
- message: "'instantiatedClasses' must be non-null."));
- assert(invariant(NO_LOCATION_SPANNABLE, resolvedElements != null,
- message: "'resolvedElements' must be non-null."));
- assert(invariant(NO_LOCATION_SPANNABLE, mainFunction != null,
- message: "'mainFunction' must be non-null."));
- assert(invariant(NO_LOCATION_SPANNABLE, computeElementAst != null,
- message: "'computeElementAst' must be non-null."));
- assert(invariant(NO_LOCATION_SPANNABLE, shouldOutput != null,
- message: "'shouldOutput' must be non-null."));
- assert(invariant(
- NO_LOCATION_SPANNABLE, isSafeToRemoveTypeDeclarations != null,
- message: "'isSafeToRemoveTypeDeclarations' must be non-null."));
-
- if (sortElements == null) {
- // Ensure deterministic output order.
- sortElements = (Iterable<Element> elements) {
- List<Element> list = elements.toList();
- list.sort((Element a, Element b) => a.name.compareTo(b.name));
- return list;
- };
- }
-
- libraryInfo =
- LibraryInfo.processLibraries(reporter, libraries, resolvedElements);
-
- elementInfo = ElementInfoProcessor.createElementInfo(
- instantiatedClasses, resolvedElements, usedTypeLiterals,
- postProcessElementAst: postProcessElementAst,
- parseElementAst: computeElementAst,
- shouldOutput: shouldOutput,
- sortElements: sortElements);
-
- PlaceholderCollector collector = collectPlaceholders(
- reporter, mirrorRenamer, mainFunction, libraryInfo, elementInfo);
-
- renamer = createRenamer(collector, libraryInfo, elementInfo,
- enableMinification: enableMinification,
- forceStripTypes: forceStripTypes,
- isSafeToRemoveTypeDeclarations: isSafeToRemoveTypeDeclarations);
-
- if (outputAst) {
- String code = astOutput(reporter, elementInfo);
- outputProvider("", "dart")
- ..add(code)
- ..close();
- return code.length;
- } else {
- output = new MainOutputGenerator();
- return output.generateCode(libraryInfo, elementInfo, collector, renamer,
- mainFunction, outputUri, outputProvider, mirrorRenamer,
- multiFile: multiFile,
- forceStripTypes: forceStripTypes,
- enableMinification: enableMinification);
- }
- }
-
- static PlaceholderCollector collectPlaceholders(
- DiagnosticReporter reporter,
- MirrorRenamer mirrorRenamer,
- FunctionElement mainFunction,
- LibraryInfo libraryInfo,
- ElementInfo elementInfo) {
- // Create all necessary placeholders.
- PlaceholderCollector collector = new PlaceholderCollector(
- reporter,
- mirrorRenamer,
- libraryInfo.fixedDynamicNames,
- elementInfo.elementAsts,
- mainFunction);
-
- makePlaceholders(element) {
- collector.collect(element);
-
- if (element.isClass && !element.isEnumClass) {
- elementInfo.classMembers[element].forEach(makePlaceholders);
- }
- }
- elementInfo.topLevelElements.forEach(makePlaceholders);
- return collector;
- }
-
- static PlaceholderRenamer createRenamer(PlaceholderCollector collector,
- LibraryInfo libraryInfo, ElementInfo elementInfo,
- {bool enableMinification: false,
- bool forceStripTypes: false,
- isSafeToRemoveTypeDeclarations}) {
- // Create renames.
- bool shouldCutDeclarationTypes = forceStripTypes ||
- (enableMinification &&
- isSafeToRemoveTypeDeclarations(elementInfo.classMembers));
-
- PlaceholderRenamer placeholderRenamer = new PlaceholderRenamer(
- libraryInfo.fixedDynamicNames,
- libraryInfo.fixedStaticNames,
- libraryInfo.reexportingLibraries,
- cutDeclarationTypes: shouldCutDeclarationTypes,
- enableMinification: enableMinification);
-
- placeholderRenamer.computeRenames(collector);
- return placeholderRenamer;
- }
-
- static String astOutput(
- DiagnosticReporter reporter, ElementInfo elementInfo) {
- // TODO(antonm): Ideally XML should be a separate backend.
- // TODO(antonm): obey renames and minification, at least as an option.
- StringBuffer sb = new StringBuffer();
- outputElement(element) {
- sb.write(element.parseNode(reporter).toDebugString());
- }
-
- // Emit XML for AST instead of the program.
- for (Element topLevel in elementInfo.topLevelElements) {
- if (topLevel.isClass &&
- !elementInfo.emitNoMembersFor.contains(topLevel)) {
- // TODO(antonm): add some class info.
- elementInfo.classMembers[topLevel].forEach(outputElement);
- } else {
- outputElement(topLevel);
- }
- }
- return '<Program>\n$sb</Program>\n';
- }
-}
-
-class LibraryInfo {
- final Set<String> fixedStaticNames;
- final Set<String> fixedDynamicNames;
- final Map<Element, LibraryElement> reexportingLibraries;
- final List<LibraryElement> userLibraries;
-
- LibraryInfo(this.fixedStaticNames, this.fixedDynamicNames,
- this.reexportingLibraries, this.userLibraries);
-
- static LibraryInfo processLibraries(
- DiagnosticReporter reporter,
- Iterable<LibraryElement> libraries,
- Iterable<AstElement> resolvedElements) {
- Set<String> fixedStaticNames = new Set<String>();
- Set<String> fixedDynamicNames = new Set<String>();
- Map<Element, LibraryElement> reexportingLibraries =
- <Element, LibraryElement>{};
- List<LibraryElement> userLibraries = <LibraryElement>[];
- // Conservatively traverse all platform libraries and collect member names.
- // TODO(antonm): ideally we should only collect names of used members,
- // however as of today there are problems with names of some core library
- // interfaces, most probably for interfaces of literals.
-
- for (LibraryElement library in libraries) {
- if (!library.isPlatformLibrary) {
- userLibraries.add(library);
- continue;
- }
- library.forEachLocalMember((Element element) {
- if (element.isClass) {
- ClassElement classElement = element;
- assert(invariant(classElement, classElement.isResolved,
- message: "Unresolved platform class."));
- classElement.forEachLocalMember((member) {
- if (member.isInstanceMember) {
- fixedDynamicNames.add(member.name);
- } else {
- fixedStaticNames.add(member.name);
- }
- });
- }
- // Even class names are added due to a delicate problem we have:
- // if one imports dart:core with a prefix, we cannot tell prefix.name
- // from dynamic invocation (alas!). So we'd better err on preserving
- // those names.
- fixedStaticNames.add(element.name);
- });
-
- library.forEachExport((Element export) {
- if (!library.isInternalLibrary && export.library.isInternalLibrary) {
- // If an element of an internal library is reexported by a platform
- // library, we have to import the reexporting library instead of the
- // internal library, because the internal library is an
- // implementation detail of dart2js.
- reexportingLibraries[export] = library;
- }
- });
- }
-
- // Map to keep track of names of enum classes. Since these cannot be renamed
- // we ensure that they are unique.
- Map<String, ClassElement> enumClassMap = <String, ClassElement>{};
-
- // As of now names of named optionals are not renamed. Therefore add all
- // field names used as named optionals into [fixedMemberNames].
- for (final element in resolvedElements) {
- if (!element.isConstructor) continue;
- for (ParameterElement parameter in element.parameters) {
- if (parameter.isInitializingFormal && parameter.isNamed) {
- fixedDynamicNames.add(parameter.name);
- }
- }
- ClassElement cls = element.enclosingClass;
- if (cls != null && cls.isEnumClass) {
- fixedDynamicNames.add('index');
-
- ClassElement existingEnumClass =
- enumClassMap.putIfAbsent(cls.name, () => cls);
- if (existingEnumClass != cls) {
- reporter.reportError(
- reporter.createMessage(cls, MessageKind.GENERIC, {
- 'text': "Duplicate enum names are not supported "
- "in dart2dart."
- }),
- <DiagnosticMessage>[
- reporter.createMessage(existingEnumClass, MessageKind.GENERIC, {
- 'text': "This is the other declaration of '${cls.name}'."
- }),
- ]);
- }
- }
- }
-
- fixedStaticNames.addAll(enumClassMap.keys);
-
- // The VM will automatically invoke the call method of objects
- // that are invoked as functions. Make sure to not rename that.
- fixedDynamicNames.add('call');
-
- return new LibraryInfo(fixedStaticNames, fixedDynamicNames,
- reexportingLibraries, userLibraries);
- }
-}
-
-class ElementInfo {
- final Map<Element, ElementAst> elementAsts;
- final Iterable<Element> topLevelElements;
- final Map<ClassElement, Iterable<Element>> classMembers;
- final Iterable<ClassElement> emitNoMembersFor;
-
- ElementInfo(this.elementAsts, this.topLevelElements, this.classMembers,
- this.emitNoMembersFor);
-}
-
-class ElementInfoProcessor implements ElementInfo {
- final Map<Element, ElementAst> elementAsts = new Map<Element, ElementAst>();
- final Set<Element> topLevelElements = new Set<Element>();
- final Map<ClassElement, Set<Element>> classMembers =
- new Map<ClassElement, Set<Element>>();
- final Set<ClassElement> emitNoMembersFor = new Set<ClassElement>();
- final ElementPostProcessFunction postProcessElementAst;
- final ComputeElementAstFunction parseElementAst;
- final ElementFilter shouldOutput;
-
- ElementInfoProcessor(
- {this.postProcessElementAst, this.parseElementAst, this.shouldOutput});
-
- static ElementInfo createElementInfo(
- Iterable<ClassElement> instantiatedClasses,
- Iterable<AstElement> resolvedElements,
- Iterable<ClassElement> usedTypeLiterals,
- {ElementPostProcessFunction postProcessElementAst,
- ComputeElementAstFunction parseElementAst,
- ElementFilter shouldOutput,
- ElementSorter sortElements}) {
- ElementInfoProcessor processor = new ElementInfoProcessor(
- postProcessElementAst: postProcessElementAst,
- parseElementAst: parseElementAst,
- shouldOutput: shouldOutput);
- return processor.process(
- instantiatedClasses, resolvedElements, usedTypeLiterals,
- sortElements: sortElements);
- }
-
- ElementInfo process(
- Iterable<ClassElement> instantiatedClasses,
- Iterable<AstElement> resolvedElements,
- Iterable<ClassElement> usedTypeLiterals,
- {ElementSorter sortElements}) {
- // Build all top level elements to emit and necessary class members.
- instantiatedClasses.where(shouldOutput).forEach(addClass);
- resolvedElements.where(shouldOutput).forEach(addMember);
- usedTypeLiterals.forEach((ClassElement element) {
- if (shouldOutput(element)) {
- if (!topLevelElements.contains(element)) {
- // The class is only referenced by type literals.
- emitNoMembersFor.add(element);
- }
- addClass(element);
- }
- });
-
- // Sort elements.
- List<Element> sortedTopLevels = sortElements(topLevelElements);
- Map<ClassElement, List<Element>> sortedClassMembers =
- new Map<ClassElement, List<Element>>();
- classMembers.forEach((classElement, members) {
- sortedClassMembers[classElement] = sortElements(members);
- });
-
- return new ElementInfo(
- elementAsts, sortedTopLevels, sortedClassMembers, emitNoMembersFor);
- }
-
- void processElement(Element element, ElementAst elementAst) {
- if (postProcessElementAst != null) {
- postProcessElementAst(element, elementAst, newTypedefElementCallback,
- newClassElementCallback);
- }
- elementAsts[element] = elementAst;
- }
-
- void addTopLevel(AstElement element, ElementAst elementAst) {
- if (topLevelElements.contains(element)) return;
- topLevelElements.add(element);
- processElement(element, elementAst);
- }
-
- void addClass(ClassElement classElement) {
- TreeElements treeElements = new TreeElementMapping(classElement);
- backend2frontend.TreePrinter treePrinter =
- new backend2frontend.TreePrinter(treeElements);
- Node node = treePrinter.makeNodeForClassElement(classElement);
- addTopLevel(classElement, new ElementAst(node, treeElements));
- classMembers.putIfAbsent(classElement, () => new Set());
- }
-
- void newTypedefElementCallback(TypedefElement element) {
- if (!shouldOutput(element)) return;
- TreeElements treeElements = new TreeElementMapping(element);
- backend2frontend.TreePrinter treePrinter =
- new backend2frontend.TreePrinter(treeElements);
- Node node = treePrinter.makeTypedef(element);
- addTopLevel(element, new ElementAst(node, treeElements));
- }
-
- void newClassElementCallback(ClassElement classElement) {
- if (!shouldOutput(classElement)) return;
- addClass(classElement);
- }
-
- void addMember(element) {
- if (element.isClassMember) {
- ClassElement enclosingClass = element.enclosingClass;
- assert(enclosingClass.isClass);
- assert(shouldOutput(enclosingClass));
- addClass(enclosingClass);
- classMembers[enclosingClass].add(element);
- if (enclosingClass.isEnumClass) return;
- processElement(element, parseElementAst(element));
- } else {
- if (element.isTopLevel) {
- addTopLevel(element, parseElementAst(element));
- }
- }
- }
-}
-
-/// Main output generator for [DartOutputter] that emits dart code through a
-/// [CompilerOutputProvider].
-class MainOutputGenerator {
- final Map<ClassNode, List<Node>> memberNodes =
- new Map<ClassNode, List<Node>>();
- final List<Node> topLevelNodes = <Node>[];
-
- /// Generates the code and returns the total size.
- int generateCode(
- LibraryInfo libraryInfo,
- ElementInfo elementInfo,
- PlaceholderCollector collector,
- PlaceholderRenamer placeholderRenamer,
- FunctionElement mainFunction,
- Uri outputUri,
- CompilerOutputProvider outputProvider,
- MirrorRenamer mirrorRenamer,
- {bool multiFile: false,
- bool forceStripTypes: false,
- bool enableMinification: false}) {
- for (Element element in elementInfo.topLevelElements) {
- topLevelNodes.add(elementInfo.elementAsts[element].ast);
- if (element.isClass) {
- ClassElement cls = element;
- if (cls.isMixinApplication || cls.isEnumClass) {
- continue;
- }
- final members = <Node>[];
- for (Element member in elementInfo.classMembers[cls]) {
- members.add(elementInfo.elementAsts[member].ast);
- }
- memberNodes[elementInfo.elementAsts[cls].ast] = members;
- }
- }
-
- mirrorRenamer.addRenames(
- placeholderRenamer.renames, topLevelNodes, collector);
-
- Map<LibraryElement, String> outputPaths = new Map<LibraryElement, String>();
- Map<LibraryElement, EmitterUnparser> unparsers =
- new Map<LibraryElement, EmitterUnparser>();
-
- // The single unparser used if we collect all the output in one file.
- EmitterUnparser mainUnparser = multiFile
- ? null
- : new EmitterUnparser(placeholderRenamer.renames,
- stripTypes: forceStripTypes, minify: enableMinification);
-
- if (multiFile) {
- // TODO(sigurdm): Factor handling of library-paths out from emitting.
- String mainName = outputUri.pathSegments.last;
- String mainBaseName = mainName.endsWith(".dart")
- ? mainName.substring(0, mainName.length - 5)
- : mainName;
- // Map each library to a path based on the uri of the original
- // library and [compiler.options.outputUri].
- Set<String> usedLibraryPaths = new Set<String>();
- for (LibraryElement library in libraryInfo.userLibraries) {
- if (library == mainFunction.library) {
- outputPaths[library] = mainBaseName;
- } else {
- List<String> names =
- library.canonicalUri.pathSegments.last.split(".");
- if (names.last == "dart") {
- names = names.sublist(0, names.length - 1);
- }
- outputPaths[library] =
- "$mainBaseName.${makeUnique(names.join("."), usedLibraryPaths)}";
- }
- }
-
- /// Rewrites imports/exports to refer to the paths given in [outputPaths].
- for (LibraryElement outputLibrary in libraryInfo.userLibraries) {
- EmitterUnparser unparser = new EmitterUnparser(
- placeholderRenamer.renames,
- stripTypes: forceStripTypes,
- minify: enableMinification);
- unparsers[outputLibrary] = unparser;
- if (outputLibrary.hasLibraryName) {
- unparser.unparseLibraryName(outputLibrary.libraryName);
- }
- for (ImportElement import in outputLibrary.imports) {
- LibraryElement libraryElement = import.importedLibrary;
- String uri = outputPaths.containsKey(libraryElement)
- ? "${outputPaths[libraryElement]}.dart"
- : libraryElement.canonicalUri.toString();
- unparser.unparseImportTag(uri);
- }
- for (ExportElement export in outputLibrary.exports) {
- LibraryElement libraryElement = export.exportedLibrary;
- String uri = outputPaths.containsKey(libraryElement)
- ? "${outputPaths[libraryElement]}.dart"
- : libraryElement.canonicalUri.toString();
- unparser.unparseExportTag(uri);
- }
- }
- } else {
- placeholderRenamer.platformImports
- .forEach((LibraryElement library, String prefix) {
- assert(library.isPlatformLibrary && !library.isInternalLibrary);
- mainUnparser.unparseImportTag(library.canonicalUri.toString());
- if (prefix != null) {
- // Adding a prefixed import because (some) top-level access need
- // it to avoid shadowing.
- // TODO(johnniwinther): Avoid prefix-less import if not needed.
- mainUnparser.unparseImportTag(library.canonicalUri.toString(),
- prefix: prefix);
- }
- });
- }
-
- for (int i = 0; i < elementInfo.topLevelElements.length; i++) {
- Element element = elementInfo.topLevelElements.elementAt(i);
- Node node = topLevelNodes[i];
- Unparser unparser = multiFile ? unparsers[element.library] : mainUnparser;
- if (node is ClassNode) {
- // TODO(smok): Filter out default constructors here.
- unparser.unparseClassWithBody(node, memberNodes[node]);
- } else {
- unparser.unparse(node);
- }
- unparser.newline();
- }
-
- int totalSize = 0;
- if (multiFile) {
- for (LibraryElement outputLibrary in libraryInfo.userLibraries) {
- // TODO(sigurdm): Make the unparser output directly into the buffer
- // instead of caching in `.result`.
- String code = unparsers[outputLibrary].result;
- totalSize += code.length;
- outputProvider(outputPaths[outputLibrary], "dart")
- ..add(code)
- ..close();
- }
- } else {
- String code = mainUnparser.result;
- outputProvider("", "dart")
- ..add(code)
- ..close();
-
- totalSize = code.length;
- }
-
- return totalSize;
- }
-}
diff --git a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
deleted file mode 100644
index 65f2576..0000000
--- a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
+++ /dev/null
@@ -1,724 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart_backend;
-
-class LocalPlaceholder {
- final String identifier;
- final Set<Node> nodes;
- LocalPlaceholder(this.identifier) : nodes = new Set<Node>();
- int get hashCode => identifier.hashCode;
- String toString() => 'local_placeholder[id($identifier), nodes($nodes)]';
-}
-
-class FunctionScope {
- final Set<String> parameterIdentifiers;
- final Set<LocalPlaceholder> localPlaceholders;
- FunctionScope()
- : parameterIdentifiers = new Set<String>(),
- localPlaceholders = new Set<LocalPlaceholder>();
- void registerParameter(Identifier node) {
- parameterIdentifiers.add(node.source);
- }
-}
-
-class ConstructorPlaceholder {
- final Identifier node;
- final ConstructorElement element;
-
- ConstructorPlaceholder(this.node, this.element);
-}
-
-class DeclarationTypePlaceholder {
- final TypeAnnotation typeNode;
- final bool requiresVar;
- DeclarationTypePlaceholder(this.typeNode, this.requiresVar);
-}
-
-class SendVisitor extends Visitor {
- final TreeElements elements;
- final PlaceholderCollector collector;
-
- SendVisitor(this.collector, this.elements);
-
- visitSend(Send node) {
- Element element = elements[node];
- if (elements.isTypeLiteral(node)) {
- DartType type = elements.getTypeLiteralType(node);
- if (!type.isDynamic) {
- if (type is TypeVariableType) {
- collector.makeTypeVariablePlaceholder(node.selector, type);
- } else {
- collector.makeTypePlaceholder(node.selector, type);
- }
- }
- } else if (node.isSuperCall) {
- if (element != null && element.isConstructor) {
- collector.tryMakeConstructorPlaceholder(node, element);
- } else {
- collector.tryMakeMemberPlaceholder(node.selector);
- }
- } else if (node.isOperator) {
- return;
- } else if (node.isPropertyAccess) {
- if (!Elements.isUnresolved(element) && element.impliesType) {
- collector.makeElementPlaceholder(node, element);
- } else {
- visitGetterSend(node);
- }
- } else if (element != null && Initializers.isConstructorRedirect(node)) {
- visitStaticSend(node);
- } else if (Elements.isClosureSend(node, element)) {
- if (element != null) {
- collector.tryMakeLocalPlaceholder(element, node.selector);
- }
- } else {
- if (Elements.isUnresolved(element)) {
- if (element == null) {
- // Example: f() with 'f' unbound.
- // This can only happen inside an instance method.
- visitDynamicSend(node);
- } else {
- visitStaticSend(node);
- }
- } else if (element.isInstanceMember) {
- // Example: f() with 'f' bound to instance method.
- visitDynamicSend(node);
- } else if (!element.isInstanceMember) {
- // Example: A.f() or f() with 'f' bound to a static function.
- // Also includes new A() or new A.named() which is treated like a
- // static call to a factory.
- visitStaticSend(node);
- }
- }
- }
-
- visitDynamicSend(Send node) {
- final element = elements[node];
- if (element == null || !element.isMalformed) {
- collector.tryMakeMemberPlaceholder(node.selector);
- }
- }
-
- visitGetterSend(Send node) {
- final element = elements[node];
- // element == null means dynamic property access.
- if (element == null) {
- collector.tryMakeMemberPlaceholder(node.selector);
- } else if (element.isMalformed) {
- collector.makeUnresolvedPlaceholder(node);
- return;
- } else if (element.isPrefix) {
- // Node is prefix part in case of source 'lib.somesetter = 5;'
- collector.makeErasePrefixPlaceholder(node);
- } else if (Elements.isStaticOrTopLevel(element)) {
- // Unqualified or prefixed top level or static.
- collector.makeElementPlaceholder(node.selector, element);
- } else if (!element.isTopLevel) {
- if (element.isInstanceMember) {
- collector.tryMakeMemberPlaceholder(node.selector);
- } else {
- // May get FunctionExpression here in selector
- // in case of A(int this.f());
- if (node.selector is Identifier) {
- collector.tryMakeLocalPlaceholder(element, node.selector);
- } else {
- assert(node.selector is FunctionExpression);
- }
- }
- }
- }
-
- visitStaticSend(Send node) {
- Element element = elements[node];
- collector.mirrorRenamer
- .registerStaticSend(collector.currentElement, element, node);
-
- if (Elements.isUnresolved(element) || element.isDeferredLoaderGetter) {
- return;
- }
- if (element.isConstructor || element.isFactoryConstructor) {
- // Rename named constructor in redirection position:
- // class C { C.named(); C.redirecting() : this.named(); }
- if (node.receiver is Identifier &&
- node.receiver.asIdentifier().isThis()) {
- assert(node.selector is Identifier);
- collector.tryMakeConstructorPlaceholder(node, element);
- }
- return;
- }
- collector.makeElementPlaceholder(node.selector, element);
- // Another ugly case: <lib prefix>.<top level> is represented as
- // receiver: lib prefix, selector: top level.
- if (element.isTopLevel && node.receiver != null) {
- assert(elements[node.receiver].isPrefix);
- // Hack: putting null into map overrides receiver of original node.
- collector.makeErasePrefixPlaceholder(node.receiver);
- }
- }
-
- internalError(Spannable node, String reason) {
- collector.internalError(reason, node: node);
- }
-
- visitNode(Node node) {
- internalError(node, "Unhandled node");
- }
-}
-
-class PlaceholderCollector extends Visitor {
- final DiagnosticReporter reporter;
- final MirrorRenamer mirrorRenamer;
- final FunctionElement mainFunction;
- final Set<String> fixedMemberNames; // member names which cannot be renamed.
- final Map<Element, ElementAst> elementAsts;
- final Set<Node> prefixNodesToErase = new Set<Node>();
- final Set<Node> unresolvedNodes = new Set<Node>();
- final Map<Element, Set<Node>> elementNodes = new Map<Element, Set<Node>>();
- final Map<FunctionElement, FunctionScope> functionScopes =
- new Map<FunctionElement, FunctionScope>();
- final Map<LibraryElement, Set<Identifier>> privateNodes =
- new Map<LibraryElement, Set<Identifier>>();
- final List<DeclarationTypePlaceholder> declarationTypePlaceholders =
- new List<DeclarationTypePlaceholder>();
- final Map<String, Set<Identifier>> memberPlaceholders =
- new Map<String, Set<Identifier>>();
- final List<ConstructorPlaceholder> constructorPlaceholders =
- new List<ConstructorPlaceholder>();
- Map<String, LocalPlaceholder> currentLocalPlaceholders;
- Element currentElement;
- FunctionElement topmostEnclosingFunction;
- TreeElements treeElements;
-
- get currentFunctionScope => functionScopes.putIfAbsent(
- topmostEnclosingFunction, () => new FunctionScope());
-
- PlaceholderCollector(this.reporter, this.mirrorRenamer, this.fixedMemberNames,
- this.elementAsts, this.mainFunction);
-
- void collectFunctionDeclarationPlaceholders(
- FunctionElement element, FunctionExpression node) {
- if (element.isConstructor) {
- ConstructorElement constructor = element;
- tryMakeConstructorPlaceholder(node.name, element);
- RedirectingFactoryBody bodyAsRedirectingFactoryBody =
- node.body.asRedirectingFactoryBody();
- if (bodyAsRedirectingFactoryBody != null) {
- // Factory redirection.
- FunctionElement redirectTarget = constructor.immediateRedirectionTarget;
- assert(redirectTarget != null && redirectTarget != element);
- tryMakeConstructorPlaceholder(
- bodyAsRedirectingFactoryBody.constructorReference, redirectTarget);
- }
- } else if (Elements.isStaticOrTopLevel(element)) {
- // Note: this code should only rename private identifiers for class'
- // fields/getters/setters/methods. Top-level identifiers are renamed
- // just to escape conflicts and that should be enough as we shouldn't
- // be able to resolve private identifiers for other libraries.
- makeElementPlaceholder(node.name, element);
- } else if (element.isClassMember) {
- if (node.name is Identifier) {
- tryMakeMemberPlaceholder(node.name);
- } else {
- assert(node.name.asSend().isOperator);
- }
- }
- }
-
- void collectFieldDeclarationPlaceholders(Element element, Node node) {
- Identifier name = node is Identifier ? node : node.asSend().selector;
- if (Elements.isStaticOrTopLevel(element)) {
- makeElementPlaceholder(name, element);
- } else if (Elements.isInstanceField(element)) {
- tryMakeMemberPlaceholder(name);
- }
- }
-
- void collect(Element element) {
- this.currentElement = element;
- this.topmostEnclosingFunction = null;
- final ElementAst elementAst = elementAsts[element];
- this.treeElements = elementAst.treeElements;
- Node elementNode = elementAst.ast;
- if (element is FunctionElement) {
- collectFunctionDeclarationPlaceholders(element, elementNode);
- } else if (element is VariableElement) {
- VariableDefinitions definitions = elementNode;
- Node definition = definitions.definitions.nodes.head;
- collectFieldDeclarationPlaceholders(element, definition);
- makeVarDeclarationTypePlaceholder(definitions);
- } else {
- assert(element is ClassElement || element is TypedefElement);
- }
- currentLocalPlaceholders = new Map<String, LocalPlaceholder>();
- if (!(element is ConstructorElement && element.isRedirectingFactory)) {
- // Do not visit the body of redirecting factories.
- reporter.withCurrentElement(element, () {
- elementNode.accept(this);
- });
- }
- }
-
- // TODO(karlklose): should we create placeholders for these?
- bool isTypedefParameter(Element element) {
- return element != null &&
- element.enclosingElement != null &&
- element.enclosingElement.isTypedef;
- }
-
- void tryMakeLocalPlaceholder(Element element, Identifier node) {
- bool isNamedOptionalParameter() {
- FunctionTypedElement function = element.enclosingElement;
- FunctionSignature signature = function.functionSignature;
- if (!signature.optionalParametersAreNamed) return false;
- for (Element parameter in signature.optionalParameters) {
- if (identical(parameter, element)) return true;
- }
- return false;
- }
- if (element.isRegularParameter &&
- !isTypedefParameter(element) &&
- isNamedOptionalParameter()) {
- currentFunctionScope.registerParameter(node);
- } else if (Elements.isLocal(element) && !isTypedefParameter(element)) {
- makeLocalPlaceholder(node);
- }
- }
-
- void tryMakeMemberPlaceholder(Identifier node) {
- assert(node != null);
- if (node is Operator) return;
- String identifier = node.source;
- if (fixedMemberNames.contains(identifier)) return;
- memberPlaceholders
- .putIfAbsent(identifier, () => new Set<Identifier>())
- .add(node);
- }
-
- void makeTypePlaceholder(Node node, DartType type) {
- Send send = node.asSend();
- if (send != null) {
- // Prefix.
- assert(send.receiver is Identifier);
- assert(send.selector is Identifier);
- makeErasePrefixPlaceholder(send.receiver);
- node = send.selector;
- }
- makeElementPlaceholder(node, type.element);
- }
-
- void makeTypeVariablePlaceholder(Node node, TypeVariableType type) {
- Send send = node.asSend();
- if (send != null) {
- // Prefix.
- assert(send.receiver is Identifier);
- assert(send.selector is Identifier);
- makeErasePrefixPlaceholder(send.receiver);
- node = send.selector;
- }
- tryMakeMemberPlaceholder(node);
- }
-
- void makeOmitDeclarationTypePlaceholder(TypeAnnotation type) {
- if (type == null) return;
- declarationTypePlaceholders
- .add(new DeclarationTypePlaceholder(type, false));
- }
-
- void makeVarDeclarationTypePlaceholder(VariableDefinitions node) {
- // TODO(smok): Maybe instead of calling this method and
- // makeDeclaratioTypePlaceholder have type declaration placeholder
- // collector logic in visitVariableDefinitions when resolver becomes better
- // and/or catch syntax changes.
- if (node.type == null) return;
- bool requiresVar = !node.modifiers.isFinalOrConst;
- declarationTypePlaceholders
- .add(new DeclarationTypePlaceholder(node.type, requiresVar));
- }
-
- /// Marks [node] to be erased in the output.
- /// This is done for library prefixes because they are not used in the output
- /// because all imports are flattened and conflicts are renamed away.
- void makeErasePrefixPlaceholder(Node node) {
- assert(node is Identifier || node is Send);
- prefixNodesToErase.add(node);
- }
-
- void makeElementPlaceholder(Node node, Element element) {
- assert(node != null);
- assert(element != null);
- LibraryElement library = element.library;
- if (identical(element, mainFunction)) return;
- if (library.isDartCore) return;
-
- if (library.isPlatformLibrary && !element.isTopLevel) {
- return;
- }
-
- ClassElement cls = element.enclosingClass;
- if (cls != null && cls.isEnumClass) {
- // Enums and enum values cannot be changed, since the semantics of
- // `toString` is defined by the names of the declarations.
- return;
- }
-
- if (element.isAccessor) {
- element = (element as AccessorElement).abstractField;
- }
- elementNodes.putIfAbsent(element, () => new Set<Node>()).add(node);
- }
-
- /// Marks [node] to be renamed per-library if it names an instance member
- /// and has a private name.
- void tryMakePrivateIdentifier(Node node, Element element) {
- if (node is Identifier &&
- !Elements.isStaticOrTopLevel(element) &&
- !Elements.isLocal(element) &&
- Name.isPrivateName(node.source)) {
- privateNodes
- .putIfAbsent(currentElement.library, () => new Set<Identifier>())
- .add(node);
- }
- }
-
- void makeUnresolvedPlaceholder(Node node) {
- unresolvedNodes.add(node);
- }
-
- void makeLocalPlaceholder(Identifier identifier) {
- LocalPlaceholder getLocalPlaceholder() {
- String name = identifier.source;
- return currentLocalPlaceholders.putIfAbsent(name, () {
- LocalPlaceholder localPlaceholder = new LocalPlaceholder(name);
- currentFunctionScope.localPlaceholders.add(localPlaceholder);
- return localPlaceholder;
- });
- }
- getLocalPlaceholder().nodes.add(identifier);
- }
-
- /// Finds the first constructor on the chain of definingConstructor from
- /// [element] that is not in a synthetic class.
- Element findDefiningConstructor(ConstructorElement element) {
- while (element.definingConstructor != null) {
- element = element.definingConstructor;
- }
- return element;
- }
-
- void tryMakeConstructorPlaceholder(Node node, ConstructorElement element) {
- if (Elements.isUnresolved(element)) {
- makeUnresolvedPlaceholder(node);
- return;
- }
- // A library prefix.
- Node prefix;
- // The name of the class with the constructor.
- Node className;
- // Will be null for unnamed constructors.
- Identifier constructorName;
- // First deconstruct the constructor, there are 4 possibilities:
- // ClassName()
- // prefix.ClassName()
- // ClassName.constructorName()
- // prefix.ClassName.constructorName()
- if (node is Send) {
- if (node.receiver is Send) {
- Send receiver = node.receiver;
- // prefix.ClassName.constructorName()
- assert(treeElements[receiver.receiver] != null &&
- treeElements[receiver.receiver].isPrefix);
- prefix = receiver.receiver;
- className = receiver.selector;
- constructorName = node.selector;
- } else {
- Element receiverElement = treeElements[node.receiver];
- if (receiverElement != null && receiverElement.isPrefix) {
- // prefix.ClassName()
- prefix = node.receiver;
- className = node.selector;
- } else {
- // ClassName.constructorName()
- className = node.receiver;
- constructorName = node.selector;
- }
- }
- } else {
- // ClassName()
- className = node;
- }
-
- if (prefix != null) {
- makeErasePrefixPlaceholder(prefix);
- }
-
- if (className is TypeAnnotation) {
- visitTypeAnnotation(className);
- } else if (Elements.isUnresolved(element)) {
- // We handle unresolved nodes elsewhere.
- } else if (className.isThis() || className.isSuper()) {
- // Do not rename super and this.
- } else if (className is Identifier) {
- makeElementPlaceholder(className, element.contextClass);
- } else {
- throw "Bad type of constructor name $className";
- }
-
- if (constructorName != null) {
- Element definingConstructor = findDefiningConstructor(element);
- constructorPlaceholders.add(
- new ConstructorPlaceholder(constructorName, definingConstructor));
- tryMakePrivateIdentifier(constructorName, element);
- }
- }
-
- void internalError(String reason, {Node node}) {
- reporter.internalError(node, reason);
- }
-
- visit(Node node) => (node == null) ? null : node.accept(this);
-
- visitNode(Node node) {
- node.visitChildren(this);
- } // We must go deeper.
-
- visitNewExpression(NewExpression node) {
- Send send = node.send;
- DartType type = treeElements.getType(node);
- assert(type != null);
- Element constructor = treeElements[send];
- assert(constructor != null);
- assert(send.receiver == null);
- if (!Elements.isMalformed(constructor)) {
- tryMakeConstructorPlaceholder(node.send.selector, constructor);
- // TODO(smok): Should this be in visitNamedArgument?
- // Field names can be exposed as names of optional arguments, e.g.
- // class C {
- // final field;
- // C([this.field]);
- // }
- // Do not forget to rename them as well.
- FunctionElement constructorFunction = constructor;
- List<Element> optionalParameters =
- constructorFunction.functionSignature.optionalParameters;
- for (final argument in send.argumentsNode) {
- NamedArgument named = argument.asNamedArgument();
- if (named == null) continue;
- Identifier name = named.name;
- String nameAsString = name.source;
- for (final parameter in optionalParameters) {
- if (parameter.isInitializingFormal) {
- if (parameter.name == nameAsString) {
- tryMakeMemberPlaceholder(name);
- break;
- }
- }
- }
- }
- } else {
- makeUnresolvedPlaceholder(node.send.selector);
- }
- visit(node.send.argumentsNode);
- }
-
- visitSend(Send send) {
- Element element = treeElements[send];
- tryMakePrivateIdentifier(send.selector, element);
- new SendVisitor(this, treeElements).visitSend(send);
- send.visitChildren(this);
- }
-
- visitSendSet(SendSet send) {
- Element element = treeElements[send];
- if (Elements.isMalformed(element)) {
- // Complicated case: constructs like receiver.selector++ can resolve
- // to ErroneousElement. Fortunately, receiver.selector still
- // can be resoved via treeElements[send.selector], that's all
- // that is needed to rename the construct properly.
- element = treeElements[send.selector];
- }
- tryMakePrivateIdentifier(send.selector, element);
- if (element == null) {
- if (send.receiver != null) tryMakeMemberPlaceholder(send.selector);
- } else if (!element.isMalformed) {
- if (Elements.isStaticOrTopLevel(element)) {
- // TODO(smok): Worth investigating why sometimes we get getter/setter
- // here and sometimes abstract field.
- assert(element.isClass ||
- element is VariableElement ||
- element.isAccessor ||
- element.isAbstractField ||
- element.isFunction ||
- element.isTypedef ||
- element is TypeVariableElement);
- makeElementPlaceholder(send.selector, element);
- } else {
- Identifier identifier = send.selector.asIdentifier();
- if (identifier == null) {
- // Handle optional function expression parameters with default values.
- identifier = send.selector.asFunctionExpression().name;
- }
- if (Elements.isInstanceField(element)) {
- tryMakeMemberPlaceholder(identifier);
- } else {
- tryMakeLocalPlaceholder(element, identifier);
- }
- }
- }
- send.visitChildren(this);
- }
-
- visitTypeAnnotation(TypeAnnotation node) {
- final type = treeElements.getType(node);
- assert(invariant(node, type != null,
- message: "Missing type for type annotation: $treeElements"));
- if (!type.isVoid) {
- if (!type.treatAsDynamic) {
- if (type is TypeVariableType) {
- makeTypeVariablePlaceholder(node.typeName, type);
- } else {
- makeTypePlaceholder(node.typeName, type);
- }
- } else if (!type.isDynamic) {
- makeUnresolvedPlaceholder(node.typeName);
- }
- }
- // Visit only type arguments, otherwise in case of lib.Class type
- // annotation typeName is Send and we go to visitGetterSend, as a result
- // "Class" is added to member placeholders.
- visit(node.typeArguments);
- }
-
- visitVariableDefinitions(VariableDefinitions node) {
- // Collect only local placeholders.
- for (Node definition in node.definitions.nodes) {
- Element definitionElement = treeElements[definition];
- // definitionElement may be null if we're inside variable definitions
- // of a function that is a parameter of another function.
- // TODO(smok): Fix this when resolver correctly deals with
- // such cases.
- if (definitionElement == null) continue;
-
- Send send = definition.asSend();
- Identifier identifier = definition is Identifier
- ? definition
- : definition is Send
- ? (send.selector is Identifier ? send.selector : null)
- : null;
-
- tryMakePrivateIdentifier(identifier, definitionElement);
-
- if (send != null) {
- // May get FunctionExpression here in definition.selector
- // in case of A(int this.f());
- if (send.selector is Identifier) {
- if (definitionElement.isInitializingFormal) {
- tryMakeMemberPlaceholder(send.selector);
- } else {
- tryMakeLocalPlaceholder(definitionElement, send.selector);
- }
- } else {
- assert(send.selector is FunctionExpression);
- if (definitionElement.isInitializingFormal) {
- tryMakeMemberPlaceholder(send.selector.asFunctionExpression().name);
- }
- }
- } else if (definition is Identifier) {
- tryMakeLocalPlaceholder(definitionElement, definition);
- } else if (definition is FunctionExpression) {
- // Skip, it will be processed in visitFunctionExpression.
- } else {
- internalError('Unexpected definition structure $definition');
- }
- }
- node.visitChildren(this);
- }
-
- visitFunctionExpression(FunctionExpression node) {
- bool isKeyword(Identifier id) =>
- id != null && Keyword.keywords[id.source] != null;
-
- Element element = treeElements[node];
- // May get null;
- if (element != null) {
- tryMakePrivateIdentifier(node.name, element);
-
- // Rename only local functions.
- if (topmostEnclosingFunction == null &&
- element is! LocalParameterElement &&
- element is! InitializingFormalElement) {
- topmostEnclosingFunction = element;
- }
- if (!identical(element, currentElement)) {
- if (node.name != null) {
- assert(node.name is Identifier);
- tryMakeLocalPlaceholder(element, node.name);
- }
- }
- }
-
- node.visitChildren(this);
-
- // Make sure we don't omit return type of methods which names are
- // identifiers, because the following works fine:
- // int interface() => 1;
- // But omitting 'int' makes VM unhappy.
- // TODO(smok): Remove it when http://dartbug.com/5278 is fixed.
- if (node.name == null || !isKeyword(node.name.asIdentifier())) {
- makeOmitDeclarationTypePlaceholder(node.returnType);
- }
- collectFunctionParameters(node.parameters);
- }
-
- void collectFunctionParameters(NodeList parameters) {
- if (parameters == null) return;
- for (Node parameter in parameters.nodes) {
- if (parameter is NodeList) {
- // Optional parameter list.
- collectFunctionParameters(parameter);
- } else {
- assert(parameter is VariableDefinitions);
- makeOmitDeclarationTypePlaceholder(
- parameter.asVariableDefinitions().type);
- }
- }
- }
-
- visitClassNode(ClassNode node) {
- ClassElement classElement = currentElement;
- makeElementPlaceholder(node.name, classElement);
- node.visitChildren(this);
- }
-
- visitNamedMixinApplication(NamedMixinApplication node) {
- ClassElement classElement = currentElement;
- makeElementPlaceholder(node.name, classElement);
- node.visitChildren(this);
- }
-
- visitTypeVariable(TypeVariable node) {
- DartType type = treeElements.getType(node);
- assert(invariant(node, type != null,
- message: "Missing type for type variable: $treeElements"));
- makeTypeVariablePlaceholder(node.name, type);
- node.visitChildren(this);
- }
-
- visitTypedef(Typedef node) {
- assert(currentElement is TypedefElement);
- makeElementPlaceholder(node.name, currentElement);
- node.visitChildren(this);
- makeOmitDeclarationTypePlaceholder(node.returnType);
- collectFunctionParameters(node.formals);
- }
-
- visitBlock(Block node) {
- for (Node statement in node.statements.nodes) {
- if (statement is VariableDefinitions) {
- makeVarDeclarationTypePlaceholder(statement);
- }
- }
- node.visitChildren(this);
- }
-}
diff --git a/pkg/compiler/lib/src/dart_backend/renamer.dart b/pkg/compiler/lib/src/dart_backend/renamer.dart
deleted file mode 100644
index 29b26d7..0000000
--- a/pkg/compiler/lib/src/dart_backend/renamer.dart
+++ /dev/null
@@ -1,372 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart_backend;
-
-Comparator get _compareNodes => compareBy((n) => n.getBeginToken().charOffset);
-
-abstract class Renamable implements Comparable {
- final int RENAMABLE_TYPE_ELEMENT = 1;
- final int RENAMABLE_TYPE_MEMBER = 2;
- final int RENAMABLE_TYPE_LOCAL = 3;
-
- final Set<Node> nodes;
-
- Renamable(this.nodes);
- int compareTo(Renamable other) {
- int nodesDiff = other.nodes.length.compareTo(this.nodes.length);
- if (nodesDiff != 0) return nodesDiff;
- int typeDiff = this.kind.compareTo(other.kind);
- return typeDiff != 0 ? typeDiff : compareInternals(other);
- }
-
- int compareInternals(Renamable other);
- int get kind;
-
- String createNewName(PlaceholderRenamer placeholderRenamer);
-}
-
-class GlobalRenamable extends Renamable {
- final Entity entity;
-
- GlobalRenamable(this.entity, Set<Node> nodes) : super(nodes);
-
- int compareInternals(GlobalRenamable other) =>
- compareElements(this.entity, other.entity);
- int get kind => RENAMABLE_TYPE_ELEMENT;
- String createNewName(PlaceholderRenamer placeholderRenamer) {
- return placeholderRenamer._renameGlobal(entity);
- }
-}
-
-class MemberRenamable extends Renamable {
- final String identifier;
- MemberRenamable(this.identifier, Set<Node> nodes) : super(nodes);
- int compareInternals(MemberRenamable other) =>
- this.identifier.compareTo(other.identifier);
- int get kind => RENAMABLE_TYPE_MEMBER;
- String createNewName(PlaceholderRenamer placeholderRenamer) {
- return placeholderRenamer._generateMemberName(identifier);
- }
-}
-
-class LocalRenamable extends Renamable {
- LocalRenamable(Set<Node> nodes) : super(nodes);
- int compareInternals(LocalRenamable other) => _compareNodes(
- sorted(this.nodes, _compareNodes)[0],
- sorted(other.nodes, _compareNodes)[0]);
- int get kind => RENAMABLE_TYPE_LOCAL;
- String createNewName(PlaceholderRenamer placeholderRenamer) {
- return placeholderRenamer._generateUniqueTopLevelName("");
- }
-}
-
-/**
- * Renames only top-level elements that would lead to ambiguity if not renamed.
- */
-class PlaceholderRenamer {
- /// After running [computeRenames] this will contain the computed renames.
- final Map<Node, String> renames = new Map<Node, String>();
-
- /// After running [computeRenames] this will map the used platform
- /// libraries to their respective prefixes.
- final Map<LibraryElement, String> platformImports =
- <LibraryElement, String>{};
-
- final bool enableMinification;
- final Set<String> fixedDynamicNames;
- final Set<String> fixedStaticNames;
- final Map<Element, LibraryElement> reexportingLibraries;
- final bool cutDeclarationTypes;
-
- final Map<Entity, String> _renamedCache = new Map<Entity, String>();
- final Map<Entity, Map<String, String>> _privateCache =
- new Map<Entity, Map<String, String>>();
-
- // Identifiers that has already been used, or are reserved by the
- // language/platform.
- Set<String> _forbiddenIdentifiers;
- Set<String> _allNamedParameterIdentifiers;
-
- Generator _generator;
-
- PlaceholderRenamer(
- this.fixedDynamicNames, this.fixedStaticNames, this.reexportingLibraries,
- {this.enableMinification, this.cutDeclarationTypes});
-
- void _renameNodes(Iterable<Node> nodes, String renamer(Node node)) {
- for (Node node in sorted(nodes, _compareNodes)) {
- renames[node] = renamer(node);
- }
- }
-
- String _generateUniqueTopLevelName(String originalName) {
- String newName = _generator.generate(originalName, (name) {
- return _forbiddenIdentifiers.contains(name) ||
- _allNamedParameterIdentifiers.contains(name);
- });
- _forbiddenIdentifiers.add(newName);
- return newName;
- }
-
- String _generateMemberName(String original) {
- return _generator.generate(original, _forbiddenIdentifiers.contains);
- }
-
- /// Looks up [originalName] in the [_privateCache] cache of [library].
- /// If [originalName] was not renamed before, generate a new name.
- String _getPrivateName(LibraryElement library, String originalName) {
- return _privateCache
- .putIfAbsent(library, () => new Map<String, String>())
- .putIfAbsent(
- originalName, () => _generateUniqueTopLevelName(originalName));
- }
-
- String _renameConstructor(ConstructorPlaceholder placeholder) {
- String name = placeholder.element.name;
- if (name == '') return "";
- String result = _renameGlobal(placeholder.element);
- return result;
- }
-
- String _renameGlobal(Entity entity) {
- assert(entity is! Element ||
- Elements.isMalformed(entity) ||
- Elements.isStaticOrTopLevel(entity) ||
- entity is TypeVariableElement);
- // TODO(smok): We may want to reuse class static field and method names.
- if (entity is Element) {
- LibraryElement library = entity.library;
- if (reexportingLibraries.containsKey(entity)) {
- library = reexportingLibraries[entity];
- }
- if (library.isPlatformLibrary) {
- // TODO(johnniwinther): Handle prefixes for dart:core.
- if (library.canonicalUri == Uris.dart_core) return entity.name;
- if (library.isInternalLibrary) {
- throw new SpannableAssertionFailure(
- entity,
- "Internal library $library should never have been imported from "
- "the code compiled by dart2dart.");
- }
-
- String prefix = platformImports.putIfAbsent(library, () => null);
- if (entity.isTopLevel && fixedDynamicNames.contains(entity.name)) {
- if (prefix == null) {
- prefix = _generateUniqueTopLevelName('');
- platformImports[library] = prefix;
- }
- return '$prefix.${entity.name}';
- }
- return entity.name;
- }
- }
- String name = _renamedCache.putIfAbsent(
- entity, () => _generateUniqueTopLevelName(entity.name));
- // Look up in [_renamedCache] for a name for [entity] .
- // If it was not renamed before, generate a new name.
- return name;
- }
-
- void _computeMinifiedRenames(PlaceholderCollector placeholderCollector) {
- _generator = new MinifyingGenerator();
-
- // Build a list sorted by usage of local nodes that will be renamed to
- // the same identifier. So the top-used local variables in all functions
- // will be renamed first and will all share the same new identifier.
- int maxLength = placeholderCollector.functionScopes.values
- .fold(0, (a, b) => max(a, b.localPlaceholders.length));
-
- List<Set<Node>> allLocals =
- new List<Set<Node>>.generate(maxLength, (_) => new Set<Node>());
-
- for (FunctionScope functionScope
- in placeholderCollector.functionScopes.values) {
- // Add current sorted local identifiers to the whole sorted list
- // of all local identifiers for all functions.
- List<LocalPlaceholder> currentSortedPlaceholders = sorted(
- functionScope.localPlaceholders,
- compareBy((LocalPlaceholder ph) => -ph.nodes.length));
-
- List<Set<Node>> currentSortedNodes = currentSortedPlaceholders
- .map((LocalPlaceholder ph) => ph.nodes)
- .toList();
-
- for (int i = 0; i < currentSortedNodes.length; i++) {
- allLocals[i].addAll(currentSortedNodes[i]);
- }
- }
-
- // Rename elements, members and locals together based on their usage
- // count, otherwise when we rename elements first there will be no good
- // identifiers left for members even if they are used often.
- List<Renamable> renamables = new List<Renamable>();
- placeholderCollector.elementNodes
- .forEach((Element element, Set<Node> nodes) {
- renamables.add(new GlobalRenamable(element, nodes));
- });
- placeholderCollector.memberPlaceholders
- .forEach((String memberName, Set<Identifier> identifiers) {
- renamables.add(new MemberRenamable(memberName, identifiers));
- });
- for (Set<Node> localIdentifiers in allLocals) {
- renamables.add(new LocalRenamable(localIdentifiers));
- }
- renamables.sort();
- for (Renamable renamable in renamables) {
- String newName = renamable.createNewName(this);
- _renameNodes(renamable.nodes, (_) => newName);
- }
- }
-
- void _computeNonMinifiedRenames(PlaceholderCollector placeholderCollector) {
- _generator = new ConservativeGenerator();
- // Rename elements.
- placeholderCollector.elementNodes
- .forEach((Element element, Set<Node> nodes) {
- _renameNodes(nodes, (_) => _renameGlobal(element));
- });
-
- // Rename locals.
- placeholderCollector.functionScopes
- .forEach((functionElement, functionScope) {
- Set<String> memberIdentifiers = new Set<String>();
- Set<LocalPlaceholder> placeholders = functionScope.localPlaceholders;
- if (functionElement != null && functionElement.enclosingClass != null) {
- functionElement.enclosingClass.forEachMember((enclosingClass, member) {
- memberIdentifiers.add(member.name);
- });
- }
- Set<String> usedLocalIdentifiers = new Set<String>();
- for (LocalPlaceholder placeholder in placeholders) {
- String nextId = _generator.generate(placeholder.identifier, (name) {
- return functionScope.parameterIdentifiers.contains(name) ||
- _forbiddenIdentifiers.contains(name) ||
- usedLocalIdentifiers.contains(name) ||
- memberIdentifiers.contains(name);
- });
- usedLocalIdentifiers.add(nextId);
- _renameNodes(placeholder.nodes, (_) => nextId);
- }
- });
-
- // Do not rename members to top-levels, that allows to avoid renaming
- // members to constructors.
- placeholderCollector.memberPlaceholders.forEach((identifier, nodes) {
- String newIdentifier = _generateMemberName(identifier);
- _renameNodes(nodes, (_) => newIdentifier);
- });
- }
-
- /// Finds renamings for all the placeholders in [placeholderCollector] and
- /// stores them in [renames].
- /// Also adds to [platformImports] all the platform-libraries that are used.
- void computeRenames(PlaceholderCollector placeholderCollector) {
- _allNamedParameterIdentifiers = new Set<String>();
- for (FunctionScope functionScope
- in placeholderCollector.functionScopes.values) {
- _allNamedParameterIdentifiers.addAll(functionScope.parameterIdentifiers);
- }
-
- _forbiddenIdentifiers = new Set<String>.from(fixedDynamicNames);
- _forbiddenIdentifiers.addAll(fixedStaticNames);
- _forbiddenIdentifiers.addAll(Keyword.keywords.keys);
- _forbiddenIdentifiers.add('main');
-
- if (enableMinification) {
- _computeMinifiedRenames(placeholderCollector);
- } else {
- _computeNonMinifiedRenames(placeholderCollector);
- }
-
- // Rename constructors.
- for (ConstructorPlaceholder placeholder
- in placeholderCollector.constructorPlaceholders) {
- renames[placeholder.node] = _renameConstructor(placeholder);
- }
- ;
-
- // Rename private identifiers uniquely for each library.
- placeholderCollector.privateNodes
- .forEach((LibraryElement library, Set<Identifier> identifiers) {
- for (Identifier identifier in identifiers) {
- renames[identifier] = _getPrivateName(library, identifier.source);
- }
- });
-
- // Rename unresolved nodes, to make sure they still do not resolve.
- for (Node node in placeholderCollector.unresolvedNodes) {
- renames[node] = _generateUniqueTopLevelName('Unresolved');
- }
-
- // Erase prefixes that are now not needed.
- for (Node node in placeholderCollector.prefixNodesToErase) {
- renames[node] = '';
- }
-
- if (cutDeclarationTypes) {
- for (DeclarationTypePlaceholder placeholder
- in placeholderCollector.declarationTypePlaceholders) {
- renames[placeholder.typeNode] = placeholder.requiresVar ? 'var' : '';
- }
- }
- }
-}
-
-/**
- * Generates mini ID based on index.
- * In other words, it converts index to visual representation
- * as if digits are given characters.
- */
-String generateMiniId(int index) {
- const String firstCharAlphabet =
- r'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
- const String otherCharsAlphabet =
- r'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_$';
- // It's like converting index in decimal to [chars] radix.
- if (index < firstCharAlphabet.length) return firstCharAlphabet[index];
- StringBuffer resultBuilder = new StringBuffer();
- resultBuilder.writeCharCode(
- firstCharAlphabet.codeUnitAt(index % firstCharAlphabet.length));
- index ~/= firstCharAlphabet.length;
- int length = otherCharsAlphabet.length;
- while (index >= length) {
- resultBuilder.writeCharCode(otherCharsAlphabet.codeUnitAt(index % length));
- index ~/= length;
- }
- resultBuilder.write(otherCharsAlphabet[index]);
- return resultBuilder.toString();
-}
-
-abstract class Generator {
- String generate(String originalName, bool isForbidden(String name));
-}
-
-/// Always tries to return original identifier name unless it is forbidden.
-class ConservativeGenerator implements Generator {
- String generate(String originalName, bool isForbidden(String name)) {
- String result = originalName;
- int index = 0;
- while (isForbidden(result)) {
- //|| result == originalName) {
- result = '${originalName}_${generateMiniId(index++)}';
- }
- return result;
- }
-}
-
-/// Always tries to generate the most compact identifier.
-class MinifyingGenerator implements Generator {
- int index = 0;
-
- MinifyingGenerator();
-
- String generate(String originalName, bool isForbidden(String name)) {
- String result;
- do {
- result = generateMiniId(index++);
- } while (isForbidden(result));
- return result;
- }
-}
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index 11c0000..472e016 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -3626,15 +3626,18 @@
MessageKind.EXTERNAL_WITH_BODY: const MessageTemplate(
MessageKind.EXTERNAL_WITH_BODY,
"External function '#{functionName}' cannot have a function body.",
- options: const ["--output-type=dart"],
howToFix:
"Try removing the 'external' modifier or the function body.",
examples: const [
"""
+import 'package:js/js.dart';
+@JS()
external foo() => 0;
main() => foo();
""",
"""
+import 'package:js/js.dart';
+@JS()
external foo() {}
main() => foo();
"""
diff --git a/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart b/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart
deleted file mode 100644
index e838f8e..0000000
--- a/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library mirror_renamer;
-
-import '../compiler.dart' show Compiler;
-import '../dart_backend/dart_backend.dart'
- show DartBackend, PlaceholderCollector;
-import '../elements/elements.dart';
-import '../tokens/token.dart' show Token;
-import '../tree/tree.dart';
-
-part 'renamer.dart';
-
-class MirrorRenamer {
- const MirrorRenamer();
-
- LibraryElement get helperLibrary => null;
-
- FunctionElement get getNameFunction => null;
-
- bool isMirrorHelperLibrary(LibraryElement element) => false;
-
- void registerStaticSend(Element currentElement, Element target, Node node) {}
-
- void addRenames(Map<Node, String> renames, List<Node> topLevelNodes,
- PlaceholderCollector placeholderCollector) {}
-}
diff --git a/pkg/compiler/lib/src/mirror_renamer/renamer.dart b/pkg/compiler/lib/src/mirror_renamer/renamer.dart
deleted file mode 100644
index 5b2daa1..0000000
--- a/pkg/compiler/lib/src/mirror_renamer/renamer.dart
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of mirror_renamer;
-
-class MirrorRenamerImpl implements MirrorRenamer {
- static const String MIRROR_HELPER_GET_NAME_FUNCTION = 'helperGetName';
- static final Uri DART_MIRROR_HELPER =
- new Uri(scheme: 'dart', path: '_mirror_helper');
- static const String MIRROR_HELPER_SYMBOLS_MAP_NAME = '_SYMBOLS';
-
- /// Initialized when dart:mirrors is loaded if the useMirrorHelperLibrary
- /// field is set.
- final LibraryElement helperLibrary;
-
- /// Initialized when dart:mirrors is loaded if the useMirrorHelperLibrary
- /// field is set.
- final FunctionElement getNameFunction;
-
- /// Initialized when dart:mirrors is loaded if the useMirrorHelperLibrary
- /// field is set.
- final FieldElement symbolsMapVariable;
-
- /// Maps mangled name to original name.
- Map<String, String> symbols = new Map<String, String>();
-
- /// Contains all occurrencs of MirrorSystem.getName() calls in the user code.
- List<Node> mirrorSystemGetNameNodes = <Node>[];
-
- /**
- * Initialized when the placeholderCollector collects the FunctionElement
- * backend.mirrorHelperGetNameFunction which represents the helperGetName
- * function in _mirror_helper.
- */
- FunctionExpression get getNameFunctionNode => getNameFunction.node;
- VariableDefinitions get symbolsMapNode => symbolsMapVariable.node;
- Compiler compiler;
- DartBackend backend;
-
- MirrorRenamerImpl(this.compiler, this.backend, LibraryElement library)
- : this.helperLibrary = library,
- getNameFunction =
- library.find(MirrorRenamerImpl.MIRROR_HELPER_GET_NAME_FUNCTION),
- symbolsMapVariable =
- library.find(MirrorRenamerImpl.MIRROR_HELPER_SYMBOLS_MAP_NAME);
-
- bool isMirrorHelperLibrary(LibraryElement element) {
- return element == helperLibrary;
- }
-
- void registerStaticSend(Element currentElement, Element target, Send node) {
- if (target == compiler.mirrorSystemGetNameFunction &&
- currentElement.library != helperLibrary) {
- // Access to `MirrorSystem.getName` that needs to be redirected to the
- // [getNameFunction].
- mirrorSystemGetNameNodes.add(node);
- }
- }
-
- /**
- * Adds a toplevel node to the output containing a map from the mangled
- * to the unmangled names and replaces calls to MirrorSystem.getName()
- * with calls to the corresponding wrapper from _mirror_helper which has
- * been added during resolution. [renames] is assumed to map nodes in user
- * code to mangled names appearing in output code, and [topLevelNodes] should
- * contain all the toplevel ast nodes that will be emitted in the output.
- */
- void addRenames(Map<Node, String> renames, List<Node> topLevelNodes,
- PlaceholderCollector placeholderCollector) {
- // Right now we only support instances of MirrorSystem.getName,
- // hence if there are no occurence of these we don't do anything.
- if (mirrorSystemGetNameNodes.isEmpty) {
- return;
- }
-
- Node parse(String text) {
- Token tokens = compiler.scanner.tokenize(text);
- return compiler.parser.parseCompilationUnit(tokens);
- }
-
- // Add toplevel map containing all renames of members.
- symbols = new Map<String, String>();
- for (Set<Identifier> s in placeholderCollector.memberPlaceholders.values) {
- // All members in a set have the same name so we only need to look at one.
- Identifier sampleNode = s.first;
- symbols.putIfAbsent(renames[sampleNode], () => sampleNode.source);
- }
-
- Identifier symbolsMapIdentifier =
- symbolsMapNode.definitions.nodes.head.asSend().selector;
- assert(symbolsMapIdentifier != null);
- topLevelNodes.remove(symbolsMapNode);
-
- StringBuffer sb = new StringBuffer(
- 'const ${renames[symbolsMapIdentifier]} = const<String,String>{');
- bool first = true;
- for (String mangledName in symbols.keys) {
- if (!first) {
- sb.write(',');
- } else {
- first = false;
- }
- sb.write("'$mangledName' : '");
- sb.write(symbols[mangledName]);
- sb.write("'");
- }
- sb.write('};');
- sb.writeCharCode(0); // Terminate the string with '0', see [StringScanner].
- topLevelNodes.add(parse(sb.toString()));
-
- // Replace calls to Mirrorsystem.getName with calls to helper function.
- mirrorSystemGetNameNodes.forEach((node) {
- renames[node.selector] = renames[getNameFunctionNode.name];
- renames[node.receiver] = '';
- });
- }
-}
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index c5eefce..98b88e0 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -245,12 +245,6 @@
/// Whether to preserve comments while scanning (only use for dart:mirrors).
final bool preserveComments;
- /// Whether to emit JavaScript (false enables dart2dart).
- final bool emitJavaScript;
-
- /// When using dart2dart, whether to use the multi file format.
- final bool dart2dartMultiFile;
-
/// Strip option used by dart2dart.
final List<String> strips;
@@ -280,7 +274,6 @@
analyzeSignaturesOnly: _hasOption(options, Flags.analyzeSignaturesOnly),
buildId: _extractStringOption(
options, '--build-id=', _UNDETERMINED_BUILD_ID),
- dart2dartMultiFile: _hasOption(options, '--output-type=dart-multi'),
deferredMapUri: _extractUriOption(options, '--deferred-map='),
fatalWarnings: _hasOption(options, Flags.fatalWarnings),
terseDiagnostics: _hasOption(options, Flags.terse),
@@ -291,8 +284,6 @@
disableInlining: _hasOption(options, Flags.disableInlining),
disableTypeInference: _hasOption(options, Flags.disableTypeInference),
dumpInfo: _hasOption(options, Flags.dumpInfo),
- emitJavaScript: !(_hasOption(options, '--output-type=dart') ||
- _hasOption(options, '--output-type=dart-multi')),
enableAssertMessage: _hasOption(options, Flags.enableAssertMessage),
enableGenericMethodSyntax:
_hasOption(options, Flags.genericMethodSyntax),
@@ -354,7 +345,6 @@
bool analyzeOnly: false,
bool analyzeSignaturesOnly: false,
String buildId: _UNDETERMINED_BUILD_ID,
- bool dart2dartMultiFile: false,
Uri deferredMapUri: null,
bool fatalWarnings: false,
bool terseDiagnostics: false,
@@ -364,7 +354,6 @@
bool disableInlining: false,
bool disableTypeInference: false,
bool dumpInfo: false,
- bool emitJavaScript: true,
bool enableAssertMessage: false,
bool enableGenericMethodSyntax: false,
bool enableInitializingFormalAccess: false,
@@ -428,7 +417,6 @@
analyzeOnly || analyzeSignaturesOnly || analyzeAll || resolveOnly,
analyzeSignaturesOnly: analyzeSignaturesOnly,
buildId: buildId,
- dart2dartMultiFile: dart2dartMultiFile,
deferredMapUri: deferredMapUri,
fatalWarnings: fatalWarnings,
terseDiagnostics: terseDiagnostics,
@@ -436,9 +424,8 @@
suppressHints: suppressHints,
shownPackageWarnings: shownPackageWarnings,
disableInlining: disableInlining || hasIncrementalSupport,
- disableTypeInference: disableTypeInference || !emitJavaScript,
+ disableTypeInference: disableTypeInference,
dumpInfo: dumpInfo,
- emitJavaScript: emitJavaScript,
enableAssertMessage: enableAssertMessage,
enableGenericMethodSyntax: enableGenericMethodSyntax,
enableInitializingFormalAccess: enableInitializingFormalAccess,
@@ -452,8 +439,7 @@
hasIncrementalSupport: hasIncrementalSupport,
outputUri: outputUri,
platformConfigUri: platformConfigUri ??
- _resolvePlatformConfig(
- libraryRoot, null, !emitJavaScript, const []),
+ _resolvePlatformConfig(libraryRoot, null, const []),
preserveComments: preserveComments,
preserveUris: preserveUris,
resolutionInputs: resolutionInputs,
@@ -482,7 +468,6 @@
this.analyzeOnly: false,
this.analyzeSignaturesOnly: false,
this.buildId: _UNDETERMINED_BUILD_ID,
- this.dart2dartMultiFile: false,
this.deferredMapUri: null,
this.fatalWarnings: false,
this.terseDiagnostics: false,
@@ -492,7 +477,6 @@
this.disableInlining: false,
this.disableTypeInference: false,
this.dumpInfo: false,
- this.emitJavaScript: true,
this.enableAssertMessage: false,
this.enableGenericMethodSyntax: false,
this.enableInitializingFormalAccess: false,
@@ -541,7 +525,6 @@
analyzeOnly,
analyzeSignaturesOnly,
buildId,
- dart2dartMultiFile,
deferredMapUri,
fatalWarnings,
terseDiagnostics,
@@ -551,7 +534,6 @@
disableInlining,
disableTypeInference,
dumpInfo,
- emitJavaScript,
enableAssertMessage,
enableGenericMethodSyntax,
enableInitializingFormalAccess,
@@ -599,7 +581,6 @@
analyzeSignaturesOnly:
analyzeSignaturesOnly ?? options.analyzeSignaturesOnly,
buildId: buildId ?? options.buildId,
- dart2dartMultiFile: dart2dartMultiFile ?? options.dart2dartMultiFile,
deferredMapUri: deferredMapUri ?? options.deferredMapUri,
fatalWarnings: fatalWarnings ?? options.fatalWarnings,
terseDiagnostics: terseDiagnostics ?? options.terseDiagnostics,
@@ -611,7 +592,6 @@
disableTypeInference:
disableTypeInference ?? options.disableTypeInference,
dumpInfo: dumpInfo ?? options.dumpInfo,
- emitJavaScript: emitJavaScript ?? options.emitJavaScript,
enableAssertMessage: enableAssertMessage ?? options.enableAssertMessage,
enableGenericMethodSyntax:
enableGenericMethodSyntax ?? options.enableGenericMethodSyntax,
@@ -722,11 +702,9 @@
}
Uri _resolvePlatformConfig(Uri libraryRoot, String platformConfigPath,
- bool isDart2Dart, Iterable<String> categories) {
+ Iterable<String> categories) {
if (platformConfigPath != null) {
return libraryRoot.resolve(platformConfigPath);
- } else if (isDart2Dart) {
- return libraryRoot.resolve(_dart2dartPlatform);
} else {
if (categories.length == 0) {
return libraryRoot.resolve(_clientPlatform);
@@ -747,7 +725,6 @@
return _resolvePlatformConfig(
libraryRoot,
_extractStringOption(options, "--platform-config=", null),
- _hasOption(options, '--output-type=dart'),
_extractCsvOption(options, '--categories='));
}
@@ -755,7 +732,6 @@
const String _clientPlatform = "lib/dart_client.platform";
const String _serverPlatform = "lib/dart_server.platform";
const String _sharedPlatform = "lib/dart_shared.platform";
-const String _dart2dartPlatform = "lib/dart2dart.platform";
const String _UNDETERMINED_BUILD_ID = "build number could not be determined";
const bool _forceIncrementalSupport =
diff --git a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
index 3249c31..6a5c82d 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
@@ -232,17 +232,24 @@
if (interceptedClasses.contains(helpers.jsNumberClass) &&
!(interceptedClasses.contains(helpers.jsDoubleClass) ||
interceptedClasses.contains(helpers.jsIntClass))) {
+ Set<ClassElement> required;
for (HInstruction user in node.usedBy) {
if (user is! HInvoke) continue;
Set<ClassElement> intercepted =
backend.getInterceptedClassesOn(user.selector.name);
if (intercepted.contains(helpers.jsIntClass)) {
- interceptedClasses.add(helpers.jsIntClass);
+ required ??= new Set<ClassElement>();
+ required.add(helpers.jsIntClass);
}
if (intercepted.contains(helpers.jsDoubleClass)) {
- interceptedClasses.add(helpers.jsDoubleClass);
+ required ??= new Set<ClassElement>();
+ required.add(helpers.jsDoubleClass);
}
}
+ // Don't modify the result of [backend.getInterceptedClassesOn].
+ if (required != null) {
+ interceptedClasses = interceptedClasses.union(required);
+ }
}
} else {
interceptedClasses = new Set<ClassElement>();
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
index 609bbef..8c9c8c8 100644
--- a/runtime/bin/io_natives.cc
+++ b/runtime/bin/io_natives.cc
@@ -121,6 +121,7 @@
V(Socket_CreateConnect, 3) \
V(Socket_CreateBindConnect, 4) \
V(Socket_CreateBindDatagram, 4) \
+ V(Socket_IsBindError, 2) \
V(Socket_Available, 1) \
V(Socket_Read, 2) \
V(Socket_RecvFrom, 1) \
diff --git a/runtime/bin/secure_socket_boringssl.cc b/runtime/bin/secure_socket_boringssl.cc
index def3aae..e881815 100644
--- a/runtime/bin/secure_socket_boringssl.cc
+++ b/runtime/bin/secure_socket_boringssl.cc
@@ -94,11 +94,14 @@
const char* message) {
char error_string[SSL_ERROR_MESSAGE_BUFFER_SIZE];
FetchErrorString(error_string, SSL_ERROR_MESSAGE_BUFFER_SIZE);
- OSError os_error_struct(status, error_string, OSError::kBoringSSL);
- Dart_Handle os_error = DartUtils::NewDartOSError(&os_error_struct);
- Dart_Handle exception =
- DartUtils::NewDartIOException(exception_type, message, os_error);
- ASSERT(!Dart_IsError(exception));
+ Dart_Handle exception;
+ {
+ OSError os_error_struct(status, error_string, OSError::kBoringSSL);
+ Dart_Handle os_error = DartUtils::NewDartOSError(&os_error_struct);
+ exception =
+ DartUtils::NewDartIOException(exception_type, message, os_error);
+ ASSERT(!Dart_IsError(exception));
+ }
Dart_ThrowException(exception);
UNREACHABLE();
}
@@ -143,8 +146,8 @@
}
-static SSL_CTX* GetSecurityContext(Dart_NativeArguments args) {
- SSL_CTX* context;
+static SSLContext* GetSecurityContext(Dart_NativeArguments args) {
+ SSLContext* context;
Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
ASSERT(Dart_IsInstance(dart_this));
ThrowIfError(Dart_GetNativeInstanceField(
@@ -155,17 +158,17 @@
}
-static void FreeSecurityContext(
+static void DeleteSecurityContext(
void* isolate_data,
Dart_WeakPersistentHandle handle,
void* context_pointer) {
- SSL_CTX* context = static_cast<SSL_CTX*>(context_pointer);
- SSL_CTX_free(context);
+ SSLContext* context = static_cast<SSLContext*>(context_pointer);
+ delete context;
}
static Dart_Handle SetSecurityContext(Dart_NativeArguments args,
- SSL_CTX* context) {
+ SSLContext* context) {
const int approximate_size_of_context = 1500;
Dart_Handle dart_this = Dart_GetNativeArgument(args, 0);
RETURN_IF_ERROR(dart_this);
@@ -178,7 +181,7 @@
Dart_NewWeakPersistentHandle(dart_this,
context,
approximate_size_of_context,
- FreeSecurityContext);
+ DeleteSecurityContext);
return Dart_Null();
}
@@ -198,7 +201,7 @@
// Forward declaration.
static void SetAlpnProtocolList(Dart_Handle protocols_handle,
SSL* ssl,
- SSL_CTX* context,
+ SSLContext* context,
bool is_server);
@@ -235,7 +238,7 @@
// TODO(whesse): Is truncating a Dart string containing \0 what we want?
ThrowIfError(Dart_StringToCString(host_name_object, &host_name));
- SSL_CTX* context = NULL;
+ SSLContext* context = NULL;
if (!Dart_IsNull(context_object)) {
ThrowIfError(Dart_GetNativeInstanceField(
context_object,
@@ -248,7 +251,7 @@
ASSERT(!Dart_IsNull(protocols_handle));
GetFilter(args)->Connect(host_name,
- context,
+ context->context(),
is_server,
request_client_certificate,
require_client_certificate,
@@ -426,14 +429,15 @@
void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) {
SSLFilter::InitializeLibrary();
- SSL_CTX* context = SSL_CTX_new(TLS_method());
- SSL_CTX_set_verify(context, SSL_VERIFY_PEER, CertificateCallback);
- SSL_CTX_set_min_version(context, TLS1_VERSION);
- SSL_CTX_set_cipher_list(context, "HIGH:MEDIUM");
- SSL_CTX_set_cipher_list_tls11(context, "HIGH:MEDIUM");
+ SSL_CTX* ctx = SSL_CTX_new(TLS_method());
+ SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, CertificateCallback);
+ SSL_CTX_set_min_version(ctx, TLS1_VERSION);
+ SSL_CTX_set_cipher_list(ctx, "HIGH:MEDIUM");
+ SSL_CTX_set_cipher_list_tls11(ctx, "HIGH:MEDIUM");
+ SSLContext* context = new SSLContext(ctx);
Dart_Handle err = SetSecurityContext(args, context);
if (Dart_IsError(err)) {
- SSL_CTX_free(context);
+ delete context;
Dart_PropagateError(err);
}
}
@@ -663,14 +667,17 @@
void FUNCTION_NAME(SecurityContext_UsePrivateKeyBytes)(
Dart_NativeArguments args) {
- SSL_CTX* context = GetSecurityContext(args);
+ SSLContext* context = GetSecurityContext(args);
const char* password = GetPasswordArgument(args, 2);
int status;
{
ScopedMemBIO bio(ThrowIfError(Dart_GetNativeArgument(args, 1)));
EVP_PKEY *key = GetPrivateKey(bio.bio(), password);
- status = SSL_CTX_use_PrivateKey(context, key);
+ status = SSL_CTX_use_PrivateKey(context->context(), key);
+ // SSL_CTX_use_PrivateKey increments the reference count of key on success,
+ // so we have to call EVP_PKEY_free on both success and failure.
+ EVP_PKEY_free(key);
}
// TODO(24184): Handle different expected errors here - file missing,
@@ -699,16 +706,18 @@
ScopedX509Stack cert_stack(ca_certs);
X509_STORE* store = SSL_CTX_get_cert_store(context);
status = X509_STORE_add_cert(store, cert);
+ // X509_STORE_add_cert increments the reference count of cert on success.
+ X509_free(cert);
if (status == 0) {
- X509_free(cert);
return status;
}
X509* ca;
while ((ca = sk_X509_shift(cert_stack.get())) != NULL) {
status = X509_STORE_add_cert(store, ca);
+ // X509_STORE_add_cert increments the reference count of cert on success.
+ X509_free(ca);
if (status == 0) {
- X509_free(ca);
return status;
}
}
@@ -724,8 +733,9 @@
X509* cert = NULL;
while ((cert = PEM_read_bio_X509(bio, NULL, NULL, NULL)) != NULL) {
status = X509_STORE_add_cert(store, cert);
+ // X509_STORE_add_cert increments the reference count of cert on success.
+ X509_free(cert);
if (status == 0) {
- X509_free(cert);
return status;
}
}
@@ -759,12 +769,13 @@
void FUNCTION_NAME(SecurityContext_SetTrustedCertificatesBytes)(
Dart_NativeArguments args) {
- SSL_CTX* context = GetSecurityContext(args);
+ SSLContext* context = GetSecurityContext(args);
const char* password = GetPasswordArgument(args, 2);
int status;
{
ScopedMemBIO bio(ThrowIfError(Dart_GetNativeArgument(args, 1)));
- status = SetTrustedCertificatesBytes(context, bio.bio(), password);
+ status = SetTrustedCertificatesBytes(
+ context->context(), bio.bio(), password);
}
CheckStatus(status,
"TlsException",
@@ -779,7 +790,7 @@
void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
Dart_NativeArguments args) {
- SSL_CTX* context = GetSecurityContext(args);
+ SSLContext* context = GetSecurityContext(args);
#if defined(TARGET_OS_ANDROID)
// On Android, we don't compile in the trusted root certificates. Insead,
// we use the directory of trusted certificates already present on the device.
@@ -789,10 +800,11 @@
// the Dart thread so that Dart code can be invoked from the "bad certificate"
// callback called by SSL_do_handshake.
const char* android_cacerts = "/system/etc/security/cacerts";
- int status = SSL_CTX_load_verify_locations(context, NULL, android_cacerts);
+ int status = SSL_CTX_load_verify_locations(
+ context->context(), NULL, android_cacerts);
CheckStatus(status, "TlsException", "Failure trusting builtint roots");
#else
- X509_STORE* store = SSL_CTX_get_cert_store(context);
+ X509_STORE* store = SSL_CTX_get_cert_store(context->context());
BIO* roots_bio =
BIO_new_mem_buf(const_cast<unsigned char*>(root_certificates_pem),
root_certificates_pem_length);
@@ -801,7 +813,12 @@
// backed by a memory buffer), and returns X509 objects, one by one.
// When the end of the bio is reached, it returns null.
while ((root_cert = PEM_read_bio_X509(roots_bio, NULL, NULL, NULL)) != NULL) {
- X509_STORE_add_cert(store, root_cert);
+ int status = X509_STORE_add_cert(store, root_cert);
+ // X509_STORE_add_cert increments the reference count of cert on success.
+ X509_free(root_cert);
+ if (status == 0) {
+ break;
+ }
}
BIO_free(roots_bio);
// If there is an error here, it must be the error indicating that we are done
@@ -844,6 +861,8 @@
X509* ca;
while ((ca = sk_X509_shift(certs.get())) != NULL) {
status = SSL_CTX_add0_chain_cert(context, ca);
+ // SSL_CTX_add0_chain_cert does not inc ref count, so don't free unless the
+ // call fails.
if (status == 0) {
X509_free(ca);
return status;
@@ -875,6 +894,8 @@
X509* ca;
while ((ca = PEM_read_bio_X509(bio, NULL, NULL, NULL)) != NULL) {
status = SSL_CTX_add0_chain_cert(context, ca);
+ // SSL_CTX_add0_chain_cert does not inc ref count, so don't free unless the
+ // call fails.
if (status == 0) {
X509_free(ca);
return status;
@@ -906,12 +927,12 @@
void FUNCTION_NAME(SecurityContext_UseCertificateChainBytes)(
Dart_NativeArguments args) {
- SSL_CTX* context = GetSecurityContext(args);
+ SSLContext* context = GetSecurityContext(args);
const char* password = GetPasswordArgument(args, 2);
int status;
{
ScopedMemBIO bio(ThrowIfError(Dart_GetNativeArgument(args, 1)));
- status = UseChainBytes(context, bio.bio(), password);
+ status = UseChainBytes(context->context(), bio.bio(), password);
}
CheckStatus(status,
"TlsException",
@@ -937,14 +958,16 @@
ScopedX509Stack cert_stack(ca_certs);
status = SSL_CTX_add_client_CA(context, cert);
+ // SSL_CTX_add_client_CA increments the reference count of cert on success.
+ X509_free(cert);
if (status == 0) {
- X509_free(cert);
return status;
}
X509* ca;
while ((ca = sk_X509_shift(cert_stack.get())) != NULL) {
status = SSL_CTX_add_client_CA(context, ca);
+ // SSL_CTX_add_client_CA increments the reference count of ca on success.
X509_free(ca); // The name has been extracted.
if (status == 0) {
return status;
@@ -989,13 +1012,13 @@
void FUNCTION_NAME(SecurityContext_SetClientAuthoritiesBytes)(
Dart_NativeArguments args) {
- SSL_CTX* context = GetSecurityContext(args);
+ SSLContext* context = GetSecurityContext(args);
const char* password = GetPasswordArgument(args, 2);
int status;
{
ScopedMemBIO bio(ThrowIfError(Dart_GetNativeArgument(args, 1)));
- status = SetClientAuthorities(context, bio.bio(), password);
+ status = SetClientAuthorities(context->context(), bio.bio(), password);
}
CheckStatus(status,
@@ -1006,7 +1029,7 @@
void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)(
Dart_NativeArguments args) {
- SSL_CTX* context = GetSecurityContext(args);
+ SSLContext* context = GetSecurityContext(args);
Dart_Handle protocols_handle =
ThrowIfError(Dart_GetNativeArgument(args, 1));
Dart_Handle is_server_handle =
@@ -1363,7 +1386,7 @@
// Sets the protocol list for ALPN on a SSL object or a context.
static void SetAlpnProtocolList(Dart_Handle protocols_handle,
SSL* ssl,
- SSL_CTX* context,
+ SSLContext* context,
bool is_server) {
// Enable ALPN (application layer protocol negotiation) if the caller provides
// a valid list of supported protocols.
@@ -1400,13 +1423,9 @@
static_cast<uint8_t*>(malloc(protocol_string_len + 1));
memmove(protocol_string_copy, protocol_string, protocol_string_len);
protocol_string_copy[protocol_string_len] = '\0';
- SSL_CTX_set_alpn_select_cb(context, AlpnCallback, protocol_string_copy);
- // TODO(whesse): If this function is called again, free the previous
- // protocol_string_copy. It may be better to keep this as a native
- // field on the Dart object, since fetching it from the structure is
- // not in the public api.
- // Also free protocol_string_copy when the context is destroyed,
- // in FreeSecurityContext()
+ SSL_CTX_set_alpn_select_cb(
+ context->context(), AlpnCallback, protocol_string_copy);
+ context->set_alpn_protocol_string(protocol_string_copy);
} else {
// The function makes a local copy of protocol_string, which it owns.
if (ssl != NULL) {
@@ -1416,7 +1435,7 @@
ASSERT(context != NULL);
ASSERT(ssl == NULL);
status = SSL_CTX_set_alpn_protos(
- context, protocol_string, protocol_string_len);
+ context->context(), protocol_string, protocol_string_len);
}
ASSERT(status == 0); // The function returns a non-standard status.
}
diff --git a/runtime/bin/secure_socket_boringssl.h b/runtime/bin/secure_socket_boringssl.h
index d5449a4..788b257 100644
--- a/runtime/bin/secure_socket_boringssl.h
+++ b/runtime/bin/secure_socket_boringssl.h
@@ -33,8 +33,39 @@
extern const unsigned char* root_certificates_pem;
extern unsigned int root_certificates_pem_length;
+class SSLContext {
+ public:
+ explicit SSLContext(SSL_CTX* context) :
+ context_(context),
+ alpn_protocol_string_(NULL) {
+ }
+
+ ~SSLContext() {
+ SSL_CTX_free(context_);
+ if (alpn_protocol_string_ != NULL) {
+ free(alpn_protocol_string_);
+ }
+ }
+
+ SSL_CTX* context() const { return context_; }
+
+ uint8_t* alpn_protocol_string() const { return alpn_protocol_string_; }
+ void set_alpn_protocol_string(uint8_t* protocol_string) {
+ if (alpn_protocol_string_ != NULL) {
+ free(alpn_protocol_string_);
+ }
+ alpn_protocol_string_ = protocol_string;
+ }
+
+ private:
+ SSL_CTX* context_;
+ uint8_t* alpn_protocol_string_;
+
+ DISALLOW_COPY_AND_ASSIGN(SSLContext);
+};
+
/*
- * SSLFilter encapsulates the NSS SSL(TLS) code in a filter, that communicates
+ * SSLFilter encapsulates the SSL(TLS) code in a filter, that communicates
* with the containing _SecureFilterImpl Dart object through four shared
* ExternalByteArray buffers, for reading and writing plaintext, and
* reading and writing encrypted text. The filter handles handshaking
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index 7b6f95a..745306d 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -234,6 +234,12 @@
}
}
+void FUNCTION_NAME(Socket_IsBindError)(Dart_NativeArguments args) {
+ intptr_t error_number =
+ DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1));
+ bool is_bind_error = Socket::IsBindError(error_number);
+ Dart_SetReturnValue(args, is_bind_error ? Dart_True() : Dart_False());
+}
void FUNCTION_NAME(Socket_CreateBindDatagram)(Dart_NativeArguments args) {
RawAddr addr;
diff --git a/runtime/bin/socket.h b/runtime/bin/socket.h
index 0b17706..6a50d79 100644
--- a/runtime/bin/socket.h
+++ b/runtime/bin/socket.h
@@ -278,6 +278,9 @@
// specified as the port component of the passed RawAddr structure.
static intptr_t CreateBindConnect(const RawAddr& addr,
const RawAddr& source_addr);
+ // Returns true if the given error-number is because the system was not able
+ // to bind the socket to a specific IP.
+ static bool IsBindError(intptr_t error_number);
// Creates a datagram socket which is bound. The port to bind
// to is specified as the port component of the RawAddr structure.
static intptr_t CreateBindDatagram(const RawAddr& addr, bool reuseAddress);
diff --git a/runtime/bin/socket_android.cc b/runtime/bin/socket_android.cc
index b3e3fc4..caddb3a 100644
--- a/runtime/bin/socket_android.cc
+++ b/runtime/bin/socket_android.cc
@@ -101,6 +101,12 @@
}
+bool Socket::IsBindError(intptr_t error_number) {
+ return error_number == EADDRINUSE || error_number == EADDRNOTAVAIL ||
+ error_number == EINVAL;
+}
+
+
intptr_t Socket::Available(intptr_t fd) {
return FDUtils::AvailableBytes(fd);
}
diff --git a/runtime/bin/socket_fuchsia.cc b/runtime/bin/socket_fuchsia.cc
index 78b5071..b79d1c0 100644
--- a/runtime/bin/socket_fuchsia.cc
+++ b/runtime/bin/socket_fuchsia.cc
@@ -45,6 +45,12 @@
}
+bool Socket::IsBindError(intptr_t error_number) {
+ UNIMPLEMENTED();
+ return false;
+}
+
+
intptr_t Socket::Available(intptr_t fd) {
UNIMPLEMENTED();
return -1;
diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
index 6393567..fc0f1e4 100644
--- a/runtime/bin/socket_linux.cc
+++ b/runtime/bin/socket_linux.cc
@@ -101,6 +101,12 @@
}
+bool Socket::IsBindError(intptr_t error_number) {
+ return error_number == EADDRINUSE || error_number == EADDRNOTAVAIL ||
+ error_number == EINVAL;
+}
+
+
intptr_t Socket::Available(intptr_t fd) {
return FDUtils::AvailableBytes(fd);
}
diff --git a/runtime/bin/socket_macos.cc b/runtime/bin/socket_macos.cc
index 708cd3c..e54cc59 100644
--- a/runtime/bin/socket_macos.cc
+++ b/runtime/bin/socket_macos.cc
@@ -58,6 +58,7 @@
return -1;
}
FDUtils::SetCloseOnExec(fd);
+ FDUtils::SetNonBlocking(fd);
return fd;
}
@@ -79,8 +80,6 @@
return fd;
}
- FDUtils::SetNonBlocking(fd);
-
return Connect(fd, addr);
}
@@ -103,6 +102,12 @@
}
+bool Socket::IsBindError(intptr_t error_number) {
+ return error_number == EADDRINUSE || error_number == EADDRNOTAVAIL ||
+ error_number == EINVAL;
+}
+
+
intptr_t Socket::Available(intptr_t fd) {
return FDUtils::AvailableBytes(fd);
}
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 2d3ba73..a8b60c3 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -431,7 +431,13 @@
if (result is OSError) {
// Keep first error, if present.
if (error == null) {
- error = createError(result, "Connection failed", address, port);
+ int errorCode = result.errorCode;
+ if (errorCode != null && socket.isBindError(errorCode)) {
+ error = createError(result, "Bind failed", sourceAddress);
+ } else {
+ error =
+ createError(result, "Connection failed", address, port);
+ }
}
connectNext();
} else {
@@ -1075,6 +1081,7 @@
nativeCreateBindConnect(
List<int> addr, int port, List<int> sourceAddr)
native "Socket_CreateBindConnect";
+ bool isBindError(int errorNumber) native "Socket_IsBindError";
nativeCreateBindListen(List<int> addr, int port, int backlog, bool v6Only,
bool shared)
native "ServerSocket_CreateBindListen";
diff --git a/runtime/bin/socket_unsupported.cc b/runtime/bin/socket_unsupported.cc
index 0ea27f1..089e48e 100644
--- a/runtime/bin/socket_unsupported.cc
+++ b/runtime/bin/socket_unsupported.cc
@@ -35,6 +35,12 @@
}
+void FUNCTION_NAME(Socket_IsBindError)(Dart_NativeArguments args) {
+ Dart_ThrowException(DartUtils::NewDartArgumentError(
+ "Sockets unsupported on this platform"));
+}
+
+
void FUNCTION_NAME(Socket_CreateBindDatagram)(Dart_NativeArguments args) {
Dart_ThrowException(DartUtils::NewDartArgumentError(
"Sockets unsupported on this platform"));
diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
index e3d366d..f76f764 100644
--- a/runtime/bin/socket_win.cc
+++ b/runtime/bin/socket_win.cc
@@ -250,6 +250,12 @@
}
+bool Socket::IsBindError(intptr_t error_number) {
+ return error_number == WSAEADDRINUSE || error_number == WSAEADDRNOTAVAIL ||
+ error_number == WSAEINVAL;
+}
+
+
void Socket::GetError(intptr_t fd, OSError* os_error) {
Handle* handle = reinterpret_cast<Handle*>(fd);
os_error->SetCodeAndMessage(OSError::kSystem, handle->last_error());
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
index ade4b93..34d7803 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.dart
@@ -277,4 +277,11 @@
return LESS;
}
}
+
+ static const int _FRACTIONAL_BITS = // Bits to keep after the decimal point.
+ const int.fromEnvironment("doubleFractionalBits", defaultValue: 20);
+ static const double _BIAS = 1.5 * (1 << (52 - _FRACTIONAL_BITS));
+
+ // Returns this with only _FRACTIONAL_BITS bits after the decimal point.
+ double get p => this + _BIAS - _BIAS;
}
diff --git a/runtime/observatory/lib/app.dart b/runtime/observatory/lib/app.dart
index 371c266..4856448 100644
--- a/runtime/observatory/lib/app.dart
+++ b/runtime/observatory/lib/app.dart
@@ -12,7 +12,6 @@
import 'package:logging/logging.dart';
import 'package:observatory/service_html.dart';
import 'package:observatory/elements.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/models.dart' as M;
import 'package:observatory/repositories.dart';
import 'package:observatory/tracer.dart';
@@ -23,6 +22,7 @@
export 'package:observatory/utils.dart';
part 'src/app/application.dart';
+part 'src/app/event.dart';
part 'src/app/location_manager.dart';
part 'src/app/notification.dart';
part 'src/app/page.dart';
diff --git a/runtime/observatory/lib/elements.dart b/runtime/observatory/lib/elements.dart
index 6e2f4f8..ecc32ac 100644
--- a/runtime/observatory/lib/elements.dart
+++ b/runtime/observatory/lib/elements.dart
@@ -3,7 +3,6 @@
// Export elements.
export 'package:observatory/src/elements/action_link.dart';
export 'package:observatory/src/elements/class_ref_as_value.dart';
-export 'package:observatory/src/elements/class_tree.dart';
export 'package:observatory/src/elements/class_view.dart';
export 'package:observatory/src/elements/code_view.dart';
export 'package:observatory/src/elements/context_ref.dart';
@@ -53,6 +52,7 @@
import 'package:observatory/src/elements/class_ref.dart';
import 'package:observatory/src/elements/class_ref_wrapper.dart';
+import 'package:observatory/src/elements/class_tree.dart';
import 'package:observatory/src/elements/code_ref.dart';
import 'package:observatory/src/elements/code_ref_wrapper.dart';
import 'package:observatory/src/elements/containers/virtual_collection.dart';
@@ -101,6 +101,7 @@
export 'package:observatory/src/elements/helpers/rendering_queue.dart';
export 'package:observatory/src/elements/class_ref.dart';
+export 'package:observatory/src/elements/class_tree.dart';
export 'package:observatory/src/elements/code_ref.dart';
export 'package:observatory/src/elements/containers/virtual_collection.dart';
export 'package:observatory/src/elements/containers/virtual_tree.dart';
@@ -134,6 +135,7 @@
Future initElements() async {
ClassRefElement.tag.ensureRegistration();
ClassRefElementWrapper.tag.ensureRegistration();
+ ClassTreeElement.tag.ensureRegistration();
CodeRefElement.tag.ensureRegistration();
CodeRefElementWrapper.tag.ensureRegistration();
CurlyBlockElement.tag.ensureRegistration();
diff --git a/runtime/observatory/lib/elements.html b/runtime/observatory/lib/elements.html
index ed5c73c..2b42d47 100644
--- a/runtime/observatory/lib/elements.html
+++ b/runtime/observatory/lib/elements.html
@@ -1,6 +1,5 @@
<link rel="import" href="src/elements/action_link.html">
<link rel="import" href="src/elements/class_ref_as_value.html">
-<link rel="import" href="src/elements/class_tree.html">
<link rel="import" href="src/elements/class_view.html">
<link rel="import" href="src/elements/code_view.html">
<link rel="import" href="src/elements/cpu_profile.html">
diff --git a/runtime/observatory/lib/mocks.dart b/runtime/observatory/lib/mocks.dart
deleted file mode 100644
index 2535fa0..0000000
--- a/runtime/observatory/lib/mocks.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library mocks;
-
-import 'dart:async';
-
-import 'package:observatory/models.dart' as M;
-
-part 'src/mocks/exceptions/connection_exception.dart';
-
-part 'src/mocks/objects/error.dart';
-part 'src/mocks/objects/code.dart';
-part 'src/mocks/objects/event.dart';
-part 'src/mocks/objects/class.dart';
-part 'src/mocks/objects/flag.dart';
-part 'src/mocks/objects/function.dart';
-part 'src/mocks/objects/isolate.dart';
-part 'src/mocks/objects/library.dart';
-part 'src/mocks/objects/notification.dart';
-part 'src/mocks/objects/script.dart';
-part 'src/mocks/objects/source_location.dart';
-part 'src/mocks/objects/target.dart';
-part 'src/mocks/objects/vm.dart';
-
-part 'src/mocks/repositories/crash_dump.dart';
-part 'src/mocks/repositories/flag.dart';
-part 'src/mocks/repositories/notification.dart';
-part 'src/mocks/repositories/script.dart';
-part 'src/mocks/repositories/target.dart';
diff --git a/runtime/observatory/lib/models.dart b/runtime/observatory/lib/models.dart
index 6fa8853..ded6d78 100644
--- a/runtime/observatory/lib/models.dart
+++ b/runtime/observatory/lib/models.dart
@@ -28,9 +28,10 @@
part 'src/models/objects/timeline_event.dart';
part 'src/models/objects/vm.dart';
-part 'src/models/repository.dart';
-part 'src/models/repositories/crash_dump.dart';
+part 'src/models/repositories/class.dart';
+part 'src/models/repositories/event.dart';
part 'src/models/repositories/flag.dart';
+part 'src/models/repositories/instance.dart';
part 'src/models/repositories/notification.dart';
part 'src/models/repositories/script.dart';
part 'src/models/repositories/target.dart';
diff --git a/runtime/observatory/lib/repositories.dart b/runtime/observatory/lib/repositories.dart
index feeb8f2..9f3c340 100644
--- a/runtime/observatory/lib/repositories.dart
+++ b/runtime/observatory/lib/repositories.dart
@@ -12,7 +12,10 @@
import 'package:observatory/service_common.dart' as SC;
import 'package:observatory/utils.dart';
+part 'src/repositories/class.dart';
+part 'src/repositories/event.dart';
part 'src/repositories/flag.dart';
+part 'src/repositories/instance.dart';
part 'src/repositories/notification.dart';
part 'src/repositories/script.dart';
part 'src/repositories/settings.dart';
diff --git a/runtime/observatory/lib/service_common.dart b/runtime/observatory/lib/service_common.dart
index 8e7b5c0..cd146ee 100644
--- a/runtime/observatory/lib/service_common.dart
+++ b/runtime/observatory/lib/service_common.dart
@@ -91,6 +91,8 @@
bool _hasFinishedConnect = false;
Utf8Decoder _utf8Decoder = const Utf8Decoder();
+ String get displayName => '${name}@${target.name}';
+
CommonWebSocket _webSocket;
CommonWebSocketVM(this.target, this._webSocket) {
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart
index a8bfabb..d72994d 100644
--- a/runtime/observatory/lib/src/app/application.dart
+++ b/runtime/observatory/lib/src/app/application.dart
@@ -10,6 +10,7 @@
static ObservatoryApplication app;
final RenderingQueue queue = new RenderingQueue();
final TargetRepository targets = new TargetRepository();
+ final EventRepository events = new EventRepository();
final NotificationRepository notifications = new NotificationRepository();
final _pageRegistry = new List<Page>();
LocationManager _locationManager;
@@ -40,11 +41,11 @@
// This disconnect event occured *after* a new VM was installed.
return;
}
- notifications.add(
- new EventNotification.fromServiceEvent(
- new ServiceEvent.connectionClosed(reason)));
+ events.add(new ConnectionClosedEvent(new DateTime.now(), reason));
});
+ // TODO(cbernaschina) smart connection of streams in the events object.
+ vm.listenEventStream(VM.kVMStream, _onEvent);
vm.listenEventStream(VM.kIsolateStream, _onEvent);
vm.listenEventStream(VM.kDebugStream, _onEvent);
}
@@ -65,48 +66,84 @@
locationManager._visit();
}
+ void _deletePauseEvents(e) {
+ notifications.deletePauseEvents(isolate: e.isolate);
+ }
+ void _addNotification(M.Event e) {
+ notifications.add(new EventNotification(e));
+ }
+
void _onEvent(ServiceEvent event) {
assert(event.kind != ServiceEvent.kNone);
+ M.Event e;
+
switch(event.kind) {
case ServiceEvent.kVMUpdate:
+ e = new VMUpdateEvent(event.timestamp, event.vm);
+ break;
case ServiceEvent.kIsolateStart:
+ e = new IsolateStartEvent(event.timestamp, event.isolate);
+ break;
case ServiceEvent.kIsolateRunnable:
+ e = new IsolateRunnableEvent(event.timestamp, event.isolate);
+ break;
case ServiceEvent.kIsolateUpdate:
- case ServiceEvent.kBreakpointAdded:
- case ServiceEvent.kBreakpointResolved:
- case ServiceEvent.kBreakpointRemoved:
- case ServiceEvent.kDebuggerSettingsUpdate:
- // Ignore for now.
+ e = new IsolateUpdateEvent(event.timestamp, event.isolate);
break;
-
case ServiceEvent.kIsolateReload:
- notifications.add(new EventNotification.fromServiceEvent(event));
+ e = new IsolateReloadEvent(event.timestamp, event.isolate, event.error);
break;
-
case ServiceEvent.kIsolateExit:
+ e = new IsolateExitEvent(event.timestamp, event.isolate);
+ break;
+ case ServiceEvent.kBreakpointAdded:
+ e = new BreakpointAddedEvent(event.timestamp, event.isolate,
+ event.breakpoint);
+ break;
+ case ServiceEvent.kBreakpointResolved:
+ e = new BreakpointResolvedEvent(event.timestamp, event.isolate,
+ event.breakpoint);
+ break;
+ case ServiceEvent.kBreakpointRemoved:
+ e = new BreakpointRemovedEvent(event.timestamp, event.isolate,
+ event.breakpoint);
+ break;
+ case ServiceEvent.kDebuggerSettingsUpdate:
+ e = new DebuggerSettingsUpdateEvent(event.timestamp, event.isolate);
+ break;
case ServiceEvent.kResume:
- notifications.deletePauseEvents(isolate: event.isolate);
+ e = new ResumeEvent(event.timestamp, event.isolate, event.topFrame);
break;
-
case ServiceEvent.kPauseStart:
+ e = new PauseStartEvent(event.timestamp, event.isolate);
+ break;
case ServiceEvent.kPauseExit:
+ e = new PauseExitEvent(event.timestamp, event.isolate);
+ break;
case ServiceEvent.kPauseBreakpoint:
+ e = new PauseBreakpointEvent(event.timestamp, event.isolate,
+ event.pauseBreakpoints, event.topFrame, event.atAsyncSuspension,
+ event.breakpoint);
+ break;
case ServiceEvent.kPauseInterrupted:
+ e = new PauseInterruptedEvent(event.timestamp, event.isolate,
+ event.topFrame, event.atAsyncSuspension);
+ break;
case ServiceEvent.kPauseException:
- notifications.deletePauseEvents(isolate: event.isolate);
- notifications.add(new EventNotification.fromServiceEvent(event));
+ e = new PauseExceptionEvent(event.timestamp, event.isolate,
+ event.topFrame, event.exception);
break;
-
case ServiceEvent.kInspect:
- notifications.add(new EventNotification.fromServiceEvent(event));
+ e = new InspectEvent(event.timestamp, event.isolate,
+ event.inspectee);
break;
-
default:
// Ignore unrecognized events.
Logger.root.severe('Unrecognized event: $event');
- break;
+ return;
}
+ events.add(e);
}
void _registerPages() {
@@ -201,6 +238,23 @@
});
_setVM(new WebSocketVM(targets.current));
_initOnce();
+
+ // delete pause events.
+ events.onIsolateExit.listen(_deletePauseEvents);
+ events.onResume.listen(_deletePauseEvents);
+ events.onPauseStart.listen(_deletePauseEvents);
+ events.onPauseExit.listen(_deletePauseEvents);
+ events.onPauseBreakpoint.listen(_deletePauseEvents);
+ events.onPauseInterrupted.listen(_deletePauseEvents);
+ events.onPauseException.listen(_deletePauseEvents);
+
+ // show notification for an event.
+ events.onIsolateReload.listen(_addNotification);
+ events.onPauseExit.listen(_addNotification);
+ events.onPauseBreakpoint.listen(_addNotification);
+ events.onPauseInterrupted.listen(_addNotification);
+ events.onPauseException.listen(_addNotification);
+ events.onInspect.listen(_addNotification);
}
loadCrashDump(Map crashDump) {
diff --git a/runtime/observatory/lib/src/app/event.dart b/runtime/observatory/lib/src/app/event.dart
new file mode 100644
index 0000000..9e6f9e9
--- /dev/null
+++ b/runtime/observatory/lib/src/app/event.dart
@@ -0,0 +1,254 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of app;
+
+class VMUpdateEvent implements M.VMUpdateEvent {
+ final DateTime timestamp;
+ final M.VMRef vm;
+ VMUpdateEvent(this.timestamp, this.vm) {
+ assert(timestamp != null);
+ assert(vm != null);
+ }
+}
+
+class IsolateStartEvent implements M.IsolateStartEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ IsolateStartEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class IsolateRunnableEvent implements M.IsolateRunnableEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ IsolateRunnableEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class IsolateExitEvent implements M.IsolateExitEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ IsolateExitEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class IsolateUpdateEvent implements M.IsolateUpdateEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ IsolateUpdateEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class IsolateReloadEvent implements M.IsolateReloadEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final M.ErrorRef error;
+ IsolateReloadEvent(this.timestamp, this.isolate, this.error) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(error != null);
+ }
+}
+
+class ServiceExtensionAddedEvent implements M.ServiceExtensionAddedEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final String extensionRPC;
+ ServiceExtensionAddedEvent(this.timestamp, this.isolate, this.extensionRPC) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(extensionRPC != null);
+ }
+}
+
+class DebuggerSettingsUpdateEvent implements M.DebuggerSettingsUpdateEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ DebuggerSettingsUpdateEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class PauseStartEvent implements M.PauseStartEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ PauseStartEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class PauseExitEvent implements M.PauseExitEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ PauseExitEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class PauseBreakpointEvent implements M.PauseBreakpointEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final Iterable<M.Breakpoint> pauseBreakpoints;
+ final M.Frame topFrame;
+ final bool atAsyncSuspension;
+ /// [optional]
+ final M.Breakpoint breakpoint;
+ PauseBreakpointEvent(this.timestamp, this.isolate,
+ Iterable<M.Breakpoint> pauseBreakpoints, this.topFrame,
+ this.atAsyncSuspension, [this.breakpoint])
+ : pauseBreakpoints = new List.unmodifiable(pauseBreakpoints){
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(pauseBreakpoints != null);
+ assert(topFrame != null);
+ assert(atAsyncSuspension != null);
+ }
+}
+
+class PauseInterruptedEvent implements M.PauseInterruptedEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final M.Frame topFrame;
+ final bool atAsyncSuspension;
+ PauseInterruptedEvent(this.timestamp, this.isolate, this.topFrame,
+ this.atAsyncSuspension) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(atAsyncSuspension != null);
+ }
+}
+
+class PauseExceptionEvent implements M.PauseExceptionEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final M.Frame topFrame;
+ final M.InstanceRef exception;
+ PauseExceptionEvent(this.timestamp, this.isolate, this.topFrame,
+ this.exception) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(topFrame != null);
+ assert(exception != null);
+ }
+}
+
+class ResumeEvent implements M.ResumeEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final M.Frame topFrame;
+ ResumeEvent(this.timestamp, this.isolate, this.topFrame) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class BreakpointAddedEvent implements M.BreakpointAddedEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final M.Breakpoint breakpoint;
+ BreakpointAddedEvent(this.timestamp, this.isolate, this.breakpoint) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(breakpoint != null);
+ }
+}
+
+class BreakpointResolvedEvent implements M.BreakpointResolvedEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final M.Breakpoint breakpoint;
+ BreakpointResolvedEvent(this.timestamp, this.isolate, this.breakpoint) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(breakpoint != null);
+ }
+}
+
+class BreakpointRemovedEvent implements M.BreakpointRemovedEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final M.Breakpoint breakpoint;
+ BreakpointRemovedEvent(this.timestamp, this.isolate, this.breakpoint) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(breakpoint != null);
+ }
+}
+
+class InspectEvent implements M.InspectEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final M.InstanceRef inspectee;
+ InspectEvent(this.timestamp, this.isolate, this.inspectee) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(inspectee != null);
+ }
+}
+
+class NoneEvent implements M.NoneEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ NoneEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class GCEvent implements M.GCEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ GCEvent(this.timestamp, this.isolate) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ }
+}
+
+class ExtensionEvent implements M.ExtensionEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final String extensionKind;
+ final M.ExtensionData extensionData;
+ ExtensionEvent(this.timestamp, this.isolate, this.extensionKind,
+ this.extensionData) {
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(extensionKind != null);
+ assert(extensionData != null);
+ }
+}
+
+class TimelineEventsEvent implements M.TimelineEventsEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ final Iterable<M.TimelineEvent> timelineEvents;
+ TimelineEventsEvent(this.timestamp, this.isolate,
+ Iterable<M.TimelineEvent> timelineEvents)
+ : timelineEvents = new List.unmodifiable(timelineEvents){
+ assert(timestamp != null);
+ assert(isolate != null);
+ assert(timelineEvents != null);
+ }
+}
+
+class ConnectionClosedEvent implements M.ConnectionClosedEvent {
+ final DateTime timestamp;
+ final String reason;
+ ConnectionClosedEvent(this.timestamp, this.reason) {
+ assert(timestamp != null);
+ assert(reason != null);
+ }
+}
diff --git a/runtime/observatory/lib/src/app/notification.dart b/runtime/observatory/lib/src/app/notification.dart
index b95c34e..140e0dc 100644
--- a/runtime/observatory/lib/src/app/notification.dart
+++ b/runtime/observatory/lib/src/app/notification.dart
@@ -14,102 +14,4 @@
class EventNotification implements M.EventNotification {
final M.Event event;
EventNotification(this.event);
- factory EventNotification.fromServiceEvent(ServiceEvent event) {
- M.Event e;
- switch(event.kind) {
- case ServiceEvent.kVMUpdate:
- e = new VMUpdateEventMock(timestamp: event.timestamp, vm: event.vm);
- break;
- case ServiceEvent.kIsolateStart:
- e = new IsolateStartEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kIsolateRunnable:
- e = new IsolateRunnableEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kIsolateExit:
- e = new IsolateExitEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kIsolateUpdate:
- e = new IsolateUpdateEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kIsolateReload:
- // TODO(bernaschina) add error: realoadError.
- e = new IsolateRealodEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kServiceExtensionAdded:
- e = new ServiceExtensionAddedEventMock(timestamp: event.timestamp,
- isolate: event.isolate, extensionRPC: event.extensionRPC);
- break;
- case ServiceEvent.kPauseStart:
- e = new PauseStartEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kPauseExit:
- e = new PauseExitEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kPauseBreakpoint:
- // TODO(cbernaschina) add pauseBreakpoints.
- e = new PauseBreakpointEventMock(timestamp: event.timestamp,
- isolate: event.isolate, breakpoint: event.breakpoint,
- pauseBreakpoints: const <M.Breakpoint>[],
- topFrame: event.topFrame,
- atAsyncSuspension: event.atAsyncSuspension);
- break;
- case ServiceEvent.kPauseInterrupted:
- e = new PauseInterruptedEventMock(timestamp: event.timestamp,
- isolate: event.isolate, topFrame: event.topFrame,
- atAsyncSuspension: event.atAsyncSuspension);
- break;
- case ServiceEvent.kPauseException:
- // TODO(cbernaschina) add exception.
- e = new PauseExceptionEventMock(timestamp: event.timestamp,
- isolate: event.isolate, topFrame: event.topFrame);
- break;
- case ServiceEvent.kNone:
- e = new NoneEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kResume:
- e = new ResumeEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kBreakpointAdded:
- e = new BreakpointAddedEventMock(timestamp: event.timestamp,
- isolate: event.isolate, breakpoint: event.breakpoint);
- break;
- case ServiceEvent.kBreakpointResolved:
- e = new BreakpointResolvedEventMock(timestamp: event.timestamp,
- isolate: event.isolate, breakpoint: event.breakpoint);
- break;
- case ServiceEvent.kBreakpointRemoved:
- e = new BreakpointRemovedEventMock(timestamp: event.timestamp,
- isolate: event.isolate, breakpoint: event.breakpoint);
- break;
- case ServiceEvent.kGC:
- e = new GCEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kInspect:
- // TODO(cbernaschina) add inspectee: event.inspectee.
- e = new InspectEventMock(timestamp: event.timestamp,
- isolate: event.isolate);
- break;
- case ServiceEvent.kConnectionClosed:
- e = new ConnectionClockedEventMock(timestamp: event.timestamp,
- reason: event.reason);
- break;
- case ServiceEvent.kExtension:
- e = new ExtensionEventMock(timestamp: event.timestamp,
- isolate: event.isolate, extensionKind: event.extensionKind,
- extensionData: event.extensionData);
- break;
- }
- return new EventNotification(e);
- }
}
diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart
index 980fcfa..9d624c1 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -124,9 +124,9 @@
@override
onInstall() {
element = new FlagListElement(app.vm,
- app.vm.changes.map((_) => new VMUpdateEventMock(vm: app.vm)),
- new FlagsRepository(),
- app.notifications);
+ app.events,
+ new FlagsRepository(app.vm),
+ app.notifications);
}
void _visit(Uri uri) {
@@ -162,14 +162,23 @@
class ClassTreePage extends SimplePage {
ClassTreePage(app) : super('class-tree', 'class-tree', app);
+ final DivElement container = new DivElement();
+
+ @override
+ void onInstall() {
+ element = container;
+ }
+
void _visit(Uri uri) {
super._visit(uri);
getIsolate(uri).then((isolate) {
- if (element != null) {
- /// Update the page.
- ClassTreeElement page = element;
- page.isolate = isolate;
- }
+ container.children = [
+ new ClassTreeElement(app.vm,
+ isolate,
+ app.events,
+ app.notifications,
+ new ClassRepository(isolate))
+ ];
});
}
}
@@ -362,8 +371,7 @@
if (element == null) {
element = new VMConnectElement(
ObservatoryApplication.app.targets,
- new CrashDumpRepositoryMock(
- load: ObservatoryApplication.app.loadCrashDump),
+ ObservatoryApplication.app.loadCrashDump,
ObservatoryApplication.app.notifications,
queue: ObservatoryApplication.app.queue);
}
diff --git a/runtime/observatory/lib/src/elements/class_tree.dart b/runtime/observatory/lib/src/elements/class_tree.dart
index 16f6928..f17f27b 100644
--- a/runtime/observatory/lib/src/elements/class_tree.dart
+++ b/runtime/observatory/lib/src/elements/class_tree.dart
@@ -4,150 +4,182 @@
library class_tree_element;
-import 'observatory_element.dart';
-import 'dart:async';
import 'dart:html';
-import 'package:logging/logging.dart';
-import 'package:observatory/app.dart';
-import 'package:observatory/service.dart';
-import 'package:polymer/polymer.dart';
+import 'dart:async';
+import 'package:observatory/models.dart' as M;
+import 'package:observatory/src/elements/class_ref.dart';
+import 'package:observatory/src/elements/containers/virtual_tree.dart';
+import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
+import 'package:observatory/src/elements/helpers/tag.dart';
+import 'package:observatory/src/elements/helpers/uris.dart';
+import 'package:observatory/src/elements/nav/bar.dart';
+import 'package:observatory/src/elements/nav/isolate_menu.dart';
+import 'package:observatory/src/elements/nav/menu.dart';
+import 'package:observatory/src/elements/nav/notify.dart';
+import 'package:observatory/src/elements/nav/top_menu.dart';
+import 'package:observatory/src/elements/nav/vm_menu.dart';
-class ClassTreeRow extends TableTreeRow {
- @reflectable final Isolate isolate;
- @reflectable final Class cls;
- ClassTreeRow(this.isolate, this.cls, TableTree tree, ClassTreeRow parent)
- : super(tree, parent) {
+
+class ClassTreeElement extends HtmlElement implements Renderable{
+ static const tag = const Tag<ClassTreeElement>('class-tree',
+ dependencies: const [ClassRefElement.tag,
+ NavBarElement.tag,
+ NavIsolateMenuElement.tag,
+ NavMenuElement.tag,
+ NavNotifyElement.tag,
+ NavTopMenuElement.tag,
+ NavVMMenuElement.tag,
+ VirtualTreeElement.tag]);
+
+ RenderingScheduler _r;
+
+ Stream<RenderedEvent<ClassTreeElement>> get onRendered => _r.onRendered;
+
+ M.VMRef _vm;
+ M.IsolateRef _isolate;
+ M.EventRepository _events;
+ M.NotificationRepository _notifications;
+ M.ClassRepository _classes;
+ M.Class _object;
+ final _subclasses = <String, Iterable<M.Class>>{};
+ final _mixins = <String, List<M.Instance>>{};
+
+ factory ClassTreeElement(M.VMRef vm, M.IsolateRef isolate,
+ M.EventRepository events,
+ M.NotificationRepository notifications,
+ M.ClassRepository classes,
+ {RenderingQueue queue}) {
+ assert(vm != null);
assert(isolate != null);
- assert(cls != null);
+ assert(events != null);
+ assert(notifications != null);
+ assert(classes != null);
+ ClassTreeElement e = document.createElement(tag.name);
+ e._r = new RenderingScheduler(e, queue: queue);
+ e._vm = vm;
+ e._isolate = isolate;
+ e._events = events;
+ e._notifications = notifications;
+ e._classes = classes;
+ return e;
}
- void _addChildren(List<Class> subclasses) {
- for (var subclass in subclasses) {
- if (subclass.isPatch) {
- continue;
- }
- if (subclass.mixin != null) {
- _addChildren(subclass.subclasses);
- } else {
- var row = new ClassTreeRow(isolate, subclass, tree, this);
- children.add(row);
- }
- }
- }
-
- Future _addMixins(Class cls) async {
- var classCell = flexColumns[0];
- if (cls.superclass == null) {
- return;
- }
- bool first = true;
- while (cls.superclass != null && cls.superclass.mixin != null) {
- cls = cls.superclass;
- await cls.mixin.load();
- var span = new SpanElement();
- span.style.alignSelf = 'center';
- span.style.whiteSpace = 'pre';
- if (first) {
- span.text = ' with ';
- } else {
- span.text = ', ';
- }
- classCell.children.add(span);
- var mixinRef = new Element.tag('class-ref');
- mixinRef.ref = cls.mixin.typeClass;
- mixinRef.style.alignSelf = 'center';
- classCell.children.add(mixinRef);
- first = false;
- }
- }
-
- Future _addClass(Class cls) async {
- var classCell = flexColumns[0];
- classCell.style.justifyContent = 'flex-start';
- var classRef = new Element.tag('class-ref');
- classRef.ref = cls;
- classRef.style.alignSelf = 'center';
- classCell.children.add(classRef);
- if (cls.superclass != null && cls.superclass.mixin != null) {
- await _addMixins(cls);
- }
- if (cls.subclasses.isNotEmpty) {
- var span = new SpanElement();
- span.style.paddingLeft = '.5em';
- span.style.alignSelf = 'center';
- int subclassCount = _indirectSubclassCount(cls) - 1;
- if (subclassCount > 1) {
- span.text = '($subclassCount subclasses)';
- } else {
- span.text = '($subclassCount subclass)';
- }
- classCell.children.add(span);
- }
- }
-
- void onShow() {
- super.onShow();
- if (children.length == 0) {
- _addChildren(cls.subclasses);
- }
- _addClass(cls);
- }
-
- static int _indirectSubclassCount(var cls) {
- int count = 0;
- if (cls.mixin == null) {
- // Don't count synthetic mixin classes in subclass count.
- count++;
- }
- for (var subclass in cls.subclasses) {
- count += _indirectSubclassCount(subclass);
- }
- return count;
- }
-
- bool hasChildren() {
- return cls.subclasses.isNotEmpty;
- }
-}
-
-
-@CustomTag('class-tree')
-class ClassTreeElement extends ObservatoryElement {
- @observable Isolate isolate;
-
- TableTree tree;
-
ClassTreeElement.created() : super.created();
@override
void attached() {
super.attached();
- var tableBody = shadowRoot.querySelector('#tableTreeBody');
- assert(tableBody != null);
- tree = new TableTree(tableBody, 1);
- if (isolate != null) {
- _update(isolate.objectClass);
+ _refresh();
+ _r.enable();
+ }
+
+ @override
+ void detached() {
+ super.detached();
+ children = [];
+ _r.disable(notify: true);
+ }
+
+ VirtualTreeElement _tree;
+
+ void render() {
+ children = [
+ new NavBarElement(queue: _r.queue)
+ ..children = [
+ new NavTopMenuElement(queue: _r.queue),
+ new NavVMMenuElement(_vm, _events, queue: _r.queue),
+ new NavIsolateMenuElement(_isolate, _events, queue: _r.queue),
+ new NavMenuElement('class hierarchy', link: Uris.classTree(_isolate),
+ last: true, queue: _r.queue),
+ new NavNotifyElement(_notifications, queue: _r.queue)
+ ],
+ new DivElement()
+ ..classes = ['content-centered']
+ ..children = [
+ new HeadingElement.h1()..text = 'Class Hierarchy',
+ new BRElement(), new HRElement(),
+ _object == null ? (new HeadingElement.h2()..text = 'Loading...')
+ : _createTree()
+ ]
+ ];
+ }
+
+ Element _createTree() {
+ _tree = new VirtualTreeElement(_create, _update, _children,
+ items: [_object], queue: _r.queue);
+ _tree.expand(_object, autoExpandSingleChildNodes: true);
+ return _tree;
+ }
+
+ Future _refresh() async {
+ _object = null;
+ _subclasses.clear();
+ _mixins.clear();
+ _object = await _register(await _classes.getObject());
+ _r.dirty();
+ }
+
+ Future<M.Class> _register(M.Class cls) async {
+ _subclasses[cls.id] = await Future.wait(
+ (await Future.wait(cls.subclasses.map(_getActualChildrens)))
+ .expand((f) => f)
+ .map(_register)
+ );
+ return cls;
+ }
+
+ Future<Iterable<M.Class>> _getActualChildrens(M.ClassRef ref) async {
+ var cls = await _classes.get(ref.id);
+ if (cls.isPatch) {
+ return const [];
+ }
+ if (cls.mixin == null) {
+ return [cls];
+ }
+ return (await Future.wait(cls.subclasses.map(_getActualChildrens)))
+ .expand((f) => f)
+ ..forEach((subcls) {
+ _mixins[subcls.id] = (_mixins[subcls.id] ?? [])..add(cls.mixin);
+ });
+ }
+
+ static Element _create(toggle) {
+ return new DivElement()..classes = ['class-tree-item']
+ ..children = [
+ new SpanElement()..classes = ['lines'],
+ new SpanElement()..classes = ['expander']
+ ..onClick.listen((_) => toggle(autoToggleSingleChildNodes: true)),
+ new SpanElement()..classes = ['name']
+ ];
+ }
+
+ void _update(HtmlElement el, M.Class cls, int index) {
+ virtualTreeUpdateLines(el.children[0], index);
+ if (cls.subclasses.isEmpty) {
+ el.children[1].text = '';
+ } else {
+ el.children[1].text = _tree.isExpanded(cls) ? 'â–¼' : 'â–º';
+ }
+ el.children[2].children = [
+ new ClassRefElement(_isolate, cls, queue: _r.queue)
+ ];
+ if (_mixins[cls.id] != null) {
+ el.children[2].children.addAll(_createMixins(_mixins[cls.id]));
}
}
- isolateChanged(oldValue) {
- isolate.getClassHierarchy().then((objectClass) {
- _update(objectClass);
- });
+ List<Element> _createMixins(List<M.Instance> types) {
+ final children = types.expand((type) => [
+ new SpanElement()..text = ', ',
+ type.typeClass == null
+ ? (new SpanElement()..text = type.name.split('<').first)
+ : new ClassRefElement(_isolate, type.typeClass, queue: _r.queue)
+ ]).toList();
+ children.first.text = ' with ';
+ return children;
}
- void _update(Class root) {
- try {
- var rootRow = new ClassTreeRow(isolate, root, tree, null);
- rootRow.children.add(new ClassTreeRow(isolate, root, tree, rootRow));
- tree.initialize(rootRow);
- } catch (e, stackTrace) {
- Logger.root.warning('_update', e, stackTrace);
- }
- // Check if we only have one node at the root and expand it.
- if (tree.rows.length == 1) {
- tree.toggle(tree.rows[0]);
- }
- notifyPropertyChange(#tree, null, tree);
+ Iterable<M.Class> _children(M.Class cls) {
+ return _subclasses[cls.id];
}
}
diff --git a/runtime/observatory/lib/src/elements/class_tree.html b/runtime/observatory/lib/src/elements/class_tree.html
deleted file mode 100644
index e2fbb32..0000000
--- a/runtime/observatory/lib/src/elements/class_tree.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<link rel="import" href="../../../../packages/polymer/polymer.html">
-
-<polymer-element name="class-tree">
- <template>
- <link rel="stylesheet" href="css/shared.css">
- <style>
- .table {
- border-spacing: 0px;
- width: 100%;
- margin-bottom: 20px
- vertical-align: middle;
- }
-
- tr {
- background-color: #FFFFFF;
- }
-
- tr:hover {
- background-color: #FAFAFA;
- }
-
- th {
- text-align: left;
- }
- </style>
- <nav-bar>
- <top-nav-menu></top-nav-menu>
- <vm-nav-menu vm="{{ isolate.vm }}"></vm-nav-menu>
- <isolate-nav-menu isolate="{{ isolate }}"></isolate-nav-menu>
- <nav-menu link="{{ makeLink('/class-tree', isolate) }}" anchor="class hierarchy" last="{{ true }}"></nav-menu>
- <nav-notify notifications="{{ app.notifications }}"></nav-notify>
- </nav-bar>
- <div class="content-centered">
- <h1>Class Hierarchy</h1>
- <table id="tableTree" class="table">
- <tbody id="tableTreeBody"></tbody>
- </table>
- </div>
- </template>
-</polymer-element>
-
-<script type="application/dart" src="class_tree.dart"></script>
diff --git a/runtime/observatory/lib/src/elements/code_ref.dart b/runtime/observatory/lib/src/elements/code_ref.dart
index bead036..61917a8 100644
--- a/runtime/observatory/lib/src/elements/code_ref.dart
+++ b/runtime/observatory/lib/src/elements/code_ref.dart
@@ -47,8 +47,8 @@
@override
void detached() {
super.detached();
- _r.disable(notify: true);
children = [];
+ _r.disable(notify: true);
}
void render() {
diff --git a/runtime/observatory/lib/src/elements/code_ref_wrapper.dart b/runtime/observatory/lib/src/elements/code_ref_wrapper.dart
index 503a784..f630f33 100644
--- a/runtime/observatory/lib/src/elements/code_ref_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/code_ref_wrapper.dart
@@ -20,8 +20,13 @@
static const tag = const Tag<CodeRefElementWrapper>('code-ref');
Code _code;
+
Code get ref => _code;
- void set ref(Code ref) { _code = ref; render(); }
+
+ void set ref(Code value) {
+ _code = value;
+ render();
+ }
CodeRefElementWrapper.created() : super.created() {
binder.registerCallback(this);
@@ -37,7 +42,9 @@
void render() {
shadowRoot.children = [];
- if (ref == null) return;
+ if (ref == null) {
+ return;
+ }
shadowRoot.children = [
new StyleElement()
diff --git a/runtime/observatory/lib/src/elements/containers/virtual_collection.dart b/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
index 36e682c..e45a143 100644
--- a/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
+++ b/runtime/observatory/lib/src/elements/containers/virtual_collection.dart
@@ -24,7 +24,7 @@
VirtualCollectionUpdateCallback _update;
double _itemHeight;
int _top;
- int _height;
+ double _height;
List _items;
StreamSubscription _onScrollSubscription;
StreamSubscription _onResizeSubscription;
diff --git a/runtime/observatory/lib/src/elements/containers/virtual_tree.dart b/runtime/observatory/lib/src/elements/containers/virtual_tree.dart
index 78ea96b..4df0dd7 100644
--- a/runtime/observatory/lib/src/elements/containers/virtual_tree.dart
+++ b/runtime/observatory/lib/src/elements/containers/virtual_tree.dart
@@ -4,6 +4,7 @@
import 'dart:async';
import 'dart:html';
+import 'dart:math' as Math;
import 'package:observatory/src/elements/containers/virtual_collection.dart';
import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
@@ -13,6 +14,16 @@
typedef void VirtualTreeUpdateCallback(HtmlElement el, dynamic item, int depth);
typedef Iterable<dynamic> VritualTreeGetChildrenCallback(dynamic value);
+void virtualTreeUpdateLines(SpanElement element, int n) {
+ n = Math.max(0, n);
+ while (element.children.length > n) {
+ element.children.removeLast();
+ }
+ while (element.children.length < n) {
+ element.children.add(new SpanElement());
+ }
+}
+
class VirtualTreeElement extends HtmlElement implements Renderable {
static const tag =
const Tag<VirtualTreeElement>('virtual-tree', dependencies: const [
diff --git a/runtime/observatory/lib/src/elements/css/shared.css b/runtime/observatory/lib/src/elements/css/shared.css
index bd15c93..e468fc8 100644
--- a/runtime/observatory/lib/src/elements/css/shared.css
+++ b/runtime/observatory/lib/src/elements/css/shared.css
@@ -388,6 +388,34 @@
text-decoration: none;
}
+/* class-tree */
+
+class-tree {
+ position: relative;
+ display: block;
+ height: 100%;
+}
+
+class-tree virtual-tree {
+ position: absolute;
+ height: auto;
+ top: 60px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
+
+class-tree virtual-tree .class-tree-item {
+ line-height: 25px;
+ height: 25px;
+ padding-left: 10%;
+ padding-right: 10%;
+}
+
+class-tree virtual-tree .class-tree-item .name {
+ margin-left: 0.5em;
+}
+
/* error-ref */
/* TODO(cbernaschina) fix error-ref-wrapped to error-ref when wrapper
removed */
@@ -542,7 +570,8 @@
padding: 8px;
border-width: 2px;
line-height: 13px;
- font: 400 13px 'Montserrat', sans-serif;
+ font-size: 13px;
+ font: 400 'Montserrat', sans-serif;
}
nav-refresh-wrapped > li > button[disabled] {
color: #aaa;
@@ -553,6 +582,18 @@
margin: 0;
}
+/* observatory-application */
+
+observatory-application {
+ display: block;
+ height: 100%;
+}
+
+observatory-application > div {
+ display: block;
+ height: 100%;
+}
+
/* script-ref */
/* TODO(cbernaschina) fix script-ref-wrapped to script-ref when wrapper
removed */
@@ -622,8 +663,64 @@
}
virtual-collection .shifter > * {
+ display: block;
position: relative;
top: -25%;
+ width: 100%;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow-x: hidden;
+ white-space: nowrap;
+}
+
+/* virtual-tree */
+
+virtual-tree .expander {
+ display: inline-block;
+ text-align: center;
+ font-weight: bold;
+ font-size: 18px;
+ width: 19px;
+}
+
+virtual-tree .lines,
+virtual-tree .lines > span {
+ display: inline-block;
+ vertical-align: top;
+ height: 100%;
+ line-height: 100%;
+}
+
+virtual-tree .lines:before,
+virtual-tree .lines > span:before {
+ display: inline-block;
+ content: '';
+}
+
+virtual-tree .lines > span {
+ width: 3px;
+ margin-left: 8px;
+ margin-right: 8px;
+}
+
+virtual-tree .lines > span:nth-child(5n) {
+ background-color: #673AB7;
+}
+
+virtual-tree .lines > span:nth-child(5n+1) {
+ background-color: #F44336;
+}
+
+virtual-tree .lines > span:nth-child(5n+2) {
+ background-color: #4CAF50;
+}
+
+virtual-tree .lines > span:nth-child(5n+3) {
+ background-color: #3F51B5;
+}
+
+virtual-tree .lines > span:nth-child(5n+4) {
+ background-color: #FF9800;
}
/* vm-connect-target */
@@ -638,3 +735,9 @@
vm-connect-target > button.delete-button:hover {
background: #ff0000;
}
+
+/* vm-connect */
+
+vm-connect ul {
+ list-style-type: none;
+}
diff --git a/runtime/observatory/lib/src/elements/error_ref.dart b/runtime/observatory/lib/src/elements/error_ref.dart
index b30dd90..55685ed 100644
--- a/runtime/observatory/lib/src/elements/error_ref.dart
+++ b/runtime/observatory/lib/src/elements/error_ref.dart
@@ -19,6 +19,7 @@
Stream<RenderedEvent<ErrorRefElement>> get onRendered => _r.onRendered;
ErrorRef _error;
+
ErrorRef get error => _error;
factory ErrorRefElement(ErrorRef error, {RenderingQueue queue}) {
diff --git a/runtime/observatory/lib/src/elements/error_ref_wrapper.dart b/runtime/observatory/lib/src/elements/error_ref_wrapper.dart
index 4efe939..50f8b9a 100644
--- a/runtime/observatory/lib/src/elements/error_ref_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/error_ref_wrapper.dart
@@ -5,8 +5,7 @@
import 'dart:html';
import 'package:observatory/app.dart';
-import 'package:observatory/mocks.dart' show ErrorRefMock;
-import 'package:observatory/service_html.dart' show ServiceMap, DartError;
+import 'package:observatory/service.dart';
import 'package:observatory/src/elements/error_ref.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
import 'package:observatory/src/elements/shims/binding.dart';
@@ -19,9 +18,14 @@
static const tag = const Tag<ErrorRefElementWrapper>('error-ref');
- ServiceMap _error;
- ServiceMap get ref => _error;
- void set ref(ServiceMap ref) { _error = ref; render(); }
+ DartError _error;
+
+ DartError get ref => _error;
+
+ void set ref(DartError value) {
+ _error = value;
+ render();
+ }
ErrorRefElementWrapper.created() : super.created() {
binder.registerCallback(this);
@@ -37,42 +41,24 @@
void render() {
shadowRoot.children = [];
- if (_error == null) return;
-
- if (ref is Map) {
- shadowRoot.children = [
- new StyleElement()
- ..text = '''
- error-ref-wrapped > pre {
- background-color: #f5f5f5;
- border: 1px solid #ccc;
- padding: 10px;
- font-family: consolas, courier, monospace;
- font-size: 1em;
- line-height: 1.2em;
- white-space: pre;
- }
- ''',
- new ErrorRefElement(new ErrorRefMock(message: ref['message']))
- ];
- } else {
- shadowRoot.children = [
- new StyleElement()
- ..text = '''
- error-ref-wrapped > pre {
- background-color: #f5f5f5;
- border: 1px solid #ccc;
- padding: 10px;
- font-family: consolas, courier, monospace;
- font-size: 1em;
- line-height: 1.2em;
- white-space: pre;
- }
- ''',
- new ErrorRefElement(
- new ErrorRefMock(message: (ref as DartError).message),
- queue: ObservatoryApplication.app.queue)
- ];
+ if (_error == null) {
+ return;
}
+
+ shadowRoot.children = [
+ new StyleElement()
+ ..text = '''
+ error-ref-wrapped > pre {
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ padding: 10px;
+ font-family: consolas, courier, monospace;
+ font-size: 1em;
+ line-height: 1.2em;
+ white-space: pre;
+ }
+ ''',
+ new ErrorRefElement(_error, queue: ObservatoryApplication.app.queue)
+ ];
}
}
diff --git a/runtime/observatory/lib/src/elements/flag_list.dart b/runtime/observatory/lib/src/elements/flag_list.dart
index 19d7816..1fdb3d5 100644
--- a/runtime/observatory/lib/src/elements/flag_list.dart
+++ b/runtime/observatory/lib/src/elements/flag_list.dart
@@ -33,7 +33,7 @@
Stream<RenderedEvent<FlagListElement>> get onRendered => _r.onRendered;
M.VMRef _vm;
- Stream<M.VMUpdateEvent> _vmUpdates;
+ M.EventRepository _events;
M.FlagsRepository _repository;
M.NotificationRepository _notifications;
Iterable<M.Flag> _flags;
@@ -41,18 +41,18 @@
M.VMRef get vm => _vm;
factory FlagListElement(M.VMRef vm,
- Stream<M.VMUpdateEvent> vmUpdates,
+ M.EventRepository events,
M.FlagsRepository repository,
M.NotificationRepository notifications,
{RenderingQueue queue}) {
assert(vm != null);
- assert(vmUpdates != null);
+ assert(events != null);
assert(repository != null);
assert(notifications != null);
FlagListElement e = document.createElement(tag.name);
e._r = new RenderingScheduler(e, queue: queue);
e._vm = vm;
- e._vmUpdates = vmUpdates;
+ e._events = events;
e._repository = repository;
e._notifications = notifications;
return e;
@@ -63,8 +63,8 @@
@override
void attached() {
super.attached();
- _r.enable();
_refresh();
+ _r.enable();
}
@override
@@ -103,7 +103,7 @@
new NavBarElement(queue: _r.queue)
..children = [
new NavTopMenuElement(queue: _r.queue),
- new NavVMMenuElement(_vm, _vmUpdates, queue: _r.queue),
+ new NavVMMenuElement(_vm, _events, queue: _r.queue),
new NavMenuElement('flags', link: Uris.flags(), last: true,
queue: _r.queue),
new NavRefreshElement(queue: _r.queue)
@@ -124,9 +124,11 @@
];
}
- Future _refresh() async {
- _flags = await _repository.list(_vm);
- _r.dirty();
+ Future _refresh() {
+ return _repository.list().then((flags) {
+ _flags = flags;
+ _r.dirty();
+ });
}
static bool _isModified(M.Flag flag) => flag.modified;
diff --git a/runtime/observatory/lib/src/elements/function_ref.dart b/runtime/observatory/lib/src/elements/function_ref.dart
index f6b2ec3..204169d 100644
--- a/runtime/observatory/lib/src/elements/function_ref.dart
+++ b/runtime/observatory/lib/src/elements/function_ref.dart
@@ -52,8 +52,8 @@
@override
void detached() {
super.detached();
- _r.disable(notify: true);
children = [];
+ _r.disable(notify: true);
}
void render() {
diff --git a/runtime/observatory/lib/src/elements/function_ref_wrapper.dart b/runtime/observatory/lib/src/elements/function_ref_wrapper.dart
index e41e43a..dbde827 100644
--- a/runtime/observatory/lib/src/elements/function_ref_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/function_ref_wrapper.dart
@@ -21,10 +21,18 @@
bool _qualified = true;
ServiceFunction _function;
+
bool get qualified => _qualified;
ServiceFunction get ref => _function;
- void set qualified(bool qualified) { _qualified = qualified; render(); }
- void set ref(ServiceFunction ref) { _function = ref; render(); }
+
+ void set qualified(bool value) {
+ _qualified = value;
+ render();
+ }
+ void set ref(ServiceFunction value) {
+ _function = value;
+ render();
+ }
FunctionRefElementWrapper.created() : super.created() {
binder.registerCallback(this);
@@ -40,7 +48,9 @@
void render() {
shadowRoot.children = [];
- if (ref == null) return;
+ if (ref == null) {
+ return;
+ }
shadowRoot.children = [
new StyleElement()
diff --git a/runtime/observatory/lib/src/elements/isolate_ref.dart b/runtime/observatory/lib/src/elements/isolate_ref.dart
index f27c8fb..4440001 100644
--- a/runtime/observatory/lib/src/elements/isolate_ref.dart
+++ b/runtime/observatory/lib/src/elements/isolate_ref.dart
@@ -7,7 +7,7 @@
import 'dart:html';
import 'dart:async';
import 'package:observatory/models.dart' as M
- show IsolateRef, IsolateUpdateEvent;
+ show IsolateRef, EventRepository;
import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
import 'package:observatory/src/elements/helpers/uris.dart';
@@ -19,20 +19,21 @@
Stream<RenderedEvent<IsolateRefElement>> get onRendered => _r.onRendered;
- Stream<M.IsolateUpdateEvent> _updates;
- StreamSubscription _updatesSubscription;
+
M.IsolateRef _isolate;
+ M.EventRepository _events;
+ StreamSubscription _updatesSubscription;
M.IsolateRef get isolate => _isolate;
- factory IsolateRefElement(M.IsolateRef isolate,
- Stream<M.IsolateUpdateEvent> updates, {RenderingQueue queue}) {
+ factory IsolateRefElement(M.IsolateRef isolate, M.EventRepository events,
+ {RenderingQueue queue}) {
assert(isolate != null);
- assert(updates != null);
+ assert(events != null);
IsolateRefElement e = document.createElement(tag.name);
e._r = new RenderingScheduler(e, queue: queue);
e._isolate = isolate;
- e._updates = updates;
+ e._events = events;
return e;
}
@@ -41,21 +42,18 @@
@override
void attached() {
super.attached();
- assert(_isolate != null);
- assert(_updates != null);
+ _updatesSubscription = _events.onIsolateUpdate
+ .where((e) => e.isolate.id == isolate.id)
+ .listen((e) { _isolate = e.isolate; _r.dirty(); });
_r.enable();
- _updatesSubscription = _updates
- .where((M.IsolateUpdateEvent e) => e.isolate.id == isolate.id)
- .listen((M.IsolateUpdateEvent e) { _isolate = e.isolate; _r.dirty(); });
}
@override
void detached() {
- super.detached(); _r.disable(notify: true);
+ super.detached();
children = [];
- assert(_updatesSubscription != null);
+ _r.disable(notify: true);
_updatesSubscription.cancel();
- _updatesSubscription = null;
}
void render() {
diff --git a/runtime/observatory/lib/src/elements/isolate_ref_wrapper.dart b/runtime/observatory/lib/src/elements/isolate_ref_wrapper.dart
index 369e68a..6c9547b 100644
--- a/runtime/observatory/lib/src/elements/isolate_ref_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/isolate_ref_wrapper.dart
@@ -3,11 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:async';
import 'package:observatory/app.dart';
-import 'package:observatory/models.dart' show IsolateUpdateEvent;
-import 'package:observatory/mocks.dart' show IsolateUpdateEventMock;
import 'package:observatory/service_html.dart' show Isolate;
import 'package:observatory/src/elements/isolate_ref.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
@@ -22,17 +19,16 @@
static const tag = const Tag<IsolateRefElementWrapper>('isolate-ref');
- final StreamController<IsolateUpdateEvent> _updatesController =
- new StreamController<IsolateUpdateEvent>();
- Stream<IsolateUpdateEvent> _updates;
- StreamSubscription _subscription;
-
Isolate _isolate;
+
Isolate get ref => _isolate;
- void set ref(Isolate ref) { _isolate = ref; _detached(); _attached(); }
+
+ void set ref(Isolate value) {
+ _isolate = value;
+ render();
+ }
IsolateRefElementWrapper.created() : super.created() {
- _updates = _updatesController.stream.asBroadcastStream();
binder.registerCallback(this);
createShadowRoot();
render();
@@ -41,34 +37,14 @@
@override
void attached() {
super.attached();
- _attached();
- }
-
- void _attached() {
- if (ref != null) {
- _subscription = ref.changes.listen((_) {
- _updatesController.add(new IsolateUpdateEventMock(isolate: ref));
- });
- }
render();
}
- @override
- void detached() {
- super.detached();
- _detached();
- }
-
- void _detached() {
- if (_subscription != null) {
- _subscription.cancel();
- _subscription = null;
- }
- }
-
void render() {
shadowRoot.children = [];
- if (ref == null) return;
+ if (ref == null) {
+ return;
+ }
shadowRoot.children = [
new StyleElement()
@@ -80,8 +56,9 @@
color: #0489c3;
text-decoration: none;
}''',
- new IsolateRefElement(_isolate, _updates,
- queue: ObservatoryApplication.app.queue)
+ new IsolateRefElement(_isolate, app.events, queue: app.queue)
];
}
+
+ ObservatoryApplication get app => ObservatoryApplication.app;
}
diff --git a/runtime/observatory/lib/src/elements/nav/bar.dart b/runtime/observatory/lib/src/elements/nav/bar.dart
index 8bb115e..b175ba6 100644
--- a/runtime/observatory/lib/src/elements/nav/bar.dart
+++ b/runtime/observatory/lib/src/elements/nav/bar.dart
@@ -11,8 +11,9 @@
static final StyleElement _style = () {
var style = new StyleElement();
style.text = 'nav.nav-bar {'
+ 'line-height: normal;'
'position: fixed;'
- 'top: -56px;'
+ 'top: 0;'
'width: 100%;'
'z-index: 1000;'
'}'
@@ -21,20 +22,12 @@
'position: relative;'
'list-style: none;'
'padding-left: 0;'
- 'margin-left: 0;'
+ 'margin: 0;'
'width: 100%;'
'z-index: 1000;'
'font: 400 16px \'Montserrat\', sans-serif;'
'color: white;'
'background-color: #0489c3;'
- '}'
- 'nav.nav-bar:after {'
- 'content: ""; clear: both; display: block;'
- '}'
- 'nav.nav-bar:before {'
- 'height: 40px;'
- 'background-color: #0489c3;'
- 'content: ""; display: block;'
'}';
return style;
}();
diff --git a/runtime/observatory/lib/src/elements/nav/class_menu_wrapper.dart b/runtime/observatory/lib/src/elements/nav/class_menu_wrapper.dart
index 35fc448..42a65de 100644
--- a/runtime/observatory/lib/src/elements/nav/class_menu_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/class_menu_wrapper.dart
@@ -21,13 +21,17 @@
bool _last = false;
Class _cls;
+
bool get last => _last;
Class get cls => _cls;
+
set last(bool value) {
- _last = value; render();
+ _last = value;
+ render();
}
set cls(Class value) {
- _cls = value; render();
+ _cls = value;
+ render();
}
NavClassMenuElementWrapper.created() : super.created() {
@@ -45,7 +49,9 @@
void render() {
shadowRoot.children = [];
- if (_cls == null || _last == null) return;
+ if (_cls == null || _last == null) {
+ return;
+ }
shadowRoot.children = [
new NavClassMenuElement(cls.isolate, cls, last: last,
diff --git a/runtime/observatory/lib/src/elements/nav/isolate_menu.dart b/runtime/observatory/lib/src/elements/nav/isolate_menu.dart
index 3f0089a..d9f82c9 100644
--- a/runtime/observatory/lib/src/elements/nav/isolate_menu.dart
+++ b/runtime/observatory/lib/src/elements/nav/isolate_menu.dart
@@ -5,7 +5,7 @@
import 'dart:html';
import 'dart:async';
import 'package:observatory/models.dart' as M
- show IsolateRef, IsolateUpdateEvent;
+ show IsolateRef, EventRepository;
import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
import 'package:observatory/src/elements/helpers/uris.dart';
@@ -21,25 +21,27 @@
Stream<RenderedEvent<NavIsolateMenuElement>> get onRendered => _r.onRendered;
- Stream<M.IsolateUpdateEvent> _updates;
- StreamSubscription _updatesSubscription;
-
bool _last;
M.IsolateRef _isolate;
+ M.EventRepository _events;
+ StreamSubscription _updatesSubscription;
+
bool get last => _last;
M.IsolateRef get isolate => _isolate;
+
set last(bool value) => _last = _r.checkAndReact(_last, value);
factory NavIsolateMenuElement(M.IsolateRef isolate,
- Stream<M.IsolateUpdateEvent> updates, {bool last: false,
+ M.EventRepository events, {bool last: false,
RenderingQueue queue}) {
assert(isolate != null);
+ assert(events != null);
assert(last != null);
NavIsolateMenuElement e = document.createElement(tag.name);
e._r = new RenderingScheduler(e, queue: queue);
e._isolate = isolate;
e._last = last;
- e._updates = updates;
+ e._events = events;
return e;
}
@@ -51,12 +53,10 @@
@override
void attached() {
super.attached();
- assert(_isolate != null);
- assert(_updates != null);
+ _updatesSubscription = _events.onIsolateUpdate
+ .where((e) => e.isolate.id == isolate.id)
+ .listen((e) { _isolate = e.isolate; _r.dirty(); });
_r.enable();
- _updatesSubscription = _updates
- .where((M.IsolateUpdateEvent e) => e.isolate.id == isolate.id)
- .listen((M.IsolateUpdateEvent e) { _isolate = e.isolate; _r.dirty(); });
}
@override
diff --git a/runtime/observatory/lib/src/elements/nav/isolate_menu_wrapper.dart b/runtime/observatory/lib/src/elements/nav/isolate_menu_wrapper.dart
index 3af85d2..ff4e1ed 100644
--- a/runtime/observatory/lib/src/elements/nav/isolate_menu_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/isolate_menu_wrapper.dart
@@ -3,12 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:async';
import 'package:observatory/app.dart';
import 'package:observatory/service.dart';
-import 'package:observatory/mocks.dart';
-import 'package:observatory/models.dart' as M;
import 'package:observatory/src/elements/helpers/tag.dart';
import 'package:observatory/src/elements/shims/binding.dart';
import 'package:observatory/src/elements/nav/isolate_menu.dart';
@@ -22,24 +19,22 @@
static const tag =
const Tag<NavIsolateMenuElementWrapper>('isolate-nav-menu');
- final StreamController<M.IsolateUpdateEvent> _updatesController =
- new StreamController<M.IsolateUpdateEvent>();
- Stream<M.IsolateUpdateEvent> _updates;
- StreamSubscription _subscription;
-
bool _last = false;
Isolate _isolate;
+
bool get last => _last;
Isolate get isolate => _isolate;
+
set last(bool value) {
- _last = value; render();
+ _last = value;
+ render();
}
set isolate(Isolate value) {
- _isolate = value; _detached(); _attached();
+ _isolate = value;
+ render();
}
NavIsolateMenuElementWrapper.created() : super.created() {
- _updates = _updatesController.stream.asBroadcastStream();
binder.registerCallback(this);
_last = _getBoolAttribute('last');
createShadowRoot();
@@ -49,42 +44,24 @@
@override
void attached() {
super.attached();
- _attached();
- }
-
- @override
- void detached() {
- super.detached();
- _detached();
- }
-
- void _attached() {
- if (_isolate != null) {
- _subscription = _isolate.changes.listen((_) {
- _updatesController.add(new IsolateUpdateEventMock(isolate: isolate));
- });
- }
render();
}
- void _detached() {
- if (_subscription != null) {
- _subscription.cancel();
- _subscription = null;
- }
- }
-
void render() {
shadowRoot.children = [];
- if (_isolate == null || _last == null) return;
+ if (_isolate == null || _last == null) {
+ return;
+ }
shadowRoot.children = [
- new NavIsolateMenuElement(isolate, _updates, last: last,
- queue: ObservatoryApplication.app.queue)
+ new NavIsolateMenuElement(_isolate, app.events, last: _last,
+ queue: app.queue)
..children = [new ContentElement()]
];
}
+ ObservatoryApplication get app => ObservatoryApplication.app;
+
bool _getBoolAttribute(String name) {
final String value = getAttribute(name);
return !(value == null || value == 'false');
diff --git a/runtime/observatory/lib/src/elements/nav/library_menu.dart b/runtime/observatory/lib/src/elements/nav/library_menu.dart
index 0403ac3..36160d6 100644
--- a/runtime/observatory/lib/src/elements/nav/library_menu.dart
+++ b/runtime/observatory/lib/src/elements/nav/library_menu.dart
@@ -21,9 +21,11 @@
bool _last;
M.IsolateRef _isolate;
M.LibraryRef _library;
+
bool get last => _last;
M.IsolateRef get isolate => _isolate;
M.LibraryRef get library => _library;
+
set last(bool value) => _last = _r.checkAndReact(_last, value);
factory NavLibraryMenuElement(M.IsolateRef isolate, M.LibraryRef library,
@@ -42,11 +44,15 @@
NavLibraryMenuElement.created() : super.created() { createShadowRoot(); }
@override
- void attached() { super.attached(); _r.enable(); }
+ void attached() {
+ super.attached();
+ _r.enable();
+ }
@override
void detached() {
- super.detached(); _r.disable(notify: true);
+ super.detached();
+ _r.disable(notify: true);
shadowRoot.children = [];
}
diff --git a/runtime/observatory/lib/src/elements/nav/library_menu_wrapper.dart b/runtime/observatory/lib/src/elements/nav/library_menu_wrapper.dart
index 1097bdc..8db0347 100644
--- a/runtime/observatory/lib/src/elements/nav/library_menu_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/library_menu_wrapper.dart
@@ -21,13 +21,17 @@
bool _last = false;
Library _library;
+
bool get last => _last;
Library get library => _library;
+
set last(bool value) {
- _last = value; render();
+ _last = value;
+ render();
}
set library(Library value) {
- _library = value; render();
+ _library = value;
+ render();
}
NavLibraryMenuElementWrapper.created() : super.created() {
@@ -45,7 +49,9 @@
void render() {
shadowRoot.children = [];
- if (_library == null || _last == null) return;
+ if (_library == null || _last == null) {
+ return;
+ }
shadowRoot.children = [
new NavLibraryMenuElement(library.isolate, library, last: last,
diff --git a/runtime/observatory/lib/src/elements/nav/menu.dart b/runtime/observatory/lib/src/elements/nav/menu.dart
index bcd9c90..2624ad7 100644
--- a/runtime/observatory/lib/src/elements/nav/menu.dart
+++ b/runtime/observatory/lib/src/elements/nav/menu.dart
@@ -53,9 +53,11 @@
String _label;
String _link;
bool _last;
+
String get label => _label;
String get link => _link;
bool get last => _last;
+
set label(String value) => _label = _r.checkAndReact(_label, value);
set link(String value) => _link = _r.checkAndReact(_link, value);
set last(bool value) => _last = _r.checkAndReact(_link, value);
@@ -75,11 +77,15 @@
NavMenuElement.created() : super.created() { createShadowRoot(); }
@override
- void attached() { super.attached(); _r.enable(); }
+ void attached() {
+ super.attached();
+ _r.enable();
+ }
@override
void detached() {
- super.detached(); _r.disable(notify: true);
+ super.detached();
+ _r.disable(notify: true);
shadowRoot.children = [];
}
diff --git a/runtime/observatory/lib/src/elements/nav/menu_item.dart b/runtime/observatory/lib/src/elements/nav/menu_item.dart
index 2411ee5..03ced3d 100644
--- a/runtime/observatory/lib/src/elements/nav/menu_item.dart
+++ b/runtime/observatory/lib/src/elements/nav/menu_item.dart
@@ -55,8 +55,10 @@
String _label;
String _link;
+
String get label => _label;
String get link => _link;
+
set label(String value) => _label = _r.checkAndReact(_label, value);
set link(String value) => _link = _r.checkAndReact(_link, value);
@@ -74,11 +76,15 @@
NavMenuItemElement.created() : super.created() { createShadowRoot(); }
@override
- void attached() { super.attached(); _r.enable(); }
+ void attached() {
+ super.attached();
+ _r.enable();
+ }
@override
void detached() {
- super.detached(); _r.disable(notify: true);
+ super.detached();
+ _r.disable(notify: true);
shadowRoot.children = [];
}
diff --git a/runtime/observatory/lib/src/elements/nav/menu_item_wrapper.dart b/runtime/observatory/lib/src/elements/nav/menu_item_wrapper.dart
index 7888745..e00699c 100644
--- a/runtime/observatory/lib/src/elements/nav/menu_item_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/menu_item_wrapper.dart
@@ -20,13 +20,17 @@
String _anchor;
String _link;
+
String get anchor => _anchor;
String get link => _link;
+
set anchor(String value) {
- _anchor = value; render();
+ _anchor = value;
+ render();
}
set link(String value) {
- _link = value; render();
+ _link = value;
+ render();
}
NavMenuItemElementWrapper.created() : super.created() {
@@ -45,7 +49,9 @@
void render() {
shadowRoot.children = [];
- if (_anchor == null) return;
+ if (_anchor == null) {
+ return;
+ }
shadowRoot.children = [
new NavMenuItemElement(_anchor, link: '#$link',
diff --git a/runtime/observatory/lib/src/elements/nav/menu_wrapper.dart b/runtime/observatory/lib/src/elements/nav/menu_wrapper.dart
index 04577c6..3b287fe 100644
--- a/runtime/observatory/lib/src/elements/nav/menu_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/menu_wrapper.dart
@@ -21,17 +21,22 @@
String _anchor = '---';
String _link;
bool _last = false;
+
String get anchor => _anchor;
String get link => _link;
bool get last => _last;
+
set anchor(String value) {
- _anchor = value; render();
+ _anchor = value;
+ render();
}
set link(String value) {
- _link = value; render();
+ _link = value;
+ render();
}
set last(bool value) {
- _last = value; render();
+ _last = value;
+ render();
}
NavMenuElementWrapper.created() : super.created() {
@@ -51,7 +56,9 @@
void render() {
shadowRoot.children = [];
- if (_anchor == null || _last == null) return;
+ if (_anchor == null || _last == null) {
+ return;
+ }
shadowRoot.children = [
new NavMenuElement(_anchor, link: '#$_link', last: last,
diff --git a/runtime/observatory/lib/src/elements/nav/notify.dart b/runtime/observatory/lib/src/elements/nav/notify.dart
index ba99f01..1566a04 100644
--- a/runtime/observatory/lib/src/elements/nav/notify.dart
+++ b/runtime/observatory/lib/src/elements/nav/notify.dart
@@ -23,7 +23,9 @@
StreamSubscription _subscription;
bool _notifyOnPause;
+
bool get notifyOnPause => _notifyOnPause;
+
set notifyOnPause(bool value) =>
_notifyOnPause = _r.checkAndReact(_notifyOnPause, value);
@@ -43,8 +45,8 @@
@override
void attached() {
super.attached();
- _r.enable();
_subscription = _repository.onChange.listen((_) => _r.dirty());
+ _r.enable();
}
@override
diff --git a/runtime/observatory/lib/src/elements/nav/notify_event.dart b/runtime/observatory/lib/src/elements/nav/notify_event.dart
index 0f75062..b46236e 100644
--- a/runtime/observatory/lib/src/elements/nav/notify_event.dart
+++ b/runtime/observatory/lib/src/elements/nav/notify_event.dart
@@ -26,6 +26,7 @@
Stream<EventDeleteEvent> get onDelete => _onDelete.stream;
M.Event _event;
+
M.Event get event => _event;
factory NavNotifyEventElement(M.Event event, {RenderingQueue queue}) {
diff --git a/runtime/observatory/lib/src/elements/nav/notify_exception.dart b/runtime/observatory/lib/src/elements/nav/notify_exception.dart
index cf0a463..0e92bda 100644
--- a/runtime/observatory/lib/src/elements/nav/notify_exception.dart
+++ b/runtime/observatory/lib/src/elements/nav/notify_exception.dart
@@ -31,6 +31,7 @@
Exception _exception;
StackTrace _stacktrace;
+
Exception get exception => _exception;
StackTrace get stacktrace => _stacktrace;
diff --git a/runtime/observatory/lib/src/elements/nav/notify_wrapper.dart b/runtime/observatory/lib/src/elements/nav/notify_wrapper.dart
index 7676727..58dbf39 100644
--- a/runtime/observatory/lib/src/elements/nav/notify_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/notify_wrapper.dart
@@ -20,13 +20,17 @@
NotificationRepository _notifications;
bool _notifyOnPause = true;
+
NotificationRepository get notifications => _notifications;
bool get notifyOnPause => _notifyOnPause;
+
set notifications(NotificationRepository value) {
- _notifications = value; render();
+ _notifications = value;
+ render();
}
set notifyOnPause(bool value) {
- _notifyOnPause = value; render();
+ _notifyOnPause = value;
+ render();
}
NavNotifyElementWrapper.created() : super.created() {
@@ -43,7 +47,9 @@
void render() {
shadowRoot.children = [];
- if (_notifications == null) return;
+ if (_notifications == null) {
+ return;
+ }
shadowRoot.children = [
new StyleElement()
diff --git a/runtime/observatory/lib/src/elements/nav/refresh.dart b/runtime/observatory/lib/src/elements/nav/refresh.dart
index 795c7bd..da40abd 100644
--- a/runtime/observatory/lib/src/elements/nav/refresh.dart
+++ b/runtime/observatory/lib/src/elements/nav/refresh.dart
@@ -25,8 +25,10 @@
bool _disabled;
String _label;
+
bool get disabled => _disabled;
String get label => _label;
+
set disabled(bool value) => _disabled = _r.checkAndReact(_disabled, value);
set label(String value) => _label = _r.checkAndReact(_label, value);
@@ -44,10 +46,17 @@
NavRefreshElement.created() : super.created();
@override
- void attached() { super.attached(); _r.enable(); }
+ void attached() {
+ super.attached();
+ _r.enable();
+ }
@override
- void detached() { super.detached(); children = []; _r.disable(notify: true); }
+ void detached() {
+ super.detached();
+ children = [];
+ _r.disable(notify: true);
+ }
void render() {
children = [
diff --git a/runtime/observatory/lib/src/elements/nav/refresh_wrapper.dart b/runtime/observatory/lib/src/elements/nav/refresh_wrapper.dart
index 19e7cce..1989a10 100644
--- a/runtime/observatory/lib/src/elements/nav/refresh_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/refresh_wrapper.dart
@@ -20,13 +20,17 @@
Function _callback;
String _label;
+
Function get callback => _callback;
String get label => _label;
+
set callback(Function value) {
- _callback = value; render();
+ _callback = value;
+ render();
}
set label(String value) {
- _label = value; render();
+ _label = value;
+ render();
}
NavRefreshElementWrapper.created() : super.created() {
@@ -44,7 +48,9 @@
void render() {
shadowRoot.children = [];
- if (_callback == null || _label == null) return;
+ if (_callback == null || _label == null) {
+ return;
+ }
shadowRoot.children = [
new StyleElement()
diff --git a/runtime/observatory/lib/src/elements/nav/top_menu.dart b/runtime/observatory/lib/src/elements/nav/top_menu.dart
index a289277..f4c6fa1 100644
--- a/runtime/observatory/lib/src/elements/nav/top_menu.dart
+++ b/runtime/observatory/lib/src/elements/nav/top_menu.dart
@@ -20,7 +20,9 @@
Stream<RenderedEvent<NavTopMenuElement>> get onRendered => _r.onRendered;
bool _last;
+
bool get last => _last;
+
set last(bool value) => _last = _r.checkAndReact(_last, value);
factory NavTopMenuElement({bool last: false, RenderingQueue queue}) {
diff --git a/runtime/observatory/lib/src/elements/nav/top_menu_wrapper.dart b/runtime/observatory/lib/src/elements/nav/top_menu_wrapper.dart
index edc5e27..db99fff 100644
--- a/runtime/observatory/lib/src/elements/nav/top_menu_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/top_menu_wrapper.dart
@@ -18,9 +18,12 @@
static const tag = const Tag<NavTopMenuElementWrapper>('top-nav-menu');
bool _last = false;
+
bool get last => _last;
+
set last(bool value) {
- _last = value; render();
+ _last = value;
+ render();
}
NavTopMenuElementWrapper.created() : super.created() {
@@ -38,7 +41,9 @@
void render() {
shadowRoot.children = [];
- if (_last == null) return;
+ if (_last == null) {
+ return;
+ }
shadowRoot.children = [
new NavTopMenuElement(last: last, queue: ObservatoryApplication.app.queue)
diff --git a/runtime/observatory/lib/src/elements/nav/vm_menu.dart b/runtime/observatory/lib/src/elements/nav/vm_menu.dart
index a46d4ca..e4351af 100644
--- a/runtime/observatory/lib/src/elements/nav/vm_menu.dart
+++ b/runtime/observatory/lib/src/elements/nav/vm_menu.dart
@@ -5,7 +5,7 @@
import 'dart:html';
import 'dart:async';
import 'package:observatory/models.dart' as M
- show VM, IsolateRef, Target, VMUpdateEvent;
+ show VM, EventRepository;
import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
import 'package:observatory/src/elements/helpers/uris.dart';
@@ -21,28 +21,27 @@
Stream<RenderedEvent<NavVMMenuElement>> get onRendered => _r.onRendered;
- Stream<M.VMUpdateEvent> _updates;
- StreamSubscription _updatesSubscription;
-
bool _last;
M.VM _vm;
- M.Target _target;
+ M.EventRepository _events;
+ StreamSubscription _updatesSubscription;
+
+
bool get last => _last;
M.VM get vm => _vm;
- M.Target get target => _target;
+
set last(bool value) => _last = _r.checkAndReact(_last, value);
- factory NavVMMenuElement(M.VM vm, Stream<M.VMUpdateEvent> updates,
- {bool last: false, M.Target target, RenderingQueue queue}) {
+ factory NavVMMenuElement(M.VM vm, M.EventRepository events, {bool last: false,
+ RenderingQueue queue}) {
assert(vm != null);
- assert(updates != null);
+ assert(events != null);
assert(last != null);
NavVMMenuElement e = document.createElement(tag.name);
e._r = new RenderingScheduler(e, queue: queue);
e._vm = vm;
- e._updates = updates;
+ e._events = events;
e._last = last;
- e._target = target;
return e;
}
@@ -51,29 +50,25 @@
@override
void attached() {
super.attached();
+ _updatesSubscription = _events.onVMUpdate
+ .listen((e) { _vm = e.vm; _r.dirty(); });
_r.enable();
- _updatesSubscription = _updates
- .listen((M.VMUpdateEvent e) { _vm = e.vm; _r.dirty(); });
}
@override
void detached() {
super.detached();
- _r.disable(notify: true);
shadowRoot.children = [];
- assert(_updatesSubscription != null);
+ _r.disable(notify: true);
_updatesSubscription.cancel();
- _updatesSubscription = null;
}
void render() {
- final String name = (target == null) ? vm.name
- : '${vm.name}@${target.name}';
- /// TODO(cbernaschina) use the isolate repository.
shadowRoot.children = [
- new NavMenuElement(name, link: Uris.vm(), last: last, queue: _r.queue)
+ new NavMenuElement(vm.displayName, link: Uris.vm(), last: last,
+ queue: _r.queue)
..children = (
- _vm.isolates.map((M.IsolateRef isolate) {
+ _vm.isolates.map((isolate) {
return new NavMenuItemElement(isolate.name, queue: _r.queue,
link: Uris.inspect(isolate));
}).toList()
diff --git a/runtime/observatory/lib/src/elements/nav/vm_menu_wrapper.dart b/runtime/observatory/lib/src/elements/nav/vm_menu_wrapper.dart
index 9327e19..ef8bf3d 100644
--- a/runtime/observatory/lib/src/elements/nav/vm_menu_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/nav/vm_menu_wrapper.dart
@@ -3,11 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:async';
import 'package:observatory/app.dart';
-import 'package:observatory/mocks.dart';
-import 'package:observatory/models.dart' as M;
import 'package:observatory/service.dart';
import 'package:observatory/service_common.dart';
import 'package:observatory/src/elements/helpers/tag.dart';
@@ -22,19 +19,18 @@
static const tag = const Tag<NavVMMenuElementWrapper>('vm-nav-menu');
- StreamSubscription _subscription;
- StreamController<M.VMUpdateEvent> _updatesController =
- new StreamController<M.VMUpdateEvent>.broadcast();
-
bool _last = false;
VM _vm;
+
bool get last => _last;
VM get vm => _vm;
+
set last(bool value) {
- _last = value; render();
- }
+ _last = value;
+ render(); }
set vm(VM value) {
- _vm = value; _detached(); _attached();
+ _vm = value;
+ render();
}
NavVMMenuElementWrapper.created() : super.created() {
@@ -47,43 +43,24 @@
@override
void attached() {
super.attached();
- _attached();
- }
-
- @override
- void detached() {
- super.detached();
- _detached();
- }
-
- void _attached() {
- if (_vm != null) {
- _subscription = _vm.changes.listen((_) {
- _updatesController.add(new VMUpdateEventMock(vm: _vm));
- });
- }
render();
}
- void _detached() {
- if (_subscription != null) {
- _subscription.cancel();
- _subscription = null;
- }
- }
-
void render() {
shadowRoot.children = [];
- if (_vm == null || _last == null) return;
+ if (_vm == null || _last == null) {
+ return;
+ }
shadowRoot.children = [
- new NavVMMenuElement(vm, _updatesController.stream, last: last,
- target: (vm as CommonWebSocketVM)?.target,
- queue: ObservatoryApplication.app.queue)
+ new NavVMMenuElement(vm, app.events, last: last,
+ queue: app.queue)
..children = [new ContentElement()]
];
}
+ ObservatoryApplication get app => ObservatoryApplication.app;
+
bool _getBoolAttribute(String name) {
final String value = getAttribute(name);
return !(value == null || value == 'false');
diff --git a/runtime/observatory/lib/src/elements/script_ref.dart b/runtime/observatory/lib/src/elements/script_ref.dart
index 8cc2f68..67ae388 100644
--- a/runtime/observatory/lib/src/elements/script_ref.dart
+++ b/runtime/observatory/lib/src/elements/script_ref.dart
@@ -41,7 +41,6 @@
@override
void attached() {
super.attached();
- assert(script != null);
_r.enable();
}
diff --git a/runtime/observatory/lib/src/elements/script_ref_wrapper.dart b/runtime/observatory/lib/src/elements/script_ref_wrapper.dart
index 01f6940..8f0e343 100644
--- a/runtime/observatory/lib/src/elements/script_ref_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/script_ref_wrapper.dart
@@ -20,8 +20,13 @@
static const tag = const Tag<ScriptRefElementWrapper>('script-ref');
Script _script;
+
Script get ref => _script;
- set ref(Script script) { _script = script; render(); }
+
+ set ref(Script value) {
+ _script = value;
+ render();
+ }
ScriptRefElementWrapper.created() : super.created() {
binder.registerCallback(this);
@@ -37,7 +42,9 @@
Future render() async {
shadowRoot.children = [];
- if (_script == null) return;
+ if (_script == null) {
+ return;
+ }
shadowRoot.children = [
new StyleElement()
diff --git a/runtime/observatory/lib/src/elements/source_link.dart b/runtime/observatory/lib/src/elements/source_link.dart
index 02eec26..110b8e1 100644
--- a/runtime/observatory/lib/src/elements/source_link.dart
+++ b/runtime/observatory/lib/src/elements/source_link.dart
@@ -44,16 +44,19 @@
@override
void attached() {
super.attached();
- assert(location != null);
- _r.enable();
_repository.get(_location.script.id).then((script) {
_script = script;
_r.dirty();
});
+ _r.enable();
}
@override
- void detached() { super.detached(); children = []; _r.disable(notify: true); }
+ void detached() {
+ super.detached();
+ children = [];
+ _r.disable(notify: true);
+ }
Future render() async {
if (_script == null) {
diff --git a/runtime/observatory/lib/src/elements/source_link_wrapper.dart b/runtime/observatory/lib/src/elements/source_link_wrapper.dart
index d38d70f..20221ea 100644
--- a/runtime/observatory/lib/src/elements/source_link_wrapper.dart
+++ b/runtime/observatory/lib/src/elements/source_link_wrapper.dart
@@ -22,7 +22,10 @@
SourceLocation _location;
SourceLocation get location => location;
- set location(SourceLocation location) { _location = location; render(); }
+ set location(SourceLocation value) {
+ _location = value;
+ render();
+ }
SourceLinkElementWrapper.created() : super.created() {
binder.registerCallback(this);
@@ -38,7 +41,9 @@
Future render() async {
shadowRoot.children = [];
- if (_location == null) return;
+ if (_location == null) {
+ return;
+ }
ScriptRepository repository = new ScriptRepository(_location.isolate);
diff --git a/runtime/observatory/lib/src/elements/view_footer.dart b/runtime/observatory/lib/src/elements/view_footer.dart
index 7493a7a..3e7dcd1 100644
--- a/runtime/observatory/lib/src/elements/view_footer.dart
+++ b/runtime/observatory/lib/src/elements/view_footer.dart
@@ -23,7 +23,7 @@
}
ViewFooterElement.created() : super.created() {
- // TODO(cbernaschina) remove this when no more needed.
+ // TODO(cbernaschina) remove this when polymer is removed.
_r = new RenderingScheduler(this);
}
@@ -36,8 +36,8 @@
@override
void detached() {
super.detached();
- _r.disable(notify: true);
children = [];
+ _r.disable(notify: true);
}
void render() {
diff --git a/runtime/observatory/lib/src/elements/vm_connect.dart b/runtime/observatory/lib/src/elements/vm_connect.dart
index 65487cf..a322e91 100644
--- a/runtime/observatory/lib/src/elements/vm_connect.dart
+++ b/runtime/observatory/lib/src/elements/vm_connect.dart
@@ -16,6 +16,8 @@
import 'package:observatory/src/elements/view_footer.dart';
import 'package:observatory/src/elements/vm_connect_target.dart';
+typedef void CrashDumpLoadCallback(Map dump);
+
class VMConnectElement extends HtmlElement implements Renderable {
static const tag = const Tag<VMConnectElement>('vm-connect',
dependencies: const [NavBarElement.tag,
@@ -28,7 +30,7 @@
Stream<RenderedEvent<VMConnectElement>> get onRendered => _r.onRendered;
- M.CrashDumpRepository _dump;
+ CrashDumpLoadCallback _loadDump;
M.NotificationRepository _notifications;
M.TargetRepository _targets;
StreamSubscription _targetsSubscription;
@@ -36,17 +38,17 @@
String _address;
factory VMConnectElement(M.TargetRepository targets,
- M.CrashDumpRepository dump,
+ CrashDumpLoadCallback loadDump,
M.NotificationRepository notifications,
{String address: '', RenderingQueue queue}) {
assert(address != null);
- assert(dump != null);
+ assert(loadDump != null);
assert(notifications != null);
assert(targets != null);
VMConnectElement e = document.createElement(tag.name);
e._r = new RenderingScheduler(e, queue: queue);
e._address = address;
- e._dump = dump;
+ e._loadDump = loadDump;
e._notifications = notifications;
e._targets = targets;
return e;
@@ -56,14 +58,17 @@
@override
void attached() {
- super.attached(); _r.enable();
+ super.attached();
_targetsSubscription = _targets.onChange.listen((_) => _r.dirty());
+ _r.enable();
}
@override
void detached() {
- super.detached(); children = []; _r.disable(notify: true);
- _targetsSubscription.cancel(); _targetsSubscription = null;
+ super.detached();
+ children = [];
+ _r.disable(notify: true);
+ _targetsSubscription.cancel();
}
void render() {
@@ -158,7 +163,7 @@
reader.readAsText(e.files[0]);
reader.onLoad.listen((_) {
var crashDump = JSON.decode(reader.result);
- _dump.load(crashDump);
+ _loadDump(crashDump);
});
});
return e;
diff --git a/runtime/observatory/lib/src/mocks/objects/class.dart b/runtime/observatory/lib/src/mocks/objects/class.dart
deleted file mode 100644
index 33eb764..0000000
--- a/runtime/observatory/lib/src/mocks/objects/class.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
-
-part of mocks;
-
-class ClassRefMock implements M.ClassRef {
- final String id;
- final String name;
- const ClassRefMock({this.id, this.name});
-}
-
-class ClassMock implements M.ClassRef {
- final String id;
- final String name;
- final bool isAbstract;
- final bool isConst;
- final M.ClassRef superclass;
- final Iterable<M.ClassRef> subclasses;
- const ClassMock({this.id, this.name, this.isAbstract, this.isConst,
- this.superclass, this.subclasses: const []});
-}
diff --git a/runtime/observatory/lib/src/mocks/objects/vm.dart b/runtime/observatory/lib/src/mocks/objects/vm.dart
deleted file mode 100644
index a58272e..0000000
--- a/runtime/observatory/lib/src/mocks/objects/vm.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
-
-part of mocks;
-
-class VMRefMock implements M.VMRef {
- final String name;
- const VMRefMock({this.name});
-}
-
-class VMMock implements M.VM {
- final String name;
- final int architectureBits;
- final String targetCPU;
- final String hostCPU;
- final String version;
- final int pid;
- final DateTime startTime;
- final Iterable<M.IsolateRef> isolates;
- const VMMock({this.name, this.architectureBits, this.targetCPU, this.hostCPU,
- this.version, this.pid, this.startTime, this.isolates : const []});
-}
diff --git a/runtime/observatory/lib/src/mocks/repositories/crash_dump.dart b/runtime/observatory/lib/src/mocks/repositories/crash_dump.dart
deleted file mode 100644
index 68488e9..0000000
--- a/runtime/observatory/lib/src/mocks/repositories/crash_dump.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
-
-part of mocks;
-
-typedef void CrashDumpRepositoryMockCallback(Map);
-
-class CrashDumpRepositoryMock implements M.CrashDumpRepository {
- final CrashDumpRepositoryMockCallback _load;
-
- bool loadInvoked = false;
-
- void load(Map dump) {
- loadInvoked = true;
- if (_load != null) {
- _load(dump);
- }
- }
-
- CrashDumpRepositoryMock({CrashDumpRepositoryMockCallback load})
- : _load = load;
-}
diff --git a/runtime/observatory/lib/src/mocks/repositories/flag.dart b/runtime/observatory/lib/src/mocks/repositories/flag.dart
deleted file mode 100644
index 1c9c11d..0000000
--- a/runtime/observatory/lib/src/mocks/repositories/flag.dart
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
-
-part of mocks;
-
-typedef Future<Iterable<M.Flag>> FlagsRepositoryMockCallback(M.VMRef vm);
-
-class FlagsRepositoryMock implements M.FlagsRepository {
- final FlagsRepositoryMockCallback _list;
-
- Future<Iterable<M.Flag>> list(M.VMRef vm) {
- if (_list != null) {
- return _list(vm);
- }
- return new Future.value(const []);
- }
-
- FlagsRepositoryMock({FlagsRepositoryMockCallback list})
- : _list = list;
-}
diff --git a/runtime/observatory/lib/src/mocks/repositories/script.dart b/runtime/observatory/lib/src/mocks/repositories/script.dart
deleted file mode 100644
index 7ab9114..0000000
--- a/runtime/observatory/lib/src/mocks/repositories/script.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of mocks;
-
-class ScriptRepositoryMock implements M.ScriptRepository {
- final Map<String, M.Script> scripts;
-
- bool _invoked = false;
- bool get invoked => _invoked;
-
- ScriptRepositoryMock(this.scripts);
-
- Future<M.Script> get(String id) async {
- _invoked = true;
- return scripts[id];
- }
-}
diff --git a/runtime/observatory/lib/src/models/exceptions.dart b/runtime/observatory/lib/src/models/exceptions.dart
index 871c095..81a7ba7 100644
--- a/runtime/observatory/lib/src/models/exceptions.dart
+++ b/runtime/observatory/lib/src/models/exceptions.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/breakpoint.dart b/runtime/observatory/lib/src/models/objects/breakpoint.dart
index e5e9324..daf1277 100644
--- a/runtime/observatory/lib/src/models/objects/breakpoint.dart
+++ b/runtime/observatory/lib/src/models/objects/breakpoint.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/class.dart b/runtime/observatory/lib/src/models/objects/class.dart
index b9e5f50..ae8e241 100644
--- a/runtime/observatory/lib/src/models/objects/class.dart
+++ b/runtime/observatory/lib/src/models/objects/class.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
@@ -20,6 +20,9 @@
/// Is this a const class?
bool get isConst;
+ /// [internal]
+ bool get isPatch;
+
/// The library which contains this class.
LibraryRef get library;
diff --git a/runtime/observatory/lib/src/models/objects/code.dart b/runtime/observatory/lib/src/models/objects/code.dart
index 1a8758e..ddc759d 100644
--- a/runtime/observatory/lib/src/models/objects/code.dart
+++ b/runtime/observatory/lib/src/models/objects/code.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/error.dart b/runtime/observatory/lib/src/models/objects/error.dart
index b5d1bbd..23de456 100644
--- a/runtime/observatory/lib/src/models/objects/error.dart
+++ b/runtime/observatory/lib/src/models/objects/error.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/event.dart b/runtime/observatory/lib/src/models/objects/event.dart
index aff1946..33dfc63 100644
--- a/runtime/observatory/lib/src/models/objects/event.dart
+++ b/runtime/observatory/lib/src/models/objects/event.dart
@@ -1,10 +1,14 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
abstract class Event {
+ /// The timestamp (in milliseconds since the epoch) associated with this
+ /// event. For some isolate pause events, the timestamp is from when the
+ /// isolate was paused. For other events, the timestamp is from when the
+ /// event was created.
DateTime get timestamp;
static bool isPauseEvent(Event event) {
return event is PauseStartEvent || event is PauseExitEvent ||
@@ -12,64 +16,130 @@
event is PauseExceptionEvent || event is NoneEvent;
}
}
+
abstract class VMEvent extends Event {
+ /// The vm with which this event is associated.
VMRef get vm;
}
+
abstract class VMUpdateEvent extends VMEvent {}
+
abstract class IsolateEvent extends Event {
+ /// The isolate with which this event is associated.
IsolateRef get isolate;
}
+
abstract class IsolateStartEvent extends IsolateEvent {}
+
abstract class IsolateRunnableEvent extends IsolateEvent {}
+
abstract class IsolateExitEvent extends IsolateEvent {}
+
abstract class IsolateUpdateEvent extends IsolateEvent {}
+
abstract class IsolateReloadEvent extends IsolateEvent {
ErrorRef get error;
}
+
abstract class ServiceExtensionAddedEvent extends IsolateEvent {
+ /// The RPC name of the extension that was added.
String get extensionRPC;
}
-abstract class DebugEvent extends IsolateEvent {}
+
+abstract class DebugEvent extends Event {
+ /// The isolate with which this event is associated.
+ IsolateRef get isolate;
+}
+
+abstract class DebuggerSettingsUpdateEvent extends DebugEvent {}
+
abstract class PauseStartEvent extends DebugEvent {}
+
abstract class PauseExitEvent extends DebugEvent {}
+
abstract class PauseBreakpointEvent extends DebugEvent {
- /// [optional]
+ /// [optional] The breakpoint at which we are currently paused.
Breakpoint get breakpoint;
+ /// The list of breakpoints at which we are currently paused
+ /// for a PauseBreakpoint event.
+ ///
+ /// This list may be empty. For example, while single-stepping, the
+ /// VM sends a PauseBreakpoint event with no breakpoints.
+ ///
+ /// If there is more than one breakpoint set at the program position,
+ /// then all of them will be provided.
Iterable<Breakpoint> get pauseBreakpoints;
+ /// The top stack frame associated with this event.
Frame get topFrame;
bool get atAsyncSuspension;
}
+
abstract class PauseInterruptedEvent extends DebugEvent {
+ /// [optional] The top stack frame associated with this event. There will be
+ /// no top frame if the isolate is idle (waiting in the message loop).
Frame get topFrame;
+ /// Is the isolate paused at an await, yield, or yield* statement?
bool get atAsyncSuspension;
}
+
abstract class PauseExceptionEvent extends DebugEvent {
+ /// The top stack frame associated with this event.
Frame get topFrame;
+ /// The exception associated with this event
InstanceRef get exception;
}
-abstract class ResumeEvent extends DebugEvent {}
+
+abstract class ResumeEvent extends DebugEvent {
+ /// [optional] The top stack frame associated with this event. It is provided
+ /// at all times except for the initial resume event that is delivered when an
+ /// isolate begins execution.
+ Frame get topFrame;
+}
+
abstract class BreakpointAddedEvent extends DebugEvent {
+ /// The breakpoint which was added.
Breakpoint get breakpoint;
}
+
abstract class BreakpointResolvedEvent extends DebugEvent {
+ /// The breakpoint which was resolved.
Breakpoint get breakpoint;
}
+
abstract class BreakpointRemovedEvent extends DebugEvent {
+ /// The breakpoint which was removed.
Breakpoint get breakpoint;
}
+
abstract class InspectEvent extends DebugEvent {
+ /// The argument passed to dart:developer.inspect.
InstanceRef get inspectee;
}
+
abstract class NoneEvent extends DebugEvent {}
-abstract class GCEvent extends IsolateEvent {}
-abstract class ExtensionEvent extends Event {
+
+abstract class GCEvent extends Event {
+ /// The isolate with which this event is associated.
IsolateRef get isolate;
+}
+
+abstract class ExtensionEvent extends Event {
+ /// The isolate with which this event is associated.
+ IsolateRef get isolate;
+ /// The extension event kind.
String get extensionKind;
+ /// The extension event data.
ExtensionData get extensionData;
}
-abstract class TimelineEventsEvent extends IsolateEvent {
+
+abstract class TimelineEventsEvent extends Event {
+ /// The isolate with which this event is associated.
+ IsolateRef get isolate;
+ /// An array of TimelineEvents
Iterable<TimelineEvent> get timelineEvents;
}
+
abstract class ConnectionClosedEvent extends Event {
+ /// The reason of the closed connection
String get reason;
}
diff --git a/runtime/observatory/lib/src/models/objects/extension_data.dart b/runtime/observatory/lib/src/models/objects/extension_data.dart
index 5000a9b..80a0012 100644
--- a/runtime/observatory/lib/src/models/objects/extension_data.dart
+++ b/runtime/observatory/lib/src/models/objects/extension_data.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/frame.dart b/runtime/observatory/lib/src/models/objects/frame.dart
index d8e87cd..c0e40c3 100644
--- a/runtime/observatory/lib/src/models/objects/frame.dart
+++ b/runtime/observatory/lib/src/models/objects/frame.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/function.dart b/runtime/observatory/lib/src/models/objects/function.dart
index bb763af..e52c564 100644
--- a/runtime/observatory/lib/src/models/objects/function.dart
+++ b/runtime/observatory/lib/src/models/objects/function.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/instance.dart b/runtime/observatory/lib/src/models/objects/instance.dart
index b337f79..eb65ea5 100644
--- a/runtime/observatory/lib/src/models/objects/instance.dart
+++ b/runtime/observatory/lib/src/models/objects/instance.dart
@@ -1,7 +1,81 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
-abstract class InstanceRef extends ObjectRef {}
+abstract class InstanceRef extends ObjectRef {
+ /// Instance references always include their class.
+ ClassRef get clazz;
+
+ /// [optional] The value of this instance as a string.
+ ///
+ /// Provided for the instance kinds:
+ /// Null (null)
+ /// Bool (true or false)
+ /// Double (suitable for passing to Double.parse())
+ /// Int (suitable for passing to int.parse())
+ /// String (value may be truncated)
+ /// Float32x4
+ /// Float64x2
+ /// Int32x4
+ /// StackTrace
+ String get valueAsString;
+
+ /// [optional] The valueAsString for String references may be truncated. If so,
+ /// this property is added with the value 'true'.
+ ///
+ /// New code should use 'length' and 'count' instead.
+ bool get valueAsStringIsTruncated;
+
+ /// [optional] The length of a List or the number of associations in a Map or
+ /// the number of codeunits in a String.
+ ///
+ /// Provided for instance kinds:
+ /// String
+ /// List
+ /// Map
+ /// Uint8ClampedList
+ /// Uint8List
+ /// Uint16List
+ /// Uint32List
+ /// Uint64List
+ /// Int8List
+ /// Int16List
+ /// Int32List
+ /// Int64List
+ /// Float32List
+ /// Float64List
+ /// Int32x4List
+ /// Float32x4List
+ /// Float64x2List
+ int get length;
+
+ /// [optional] The name of a Type instance.
+ ///
+ /// Provided for instance kinds:
+ /// Type
+ String get name;
+
+ /// [optional] The corresponding Class if this Type is canonical.
+ ///
+ /// Provided for instance kinds:
+ /// Type
+ ClassRef get typeClass;
+
+ /// [optional] The parameterized class of a type parameter:
+ ///
+ /// Provided for instance kinds:
+ /// TypeParameter
+ ClassRef get parameterizedClass;
+
+ /// [optional] The pattern of a RegExp instance.
+ ///
+ /// The pattern is always an instance of kind String.
+ ///
+ /// Provided for instance kinds:
+ /// RegExp
+ InstanceRef get pattern;
+}
+
+abstract class Instance extends Object implements InstanceRef {}
diff --git a/runtime/observatory/lib/src/models/objects/isolate.dart b/runtime/observatory/lib/src/models/objects/isolate.dart
index 007a6f4..81d54c5 100644
--- a/runtime/observatory/lib/src/models/objects/isolate.dart
+++ b/runtime/observatory/lib/src/models/objects/isolate.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/library.dart b/runtime/observatory/lib/src/models/objects/library.dart
index 6543ef9..281242a 100644
--- a/runtime/observatory/lib/src/models/objects/library.dart
+++ b/runtime/observatory/lib/src/models/objects/library.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/notification.dart b/runtime/observatory/lib/src/models/objects/notification.dart
index 9a9f8af..3a2ae9a 100644
--- a/runtime/observatory/lib/src/models/objects/notification.dart
+++ b/runtime/observatory/lib/src/models/objects/notification.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/object.dart b/runtime/observatory/lib/src/models/objects/object.dart
index 76b2393..829a60d2 100644
--- a/runtime/observatory/lib/src/models/objects/object.dart
+++ b/runtime/observatory/lib/src/models/objects/object.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/script.dart b/runtime/observatory/lib/src/models/objects/script.dart
index 274fb08..3736651 100644
--- a/runtime/observatory/lib/src/models/objects/script.dart
+++ b/runtime/observatory/lib/src/models/objects/script.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/source_location.dart b/runtime/observatory/lib/src/models/objects/source_location.dart
index 5d35d57..dd9f663 100644
--- a/runtime/observatory/lib/src/models/objects/source_location.dart
+++ b/runtime/observatory/lib/src/models/objects/source_location.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/target.dart b/runtime/observatory/lib/src/models/objects/target.dart
index f2a1658..a58673f 100644
--- a/runtime/observatory/lib/src/models/objects/target.dart
+++ b/runtime/observatory/lib/src/models/objects/target.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/timeline_event.dart b/runtime/observatory/lib/src/models/objects/timeline_event.dart
index 6cac6d1..61bf444 100644
--- a/runtime/observatory/lib/src/models/objects/timeline_event.dart
+++ b/runtime/observatory/lib/src/models/objects/timeline_event.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/objects/vm.dart b/runtime/observatory/lib/src/models/objects/vm.dart
index 051a9fa..11e3af5 100644
--- a/runtime/observatory/lib/src/models/objects/vm.dart
+++ b/runtime/observatory/lib/src/models/objects/vm.dart
@@ -1,11 +1,16 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
abstract class VMRef {
+ /// A name identifying this vm. Not guaranteed to be unique.
String get name;
+
+ /// [Not actually from the apis]
+ /// A name used to identify the VM in the UI.
+ String get displayName;
}
abstract class VM implements VMRef {
diff --git a/runtime/observatory/lib/src/models/repositories/crash_dump.dart b/runtime/observatory/lib/src/models/repositories/class.dart
similarity index 71%
copy from runtime/observatory/lib/src/models/repositories/crash_dump.dart
copy to runtime/observatory/lib/src/models/repositories/class.dart
index 8eb64c1..388256e 100644
--- a/runtime/observatory/lib/src/models/repositories/crash_dump.dart
+++ b/runtime/observatory/lib/src/models/repositories/class.dart
@@ -4,6 +4,7 @@
part of models;
-abstract class CrashDumpRepository {
- void load(Map);
+abstract class ClassRepository{
+ Future<Class> getObject();
+ Future<Class> get(String id);
}
diff --git a/runtime/observatory/lib/src/models/repositories/event.dart b/runtime/observatory/lib/src/models/repositories/event.dart
new file mode 100644
index 0000000..3e00359
--- /dev/null
+++ b/runtime/observatory/lib/src/models/repositories/event.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of models;
+
+abstract class EventRepository {
+ Stream<Event> get onEvent;
+ Stream<VMEvent> get onVMEvent;
+ Stream<VMUpdateEvent> get onVMUpdate;
+ Stream<IsolateEvent> get onIsolateEvent;
+ Stream<IsolateStartEvent> get onIsolateStart;
+ Stream<IsolateRunnableEvent> get onIsolateRunnable;
+ Stream<IsolateExitEvent> get onIsolateExit;
+ Stream<IsolateUpdateEvent> get onIsolateUpdate;
+ Stream<IsolateReloadEvent> get onIsolateReload;
+ Stream<ServiceExtensionAddedEvent> get onServiceExtensionAdded;
+ Stream<DebugEvent> get onDebugEvent;
+ Stream<PauseStartEvent> get onPauseStart;
+ Stream<PauseExitEvent> get onPauseExit;
+ Stream<PauseBreakpointEvent> get onPauseBreakpoint;
+ Stream<PauseInterruptedEvent> get onPauseInterrupted;
+ Stream<PauseExceptionEvent> get onPauseException;
+ Stream<ResumeEvent> get onResume;
+ Stream<BreakpointAddedEvent> get onBreakpointAdded;
+ Stream<BreakpointResolvedEvent> get onBreakpointResolved;
+ Stream<BreakpointRemovedEvent> get onBreakpointRemoved;
+ Stream<InspectEvent> get onInspect;
+ Stream<GCEvent> get onGCEvent;
+ Stream<ExtensionEvent> get onExtensionEvent;
+ Stream<TimelineEventsEvent> get onTimelineEvents;
+ Stream<ConnectionClosedEvent> get onConnectionClosed;
+}
diff --git a/runtime/observatory/lib/src/models/repositories/flag.dart b/runtime/observatory/lib/src/models/repositories/flag.dart
index 2bdc018..358b933 100644
--- a/runtime/observatory/lib/src/models/repositories/flag.dart
+++ b/runtime/observatory/lib/src/models/repositories/flag.dart
@@ -5,5 +5,5 @@
part of models;
abstract class FlagsRepository {
- Future<Iterable<Flag>> list(VMRef vm);
+ Future<Iterable<Flag>> list();
}
diff --git a/runtime/observatory/lib/src/models/repositories/crash_dump.dart b/runtime/observatory/lib/src/models/repositories/instance.dart
similarity index 76%
rename from runtime/observatory/lib/src/models/repositories/crash_dump.dart
rename to runtime/observatory/lib/src/models/repositories/instance.dart
index 8eb64c1..3f98018 100644
--- a/runtime/observatory/lib/src/models/repositories/crash_dump.dart
+++ b/runtime/observatory/lib/src/models/repositories/instance.dart
@@ -4,6 +4,6 @@
part of models;
-abstract class CrashDumpRepository {
- void load(Map);
+abstract class InstanceRepository{
+ Future<Instance> get(String id);
}
diff --git a/runtime/observatory/lib/src/models/repositories/notification.dart b/runtime/observatory/lib/src/models/repositories/notification.dart
index 9ab3543..816bf04 100644
--- a/runtime/observatory/lib/src/models/repositories/notification.dart
+++ b/runtime/observatory/lib/src/models/repositories/notification.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/repositories/script.dart b/runtime/observatory/lib/src/models/repositories/script.dart
index e3b54ad..3073c2e 100644
--- a/runtime/observatory/lib/src/models/repositories/script.dart
+++ b/runtime/observatory/lib/src/models/repositories/script.dart
@@ -4,4 +4,6 @@
part of models;
-abstract class ScriptRepository extends Repository<Script, String> {}
+abstract class ScriptRepository {
+ Future<Script> get(String id);
+}
diff --git a/runtime/observatory/lib/src/models/repositories/target.dart b/runtime/observatory/lib/src/models/repositories/target.dart
index 8df29ca..4d276f6 100644
--- a/runtime/observatory/lib/src/models/repositories/target.dart
+++ b/runtime/observatory/lib/src/models/repositories/target.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of models;
diff --git a/runtime/observatory/lib/src/models/repository.dart b/runtime/observatory/lib/src/models/repository.dart
deleted file mode 100644
index 9aec1fd..0000000
--- a/runtime/observatory/lib/src/models/repository.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of models;
-
-abstract class Repository<ObjectT, DescriptorT> {
- Future<ObjectT> get(DescriptorT id);
-}
diff --git a/runtime/observatory/lib/src/repositories/class.dart b/runtime/observatory/lib/src/repositories/class.dart
new file mode 100644
index 0000000..911c363
--- /dev/null
+++ b/runtime/observatory/lib/src/repositories/class.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file
+
+part of repositories;
+
+class ClassRepository extends M.ClassRepository {
+ final S.Isolate isolate;
+
+ ClassRepository(this.isolate);
+
+ Future<M.Class> getObject() {
+ return isolate.getClassHierarchy();
+ }
+ Future<M.Class> get(String id) async {
+ return (await isolate.getObject(id)) as S.Class;
+ }
+}
diff --git a/runtime/observatory/lib/src/repositories/event.dart b/runtime/observatory/lib/src/repositories/event.dart
new file mode 100644
index 0000000..d6300e9
--- /dev/null
+++ b/runtime/observatory/lib/src/repositories/event.dart
@@ -0,0 +1,89 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of repositories;
+
+class EventRepository implements M.EventRepository {
+ final StreamController<M.Event> _onEvent;
+ Stream<M.Event> get onEvent => _onEvent.stream;
+
+ final Stream<M.VMEvent> onVMEvent;
+ final Stream<M.VMUpdateEvent> onVMUpdate;
+ final Stream<M.IsolateEvent> onIsolateEvent;
+ final Stream<M.IsolateStartEvent> onIsolateStart;
+ final Stream<M.IsolateRunnableEvent> onIsolateRunnable;
+ final Stream<M.IsolateExitEvent> onIsolateExit;
+ final Stream<M.IsolateUpdateEvent> onIsolateUpdate;
+ final Stream<M.IsolateReloadEvent> onIsolateReload;
+ final Stream<M.ServiceExtensionAddedEvent> onServiceExtensionAdded;
+ final Stream<M.DebugEvent> onDebugEvent;
+ final Stream<M.PauseStartEvent> onPauseStart;
+ final Stream<M.PauseExitEvent> onPauseExit;
+ final Stream<M.PauseBreakpointEvent> onPauseBreakpoint;
+ final Stream<M.PauseInterruptedEvent> onPauseInterrupted;
+ final Stream<M.PauseExceptionEvent> onPauseException;
+ final Stream<M.ResumeEvent> onResume;
+ final Stream<M.BreakpointAddedEvent> onBreakpointAdded;
+ final Stream<M.BreakpointResolvedEvent> onBreakpointResolved;
+ final Stream<M.BreakpointRemovedEvent> onBreakpointRemoved;
+ final Stream<M.InspectEvent> onInspect;
+ final Stream<M.GCEvent> onGCEvent;
+ final Stream<M.ExtensionEvent> onExtensionEvent;
+ final Stream<M.TimelineEventsEvent> onTimelineEvents;
+ final Stream<M.ConnectionClosedEvent> onConnectionClosed;
+
+ EventRepository() : this._(new StreamController.broadcast());
+
+ EventRepository._(StreamController controller) : this.__(controller,
+ controller.stream.where((e) => e is M.VMEvent),
+ controller.stream.where((e) => e is M.IsolateEvent),
+ controller.stream.where((e) => e is M.DebugEvent),
+ controller.stream.where((e) => e is M.GCEvent),
+ controller.stream.where((e) => e is M.ExtensionEvent),
+ controller.stream.where((e) => e is M.TimelineEventsEvent),
+ controller.stream.where((e) => e is M.ConnectionClosedEvent));
+
+ EventRepository.__(StreamController controller,
+ Stream<M.VMEvent> onVMEvent, Stream<M.IsolateEvent> onIsolateEvent,
+ Stream<M.DebugEvent> onDebugEvent, Stream<M.GCEvent> onGCEvent,
+ Stream<M.ExtensionEvent> onExtensionEvent,
+ Stream<M.TimelineEventsEvent> onTimelineEvents,
+ Stream<M.ConnectionClosedEvent> onConnectionClosed)
+ : _onEvent = controller,
+ onVMEvent = onVMEvent,
+ onVMUpdate = onVMEvent.where((e) => e is M.VMUpdateEvent),
+ onIsolateEvent = onIsolateEvent,
+ onIsolateStart = onIsolateEvent.where((e) => e is M.IsolateStartEvent),
+ onIsolateRunnable =
+ onIsolateEvent.where((e) => e is M.IsolateRunnableEvent),
+ onIsolateExit = onIsolateEvent.where((e) => e is M.IsolateExitEvent),
+ onIsolateUpdate = onIsolateEvent.where((e) => e is M.IsolateUpdateEvent),
+ onIsolateReload = onIsolateEvent.where((e) => e is M.IsolateReloadEvent),
+ onServiceExtensionAdded =
+ onIsolateEvent.where((e) => e is M.IsolateReloadEvent),
+ onDebugEvent = onDebugEvent,
+ onPauseStart = onDebugEvent.where((e) => e is M.PauseStartEvent),
+ onPauseExit = onDebugEvent.where((e) => e is M.PauseExitEvent),
+ onPauseBreakpoint =
+ onDebugEvent.where((e) => e is M.PauseBreakpointEvent),
+ onPauseInterrupted =
+ onDebugEvent.where((e) => e is M.PauseInterruptedEvent),
+ onPauseException = onDebugEvent.where((e) => e is M.PauseExceptionEvent),
+ onResume = onDebugEvent.where((e) => e is M.ResumeEvent),
+ onBreakpointAdded =
+ onDebugEvent.where((e) => e is M.BreakpointAddedEvent),
+ onBreakpointResolved =
+ onDebugEvent.where((e) => e is M.BreakpointResolvedEvent),
+ onBreakpointRemoved =
+ onDebugEvent.where((e) => e is M.BreakpointRemovedEvent),
+ onInspect = onDebugEvent.where((e) => e is M.InspectEvent),
+ onGCEvent = onGCEvent,
+ onExtensionEvent = onExtensionEvent,
+ onTimelineEvents = onTimelineEvents,
+ onConnectionClosed = onConnectionClosed;
+
+ void add(M.Event e) {
+ _onEvent.add(e);
+ }
+}
diff --git a/runtime/observatory/lib/src/repositories/flag.dart b/runtime/observatory/lib/src/repositories/flag.dart
index 9a644e6..0072c0e 100644
--- a/runtime/observatory/lib/src/repositories/flag.dart
+++ b/runtime/observatory/lib/src/repositories/flag.dart
@@ -17,12 +17,13 @@
}
class FlagsRepository implements M.FlagsRepository {
- Future<Iterable<Flag>> list(M.VM vm) async{
- if (vm is S.VM) {
- List<Map> flags = ((await vm.getFlagList()) as S.ServiceMap)['flags'];
- return flags.map(_toFlag);
- }
- return const [];
+ final S.VM vm;
+
+ FlagsRepository(this.vm);
+
+ Future<Iterable<Flag>> list() async{
+ List<Map> flags = ((await vm.getFlagList()) as S.ServiceMap)['flags'];
+ return flags.map(_toFlag);
}
static _toFlag(Map map){
diff --git a/runtime/observatory/lib/src/repositories/instance.dart b/runtime/observatory/lib/src/repositories/instance.dart
new file mode 100644
index 0000000..6a3fe2b
--- /dev/null
+++ b/runtime/observatory/lib/src/repositories/instance.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file
+
+part of repositories;
+
+class InstanceRepository extends M.InstanceRepository {
+ final S.Isolate isolate;
+
+ InstanceRepository(this.isolate);
+
+ Future<M.Instance> get(String id) async{
+ return (await isolate.getObject(id)) as S.Instance;
+ }
+}
diff --git a/runtime/observatory/lib/src/repositories/notification.dart b/runtime/observatory/lib/src/repositories/notification.dart
index 348dbca..80c25f2 100644
--- a/runtime/observatory/lib/src/repositories/notification.dart
+++ b/runtime/observatory/lib/src/repositories/notification.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of repositories;
diff --git a/runtime/observatory/lib/src/repositories/settings.dart b/runtime/observatory/lib/src/repositories/settings.dart
index 771c48e..4121d93 100644
--- a/runtime/observatory/lib/src/repositories/settings.dart
+++ b/runtime/observatory/lib/src/repositories/settings.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of repositories;
diff --git a/runtime/observatory/lib/src/repositories/target.dart b/runtime/observatory/lib/src/repositories/target.dart
index 69ba8c8..b9b2e69 100644
--- a/runtime/observatory/lib/src/repositories/target.dart
+++ b/runtime/observatory/lib/src/repositories/target.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of repositories;
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index d2f44d9..afd9240 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -927,6 +927,8 @@
}
class FakeVM extends VM {
+ String get displayName => name;
+
final Map _responses = {};
FakeVM(Map responses) {
if (responses == null) {
@@ -1851,16 +1853,29 @@
String toString() => "ServiceMap($_map)";
}
+M.ErrorKind stringToErrorKind(String value) {
+ switch(value) {
+ case 'UnhandledException': return M.ErrorKind.UnhandledException;
+ case 'LanguageError': return M.ErrorKind.UnhandledException;
+ case 'InternalError': return M.ErrorKind.InternalError;
+ case 'TerminationError': return M.ErrorKind.TerminationError;
+ }
+ Logger.root.severe('Unrecognized error kind: $value');
+ throw new FallThroughError();
+}
+
/// A [DartError] is peered to a Dart Error object.
-class DartError extends ServiceObject {
+class DartError extends ServiceObject implements M.Error {
DartError._empty(ServiceObject owner) : super._empty(owner);
+ M.ErrorKind kind;
@observable String message;
@observable Instance exception;
@observable Instance stacktrace;
void _update(ObservableMap map, bool mapIsRef) {
message = map['message'];
+ kind = stringToErrorKind(map['kind']);
exception = new ServiceObject._fromMap(owner, map['exception']);
stacktrace = new ServiceObject._fromMap(owner, map['stacktrace']);
name = 'DartError($message)';
@@ -1916,13 +1931,15 @@
@observable String kind;
@observable DateTime timestamp;
+ List<M.Breakpoint> pauseBreakpoints;
@observable Breakpoint breakpoint;
@observable Frame topFrame;
+ @observable DartError error;
@observable String extensionRPC;
@observable Instance exception;
@observable Instance reloadError;
@observable bool atAsyncSuspension;
- @observable ServiceObject inspectee;
+ @observable Instance inspectee;
@observable ByteData data;
@observable int count;
@observable String reason;
@@ -1960,13 +1977,16 @@
if (map['breakpoint'] != null) {
breakpoint = map['breakpoint'];
}
- // TODO(turnidge): Expose the full list of breakpoints. For now
- // we just pretend like there is only one active breakpoint.
if (map['pauseBreakpoints'] != null) {
- var pauseBpts = map['pauseBreakpoints'];
- if (pauseBpts.length > 0) {
- breakpoint = pauseBpts[0];
+ pauseBreakpoints = map['pauseBreakpoints'];
+ if (pauseBreakpoints.length > 0) {
+ breakpoint = pauseBreakpoints[0];
}
+ } else {
+ pauseBreakpoints = const [];
+ }
+ if (map['error'] != null) {
+ error = map['error'];
}
if (map['extensionRPC'] != null) {
extensionRPC = map['extensionRPC'];
@@ -2232,7 +2252,7 @@
bool get empty => accumulated.empty && current.empty;
}
-class Class extends HeapObject implements M.ClassRef {
+class Class extends HeapObject implements M.Class {
@observable Library library;
@observable bool isAbstract;
@@ -2243,7 +2263,7 @@
@observable SourceLocation location;
- @observable ServiceMap error;
+ @observable DartError error;
@observable int vmCid;
final Allocations newSpace = new Allocations();
@@ -2370,7 +2390,7 @@
String toString() => 'Class($vmName)';
}
-class Instance extends HeapObject {
+class Instance extends HeapObject implements M.Instance {
@observable String kind;
@observable String valueAsString; // If primitive.
@observable bool valueAsStringIsTruncated;
@@ -2469,7 +2489,7 @@
Instance._empty(ServiceObjectOwner owner) : super._empty(owner);
void _update(ObservableMap map, bool mapIsRef) {
- // Extract full properties.
+ // Extract full properties.1
_upgradeCollection(map, isolate);
super._update(map, mapIsRef);
@@ -2482,6 +2502,7 @@
name = map['name'];
length = map['length'];
pattern = map['pattern'];
+ typeClass = map['typeClass'];
if (mapIsRef) {
return;
@@ -2534,7 +2555,6 @@
typedElements = bytes.buffer.asFloat64x2List(); break;
}
}
- typeClass = map['typeClass'];
parameterizedClass = map['parameterizedClass'];
typeArguments = map['typeArguments'];
parameterIndex = map['parameterIndex'];
diff --git a/runtime/observatory/observatory_sources.gypi b/runtime/observatory/observatory_sources.gypi
index adf1c26..fe89855 100644
--- a/runtime/observatory/observatory_sources.gypi
+++ b/runtime/observatory/observatory_sources.gypi
@@ -11,7 +11,6 @@
'lib/debugger.dart',
'lib/elements.dart',
'lib/elements.html',
- 'lib/mocks.dart',
'lib/models.dart',
'lib/object_graph.dart',
'lib/repositories.dart',
@@ -21,6 +20,7 @@
'lib/service_io.dart',
'lib/src/app/analytics.dart',
'lib/src/app/application.dart',
+ 'lib/src/app/event.dart',
'lib/src/app/location_manager.dart',
'lib/src/app/notification.dart',
'lib/src/app/page.dart',
@@ -37,7 +37,6 @@
'lib/src/elements/class_ref_as_value.dart',
'lib/src/elements/class_ref_as_value.html',
'lib/src/elements/class_tree.dart',
- 'lib/src/elements/class_tree.html',
'lib/src/elements/class_view.dart',
'lib/src/elements/class_view.html',
'lib/src/elements/code_ref.dart',
@@ -178,25 +177,6 @@
'lib/src/elements/vm_connect.dart',
'lib/src/elements/vm_view.dart',
'lib/src/elements/vm_view.html',
- 'lib/src/mocks/exceptions/connection_exception.dart',
- 'lib/src/mocks/objects/class.dart',
- 'lib/src/mocks/objects/code.dart',
- 'lib/src/mocks/objects/error.dart',
- 'lib/src/mocks/objects/event.dart',
- 'lib/src/mocks/objects/flag.dart',
- 'lib/src/mocks/objects/function.dart',
- 'lib/src/mocks/objects/isolate.dart',
- 'lib/src/mocks/objects/library.dart',
- 'lib/src/mocks/objects/notification.dart',
- 'lib/src/mocks/objects/script.dart',
- 'lib/src/mocks/objects/source_location.dart',
- 'lib/src/mocks/objects/target.dart',
- 'lib/src/mocks/objects/vm.dart',
- 'lib/src/mocks/repositories/crash_dump.dart',
- 'lib/src/mocks/repositories/flag.dart',
- 'lib/src/mocks/repositories/script.dart',
- 'lib/src/mocks/repositories/notification.dart',
- 'lib/src/mocks/repositories/target.dart',
'lib/src/models/exceptions.dart',
'lib/src/models/objects/breakpoint.dart',
'lib/src/models/objects/class.dart',
@@ -217,13 +197,17 @@
'lib/src/models/objects/target.dart',
'lib/src/models/objects/timeline_event.dart',
'lib/src/models/objects/vm.dart',
- 'lib/src/models/repositories/crash_dump.dart',
+ 'lib/src/models/repositories/class.dart',
+ 'lib/src/models/repositories/event.dart',
'lib/src/models/repositories/flag.dart',
+ 'lib/src/models/repositories/instance.dart',
'lib/src/models/repositories/notification.dart',
'lib/src/models/repositories/script.dart',
'lib/src/models/repositories/target.dart',
- 'lib/src/models/repository.dart',
+ 'lib/src/repositories/class.dart',
+ 'lib/src/repositories/event.dart',
'lib/src/repositories/flag.dart',
+ 'lib/src/repositories/instance.dart',
'lib/src/repositories/notification.dart',
'lib/src/repositories/script.dart',
'lib/src/repositories/settings.dart',
diff --git a/runtime/observatory/tests/observatory_ui/class_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/class_ref/element_test.dart
index ef812fd..0f0eed2 100644
--- a/runtime/observatory/tests/observatory_ui/class_ref/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/class_ref/element_test.dart
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/class_ref.dart';
+import '../mocks.dart';
main(){
ClassRefElement.tag.ensureRegistration();
diff --git a/runtime/observatory/tests/observatory_ui/class_tree/element_test.dart b/runtime/observatory/tests/observatory_ui/class_tree/element_test.dart
new file mode 100644
index 0000000..518613f
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/class_tree/element_test.dart
@@ -0,0 +1,64 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+import 'dart:html';
+import 'package:unittest/unittest.dart';
+import 'package:observatory/src/elements/class_tree.dart';
+import 'package:observatory/src/elements/nav/notify.dart';
+import '../mocks.dart';
+
+main() {
+ ClassTreeElement.tag.ensureRegistration();
+
+ final nTag = NavNotifyElement.tag.name;
+ const vm = const VMMock();
+ const isolate = const IsolateRefMock();
+ final events = new EventRepositoryMock();
+ final notifications = new NotificationRepositoryMock();
+
+ group('instantiation', () {
+ test('default', () {
+ final e = new ClassTreeElement(vm, isolate, events, notifications,
+ new ClassRepositoryMock());
+ expect(e, isNotNull, reason: 'element correctly created');
+ });
+ });
+ group('elements', () {
+ test('created after attachment', () async {
+ const child2_id = 'c2-id';
+ const child1_1_id = 'c1_1-id';
+ const child1_id = 'c1-id';
+ const child2 = const ClassMock(id: child2_id);
+ const child1_1 = const ClassMock(id: child1_1_id);
+ const child1 = const ClassMock(id: child1_id,
+ subclasses: const [child1_1]);
+ const object = const ClassMock(id: 'o-id',
+ subclasses: const [child1, child2]);
+ const ids = const [child1_id, child1_1_id, child2_id];
+ bool rendered = false;
+ final e = new ClassTreeElement(vm, isolate, events, notifications,
+ new ClassRepositoryMock(
+ object: expectAsync(() async {
+ expect(rendered, isFalse);
+ return object;
+ }, count: 1),
+ getter: expectAsync((id) async {
+ expect(ids.contains(id), isTrue);
+ switch (id) {
+ case child1_id: return child1;
+ case child1_1_id: return child1_1;
+ case child2_id: return child2;
+ default: return null;
+ }
+ }, count: 3)));
+ document.body.append(e);
+ await e.onRendered.first;
+ rendered = true;
+ expect(e.children.length, isNonZero, reason: 'has elements');
+ expect(e.querySelectorAll(nTag).length, equals(1));
+ e.remove();
+ await e.onRendered.first;
+ expect(e.children.length, isZero, reason: 'is empty');
+ });
+ });
+}
diff --git a/runtime/observatory/tests/observatory_ui/class_tree/element_test.html b/runtime/observatory/tests/observatory_ui/class_tree/element_test.html
new file mode 100644
index 0000000..00d59bc
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/class_tree/element_test.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="dart.unittest" content="full-stack-traces">
+ <style>
+ .unittest-table { font-family:monospace; border:1px; }
+ .unittest-pass { background: #6b3;}
+ .unittest-fail { background: #d55;}
+ .unittest-error { background: #a11;}
+ class-tree virtual-tree .class-tree-item {
+ line-height: 25px;
+ height: 25px;
+ padding-left: 10%;
+ padding-right: 10%;
+ }
+ </style>
+ <script src="/packages/web_components/webcomponents.js"></script>
+ <script src="/packages/web_components/dart_support.js"></script>
+</head>
+<body>
+ <script type="text/javascript"
+ src="/root_dart/tools/testing/dart/test_controller.js"></script>
+ %TEST_SCRIPTS%
+</body>
+</html>
diff --git a/runtime/observatory/tests/observatory_ui/code_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/code_ref/element_test.dart
index 0e2c9ee..694d81b 100644
--- a/runtime/observatory/tests/observatory_ui/code_ref/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/code_ref/element_test.dart
@@ -3,22 +3,22 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/code_ref.dart';
+import '../mocks.dart';
main(){
CodeRefElement.tag.ensureRegistration();
- final IsolateRefMock isolate = new IsolateRefMock(id: 'i-id', name: 'i-name');
- final CodeRefMock code = new CodeRefMock(id: 'c-id', name: 'c-name');
+ final isolate = new IsolateRefMock(id: 'i-id', name: 'i-name');
+ final code = new CodeRefMock(id: 'c-id', name: 'c-name');
test('instantiation', () {
- final CodeRefElement e = new CodeRefElement(isolate, code);
+ final e = new CodeRefElement(isolate, code);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(isolate));
expect(e.code, equals(code));
});
test('elements created after attachment', () async {
- final CodeRefElement e = new CodeRefElement(isolate, code);
+ final e = new CodeRefElement(isolate, code);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/curly_block/element_test.dart b/runtime/observatory/tests/observatory_ui/curly_block/element_test.dart
index fe1ca8f..6010bc6 100644
--- a/runtime/observatory/tests/observatory_ui/curly_block/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/curly_block/element_test.dart
@@ -10,66 +10,64 @@
group('instantiation', () {
test('default', () {
- final CurlyBlockElement e = new CurlyBlockElement();
+ final e = new CurlyBlockElement();
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isFalse);
expect(e.disabled, isFalse);
});
test('not expanded', () {
- final CurlyBlockElement e = new CurlyBlockElement(expanded: false);
+ final e = new CurlyBlockElement(expanded: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isFalse);
expect(e.disabled, isFalse);
});
test('not expanded / not disabled', () {
- final CurlyBlockElement e = new CurlyBlockElement(expanded: false,
+ final e = new CurlyBlockElement(expanded: false,
disabled: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isFalse);
expect(e.disabled, isFalse);
});
test('not expanded / disabled', () {
- final CurlyBlockElement e = new CurlyBlockElement(expanded: false,
+ final e = new CurlyBlockElement(expanded: false,
disabled: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isFalse);
expect(e.disabled, isTrue);
});
test('expanded', () {
- final CurlyBlockElement e = new CurlyBlockElement(expanded: true);
+ final e = new CurlyBlockElement(expanded: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isTrue);
expect(e.disabled, isFalse);
});
test('expanded / not disabled', () {
- final CurlyBlockElement e = new CurlyBlockElement(expanded: true,
- disabled: false);
+ final e = new CurlyBlockElement(expanded: true, disabled: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isTrue);
expect(e.disabled, isFalse);
});
test('expanded / disabled', () {
- final CurlyBlockElement e = new CurlyBlockElement(expanded: true,
- disabled: true);
+ final e = new CurlyBlockElement(expanded: true, disabled: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isTrue);
expect(e.disabled, isTrue);
});
test('not disabled', () {
- final CurlyBlockElement e = new CurlyBlockElement(disabled: false);
+ final e = new CurlyBlockElement(disabled: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isFalse);
expect(e.disabled, isFalse);
});
test('disabled', () {
- final CurlyBlockElement e = new CurlyBlockElement(disabled: true);
+ final e = new CurlyBlockElement(disabled: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.expanded, isFalse);
expect(e.disabled, isTrue);
});
});
test('elements created', () async {
- final CurlyBlockElement e = new CurlyBlockElement();
+ final e = new CurlyBlockElement();
expect(e.shadowRoot, isNotNull, reason: 'shadowRoot is created');
document.body.append(e);
await e.onRendered.first;
diff --git a/runtime/observatory/tests/observatory_ui/error_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/error_ref/element_test.dart
index 0495656..b131472 100644
--- a/runtime/observatory/tests/observatory_ui/error_ref/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/error_ref/element_test.dart
@@ -3,14 +3,13 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/models.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/error_ref.dart';
+import '../mocks.dart';
main() {
ErrorRefElement.tag.ensureRegistration();
- final ErrorRef ref = new ErrorRefMock(id: 'id', message: 'fixed-error-m');
+ final ref = new ErrorRefMock(id: 'id', message: 'fixed-error-m');
test('instantiation', () {
final ErrorRefElement e = new ErrorRefElement(ref);
expect(e, isNotNull, reason: 'element correctly created');
diff --git a/runtime/observatory/tests/observatory_ui/flag_list/element_test.dart b/runtime/observatory/tests/observatory_ui/flag_list/element_test.dart
index e88dea6..d23fffa 100644
--- a/runtime/observatory/tests/observatory_ui/flag_list/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/flag_list/element_test.dart
@@ -2,24 +2,24 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:async';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/flag_list.dart';
import 'package:observatory/src/elements/nav/notify.dart';
+import '../mocks.dart';
main() {
FlagListElement.tag.ensureRegistration();
final nTag = NavNotifyElement.tag.name;
- const vm = const VMMock(name: 'vm');
- final stream = new StreamController().stream;
+ const vm = const VMMock();
+ final events = new EventRepositoryMock();
+ final notifications = new NotificationRepositoryMock();
group('instantiation', () {
test('default', () {
- final FlagListElement e = new FlagListElement(vm, stream,
- new FlagsRepositoryMock(),
- new NotificationRepositoryMock());
+ final e = new FlagListElement(vm, events,
+ new FlagsRepositoryMock(),
+ notifications);
expect(e, isNotNull, reason: 'element correctly created');
});
});
@@ -32,15 +32,13 @@
const FlagMock(name: 'f2', comment: 'c2', modified: false),
const FlagMock(name: 'f3', comment: 'c3', modified: false),
];
- final flags = new List.unmodifiable([]..addAll(modified)
- ..addAll(unmodifed));
- final FlagListElement e = new FlagListElement(vm, stream,
- new FlagsRepositoryMock(list: expectAsync((input) async {
- expect(input, equals(vm));
- return flags;
- }, count: 1)), new NotificationRepositoryMock());
+ final flags = []..addAll(modified)..addAll(unmodifed);
+ final repository = new FlagsRepositoryMock(list: flags);
+ final e = new FlagListElement(vm, events, repository, notifications);
document.body.append(e);
+ expect(repository.isListInvoked, isFalse);
await e.onRendered.first;
+ expect(repository.isListInvoked, isTrue);
expect(e.children.length, isNonZero, reason: 'has elements');
expect(e.querySelectorAll(nTag).length, equals(1));
expect(e.querySelectorAll('.flag').length, equals(flags.length));
diff --git a/runtime/observatory/tests/observatory_ui/function_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/function_ref/element_test.dart
index a647d3d..cd6b8af 100644
--- a/runtime/observatory/tests/observatory_ui/function_ref/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/function_ref/element_test.dart
@@ -3,23 +3,22 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/function_ref.dart';
+import '../mocks.dart';
main(){
FunctionRefElement.tag.ensureRegistration();
- final IsolateRefMock isolate = new IsolateRefMock(id: 'i-id', name: 'i-name');
- final FunctionRefMock function = new FunctionRefMock(id: 'f-id',
- name: 'f-name');
+ final isolate = new IsolateRefMock(id: 'i-id', name: 'i-name');
+ final function = new FunctionRefMock(id: 'f-id', name: 'f-name');
test('instantiation', () {
- final FunctionRefElement e = new FunctionRefElement(isolate, function);
+ final e = new FunctionRefElement(isolate, function);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(isolate));
expect(e.function, equals(function));
});
test('elements created after attachment', () async {
- final FunctionRefElement e = new FunctionRefElement(isolate, function);
+ final e = new FunctionRefElement(isolate, function);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/general_error/element_test.dart b/runtime/observatory/tests/observatory_ui/general_error/element_test.dart
index 31a9031..e056bac 100644
--- a/runtime/observatory/tests/observatory_ui/general_error/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/general_error/element_test.dart
@@ -3,9 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/general_error.dart';
import 'package:observatory/src/elements/nav/notify.dart';
+import '../mocks.dart';
main() {
GeneralErrorElement.tag.ensureRegistration();
diff --git a/runtime/observatory/tests/observatory_ui/isolate_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/isolate_ref/element_test.dart
index c7d64a4..2cfaafc 100644
--- a/runtime/observatory/tests/observatory_ui/isolate_ref/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/isolate_ref/element_test.dart
@@ -2,38 +2,30 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:async';
import 'package:unittest/unittest.dart';
-import 'package:observatory/models.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/isolate_ref.dart';
+import '../mocks.dart';
main(){
IsolateRefElement.tag.ensureRegistration();
- StreamController<IsolateUpdateEvent> updatesController;
- final IsolateRefMock ref = new IsolateRefMock(id: 'id', name: 'old-name');
- final IsolateMock obj = new IsolateMock(id: 'id', name: 'new-name');
- setUp(() {
- updatesController = new StreamController<IsolateUpdateEvent>();
- });
+ final ref = new IsolateRefMock(id: 'id', name: 'old-name');
+ final events = new EventRepositoryMock();
+ final obj = new IsolateMock(id: 'id', name: 'new-name');
group('instantiation', () {
test('IsolateRef', () {
- final IsolateRefElement e = new IsolateRefElement(ref,
- updatesController.stream);
+ final e = new IsolateRefElement(ref, events);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(ref));
});
test('Isolate', () {
- final IsolateRefElement e = new IsolateRefElement(obj,
- updatesController.stream);
+ final e = new IsolateRefElement(obj, events);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(obj));
});
});
test('elements created after attachment', () async {
- final IsolateRefElement e = new IsolateRefElement(ref,
- updatesController.stream);
+ final e = new IsolateRefElement(ref, events);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
@@ -43,23 +35,21 @@
});
group('updates', () {
test('are correctly listen', () async {
- final IsolateRefElement e = new IsolateRefElement(ref,
- updatesController.stream);
- expect(updatesController.hasListener, isFalse);
+ final e = new IsolateRefElement(ref, events);
+ expect(events.onIsolateUpdateHasListener, isFalse);
document.body.append(e);
await e.onRendered.first;
- expect(updatesController.hasListener, isTrue);
+ expect(events.onIsolateUpdateHasListener, isTrue);
e.remove();
await e.onRendered.first;
- expect(updatesController.hasListener, isFalse);
+ expect(events.onIsolateUpdateHasListener, isFalse);
});
test('have effects', () async {
- final IsolateRefElement e = new IsolateRefElement(ref,
- updatesController.stream);
+ final e = new IsolateRefElement(ref, events);
document.body.append(e);
await e.onRendered.first;
expect(e.innerHtml.contains(ref.id), isTrue);
- updatesController.add(new IsolateUpdateEventMock(isolate: obj));
+ events.add(new IsolateUpdateEventMock(isolate: obj));
await e.onRendered.first;
expect(e.innerHtml.contains(ref.name), isFalse);
expect(e.innerHtml.contains(obj.name), isTrue);
diff --git a/runtime/observatory/tests/observatory_ui/library_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/library_ref/element_test.dart
index cb33f6b..48291b5 100644
--- a/runtime/observatory/tests/observatory_ui/library_ref/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/library_ref/element_test.dart
@@ -3,22 +3,22 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/library_ref.dart';
+import '../mocks.dart';
main(){
LibraryRefElement.tag.ensureRegistration();
- final IsolateRefMock isolate = new IsolateRefMock(id: 'i-id', name: 'i-name');
- final LibraryRefMock library = new LibraryRefMock(id: 'c-id', name: 'c-name');
+ const isolate = const IsolateRefMock(id: 'i-id', name: 'i-name');
+ const library = const LibraryRefMock(id: 'c-id', name: 'c-name');
test('instantiation', () {
- final LibraryRefElement e = new LibraryRefElement(isolate, library);
+ final e = new LibraryRefElement(isolate, library);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(isolate));
expect(e.library, equals(library));
});
test('elements created after attachment', () async {
- final LibraryRefElement e = new LibraryRefElement(isolate, library);
+ final e = new LibraryRefElement(isolate, library);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/mocks.dart b/runtime/observatory/tests/observatory_ui/mocks.dart
new file mode 100644
index 0000000..b52b93b
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library mocks;
+
+import 'dart:async';
+
+import 'package:observatory/models.dart' as M;
+
+part 'mocks/exceptions/connection_exception.dart';
+
+part 'mocks/objects/error.dart';
+part 'mocks/objects/code.dart';
+part 'mocks/objects/event.dart';
+part 'mocks/objects/class.dart';
+part 'mocks/objects/flag.dart';
+part 'mocks/objects/function.dart';
+part 'mocks/objects/isolate.dart';
+part 'mocks/objects/library.dart';
+part 'mocks/objects/notification.dart';
+part 'mocks/objects/script.dart';
+part 'mocks/objects/source_location.dart';
+part 'mocks/objects/target.dart';
+part 'mocks/objects/vm.dart';
+
+part 'mocks/repositories/class.dart';
+part 'mocks/repositories/event.dart';
+part 'mocks/repositories/flag.dart';
+part 'mocks/repositories/instance.dart';
+part 'mocks/repositories/notification.dart';
+part 'mocks/repositories/script.dart';
+part 'mocks/repositories/target.dart';
diff --git a/runtime/observatory/lib/src/mocks/exceptions/connection_exception.dart b/runtime/observatory/tests/observatory_ui/mocks/exceptions/connection_exception.dart
similarity index 83%
rename from runtime/observatory/lib/src/mocks/exceptions/connection_exception.dart
rename to runtime/observatory/tests/observatory_ui/mocks/exceptions/connection_exception.dart
index 127cb20..d036951 100644
--- a/runtime/observatory/lib/src/mocks/exceptions/connection_exception.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/exceptions/connection_exception.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/tests/observatory_ui/mocks/objects/class.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/class.dart
new file mode 100644
index 0000000..bc290af
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/class.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of mocks;
+
+class ClassRefMock implements M.ClassRef {
+ final String id;
+ final String name;
+ const ClassRefMock({this.id, this.name});
+}
+
+class ClassMock implements M.Class {
+ final String id;
+ final String name;
+ final M.ErrorRef error;
+ final bool isAbstract;
+ final bool isConst;
+ final bool isPatch;
+ final M.LibraryRef library;
+ final M.SourceLocation location;
+ final M.ClassRef superclass;
+ final M.InstanceRef superType;
+ final Iterable<M.InstanceRef> interfaces;
+ final M.InstanceRef mixin;
+ final Iterable<M.ClassRef> subclasses;
+ const ClassMock({this.id: 'c-id', this.name: 'c-name', this.error,
+ this.isAbstract: false, this.isConst: false, this.isPatch: false,
+ this.library, this.location, this.superclass, this.superType,
+ this.interfaces: const [], this.mixin, this.subclasses: const []});
+}
diff --git a/runtime/observatory/lib/src/mocks/objects/code.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/code.dart
similarity index 90%
rename from runtime/observatory/lib/src/mocks/objects/code.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/code.dart
index d0529ae..7d2f725 100644
--- a/runtime/observatory/lib/src/mocks/objects/code.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/code.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/lib/src/mocks/objects/error.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/error.dart
similarity index 89%
rename from runtime/observatory/lib/src/mocks/objects/error.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/error.dart
index 8b47830..4a2b755 100644
--- a/runtime/observatory/lib/src/mocks/objects/error.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/error.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/lib/src/mocks/objects/event.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/event.dart
similarity index 93%
rename from runtime/observatory/lib/src/mocks/objects/event.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/event.dart
index 6a646f3..7e4aa17 100644
--- a/runtime/observatory/lib/src/mocks/objects/event.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/event.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
@@ -42,6 +42,11 @@
const ServiceExtensionAddedEventMock({this.extensionRPC, this.isolate,
this.timestamp});
}
+class DebuggerSettingsUpdateEventMock implements M.PauseStartEvent {
+ final DateTime timestamp;
+ final M.IsolateRef isolate;
+ const DebuggerSettingsUpdateEventMock({this.isolate, this.timestamp});
+}
class PauseStartEventMock implements M.PauseStartEvent {
final DateTime timestamp;
final M.IsolateRef isolate;
@@ -81,7 +86,8 @@
class ResumeEventMock implements M.ResumeEvent {
final DateTime timestamp;
final M.IsolateRef isolate;
- const ResumeEventMock({this.timestamp, this.isolate});
+ final M.Frame topFrame;
+ const ResumeEventMock({this.timestamp, this.isolate, this.topFrame});
}
class BreakpointAddedEventMock implements M.BreakpointAddedEvent {
final DateTime timestamp;
diff --git a/runtime/observatory/lib/src/mocks/objects/flag.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/flag.dart
similarity index 100%
rename from runtime/observatory/lib/src/mocks/objects/flag.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/flag.dart
diff --git a/runtime/observatory/lib/src/mocks/objects/function.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/function.dart
similarity index 93%
rename from runtime/observatory/lib/src/mocks/objects/function.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/function.dart
index 8a60adf..3458f97 100644
--- a/runtime/observatory/lib/src/mocks/objects/function.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/function.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/lib/src/mocks/objects/isolate.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/isolate.dart
similarity index 64%
rename from runtime/observatory/lib/src/mocks/objects/isolate.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/isolate.dart
index 9f5ba80..d65b840 100644
--- a/runtime/observatory/lib/src/mocks/objects/isolate.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/isolate.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
@@ -9,7 +9,7 @@
final int number;
final String name;
- const IsolateRefMock({this.id, this.number, this.name});
+ const IsolateRefMock({this.id: 'i-id', this.number, this.name: 'i-name'});
}
class IsolateMock implements M.Isolate {
@@ -19,7 +19,7 @@
final DateTime startTime;
final bool runnable;
- const IsolateMock({this.id, this.number, this.name, this.startTime,
- this.runnable});
+ const IsolateMock({this.id: 'i-id', this.number, this.name: 'i-name',
+ this.startTime, this.runnable: true});
// TODO(cbernaschina) add other properties.
}
diff --git a/runtime/observatory/lib/src/mocks/objects/library.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/library.dart
similarity index 91%
rename from runtime/observatory/lib/src/mocks/objects/library.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/library.dart
index 2932efa..8022904 100644
--- a/runtime/observatory/lib/src/mocks/objects/library.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/library.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/lib/src/mocks/objects/notification.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/notification.dart
similarity index 89%
rename from runtime/observatory/lib/src/mocks/objects/notification.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/notification.dart
index 68bfd75..d452cee 100644
--- a/runtime/observatory/lib/src/mocks/objects/notification.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/notification.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/lib/src/mocks/objects/script.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/script.dart
similarity index 92%
rename from runtime/observatory/lib/src/mocks/objects/script.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/script.dart
index 7ce801a..895b1c9 100644
--- a/runtime/observatory/lib/src/mocks/objects/script.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/script.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/lib/src/mocks/objects/source_location.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/source_location.dart
similarity index 86%
rename from runtime/observatory/lib/src/mocks/objects/source_location.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/source_location.dart
index 1c9c0f2..a795589 100644
--- a/runtime/observatory/lib/src/mocks/objects/source_location.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/source_location.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/lib/src/mocks/objects/target.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/target.dart
similarity index 81%
rename from runtime/observatory/lib/src/mocks/objects/target.dart
rename to runtime/observatory/tests/observatory_ui/mocks/objects/target.dart
index c5ae189..0d15e5c 100644
--- a/runtime/observatory/lib/src/mocks/objects/target.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/target.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/tests/observatory_ui/mocks/objects/vm.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/vm.dart
new file mode 100644
index 0000000..2740b83
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks/objects/vm.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of mocks;
+
+class VMRefMock implements M.VMRef {
+ final String name;
+ final String displayName;
+ const VMRefMock({this.name: 'vm-name', this.displayName: 'vm-display-name'});
+}
+
+class VMMock implements M.VM {
+ final String name;
+ final String displayName;
+ final int architectureBits;
+ final String targetCPU;
+ final String hostCPU;
+ final String version;
+ final int pid;
+ final DateTime startTime;
+ final Iterable<M.IsolateRef> isolates;
+
+ const VMMock({this.name: 'vm-name', this.displayName: 'vm-display-name',
+ this.architectureBits, this.targetCPU, this.hostCPU, this.version,
+ this.pid, this.startTime, this.isolates : const []});
+}
diff --git a/runtime/observatory/tests/observatory_ui/mocks/repositories/class.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/class.dart
new file mode 100644
index 0000000..3c5fe7b
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/class.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of mocks;
+
+typedef Future<M.Class> ClassRepositoryMockObjectCallback();
+typedef Future<M.Class> ClassRepositoryMockGetterCallback(String id);
+
+class ClassRepositoryMock implements M.ClassRepository {
+ final ClassRepositoryMockObjectCallback _object;
+ final ClassRepositoryMockGetterCallback _get;
+
+ ClassRepositoryMock({ClassRepositoryMockObjectCallback object,
+ ClassRepositoryMockGetterCallback getter})
+ : _object = object,
+ _get = getter;
+
+ Future<M.Class> getObject(){
+ if (_object != null) {
+ return _object();
+ }
+ return new Future.value(null);
+ }
+
+ Future<M.Class> get(String id){
+ if (_get != null) {
+ return _get(id);
+ }
+ return new Future.value(null);
+ }
+}
diff --git a/runtime/observatory/tests/observatory_ui/mocks/repositories/event.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/event.dart
new file mode 100644
index 0000000..7748786
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/event.dart
@@ -0,0 +1,171 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of mocks;
+
+class EventRepositoryMock implements M.EventRepository {
+ final _onEvent = new StreamController<M.Event>.broadcast();
+ get onEvent => _onEvent.stream;
+ get onEventHasListener => _onEvent.hasListener;
+
+ final _onVMEvent = new StreamController<M.VMEvent>.broadcast();
+ get onVMEvent => _onVMEvent.stream;
+ get onVMEventHasListener => _onVMEvent.hasListener;
+
+ final _onVMUpdate = new StreamController<M.Event>.broadcast();
+ get onVMUpdate => _onVMUpdate.stream;
+ get onVMUpdateHasListener => _onVMUpdate.hasListener;
+
+ final _onIsolateEvent = new StreamController<M.IsolateEvent>.broadcast();
+ get onIsolateEvent => _onIsolateEvent.stream;
+ get onIsolateEventHasListener => _onIsolateEvent.hasListener;
+
+ final _onIsolateStart = new StreamController<M.IsolateStartEvent>.broadcast();
+ get onIsolateStart => _onIsolateStart.stream;
+ get onIsolateStartHasListener => _onIsolateStart.hasListener;
+
+ final _onIsolateRunnable =
+ new StreamController<M.IsolateRunnableEvent>.broadcast();
+ get onIsolateRunnable => _onIsolateRunnable.stream;
+ get onIsolateRunnableHasListener => _onIsolateRunnable.hasListener;
+
+ final _onIsolateExit = new StreamController<M.IsolateExitEvent>.broadcast();
+ get onIsolateExit => _onIsolateExit.stream;
+ get onIsolateExitHasListener => _onIsolateExit.hasListener;
+
+ final _onIsolateUpdate =
+ new StreamController<M.IsolateUpdateEvent>.broadcast();
+ get onIsolateUpdate => _onIsolateUpdate.stream;
+ get onIsolateUpdateHasListener => _onIsolateUpdate.hasListener;
+
+ final _onIsolateReload = new StreamController<M.IsolateReloadEvent>.broadcast();
+ get onIsolateReload => _onIsolateReload.stream;
+ get onIsolateReloadHasListener => _onIsolateReload.hasListener;
+
+ final _onServiceExtensionAdded =
+ new StreamController<M.ServiceExtensionAddedEvent>.broadcast();
+ get onServiceExtensionAdded => _onServiceExtensionAdded.stream;
+ get onServiceExtensionAddedHasListener =>
+ _onServiceExtensionAdded.hasListener;
+
+ final _onDebugEvent = new StreamController<M.DebugEvent>.broadcast();
+ get onDebugEvent => _onDebugEvent.stream;
+ get onDebugEventHasListener => _onDebugEvent.hasListener;
+
+ final _onPauseStart = new StreamController<M.PauseStartEvent>.broadcast();
+ get onPauseStart => _onPauseStart.stream;
+ get onPauseStartHasListener => _onPauseStart.hasListener;
+
+ final _onPauseExit = new StreamController<M.PauseExitEvent>.broadcast();
+ get onPauseExit => _onPauseExit.stream;
+ get onPauseExitHasListener => _onPauseExit.hasListener;
+
+ final _onPauseBreakpoint =
+ new StreamController<M.PauseBreakpointEvent>.broadcast();
+ get onPauseBreakpoint => _onPauseBreakpoint.stream;
+ get onPauseBreakpointHasListener => _onPauseBreakpoint.hasListener;
+
+ final _onPauseInterrupted =
+ new StreamController<M.PauseInterruptedEvent>.broadcast();
+ get onPauseInterrupted => _onPauseInterrupted.stream;
+ get onPauseInterruptedHasListener => _onPauseInterrupted.hasListener;
+
+ final _onPauseException =
+ new StreamController<M.PauseExceptionEvent>.broadcast();
+ get onPauseException => _onPauseException.stream;
+ get onPauseExceptionHasListener => _onPauseException.hasListener;
+
+ final _onResume = new StreamController<M.ResumeEvent>.broadcast();
+ get onResume => _onResume.stream;
+ get onResumeHasListener => _onResume.hasListener;
+
+ final _onBreakpointAdded =
+ new StreamController<M.BreakpointAddedEvent>.broadcast();
+ get onBreakpointAdded => _onBreakpointAdded.stream;
+ get onBreakpointAddedHasListener => _onBreakpointAdded.hasListener;
+
+ final _onBreakpointResolved =
+ new StreamController<M.BreakpointResolvedEvent>.broadcast();
+ get onBreakpointResolved => _onBreakpointResolved.stream;
+ get onBreakpointResolvedHasListener => _onBreakpointResolved.hasListener;
+
+ final _onBreakpointRemoved =
+ new StreamController<M.BreakpointRemovedEvent>.broadcast();
+ get onBreakpointRemoved => _onBreakpointRemoved.stream;
+ get onBreakpointRemovedHasListener => _onBreakpointRemoved.hasListener;
+
+ final _onInspect = new StreamController<M.InspectEvent>.broadcast();
+ get onInspect => _onInspect.stream;
+ get onInspectHasListener => _onInspect.hasListener;
+
+ final _onGCEvent = new StreamController<M.GCEvent>.broadcast();
+ get onGCEvent => _onGCEvent.stream;
+ get onGCEventHasListener => _onGCEvent.hasListener;
+
+ final _onExtensionEvent = new StreamController<M.ExtensionEvent>.broadcast();
+ get onExtensionEvent => _onExtensionEvent.stream;
+ get onExtensionEventHasListener => _onExtensionEvent.hasListener;
+
+ final _onTimelineEvents =
+ new StreamController<M.TimelineEventsEvent>.broadcast();
+ get onTimelineEvents => _onTimelineEvents.stream;
+ get onTimelineEventsEventHasListener => _onTimelineEvents.hasListener;
+
+ final _onConnectionClosed =
+ new StreamController<M.ConnectionClosedEvent>.broadcast();
+ get onConnectionClosed => _onConnectionClosed.stream;
+ get onConnectionClosedHasListener => _onConnectionClosed.hasListener;
+
+ void add(M.Event event) {
+ _onEvent.add(event);
+ if (event is M.VMEvent) {
+ _onVMEvent.add(event);
+ if (event is M.VMUpdateEvent) {
+ _onVMUpdate.add(event);
+ }
+ } else if (event is M.IsolateEvent) {
+ _onIsolateEvent.add(event);
+ if (event is M.IsolateStartEvent) {
+ _onIsolateStart.add(event);
+ } else if (event is M.IsolateRunnableEvent) {
+ _onIsolateRunnable.add(event);
+ } else if (event is M.IsolateExitEvent) {
+ _onIsolateExit.add(event);
+ } else if (event is M.IsolateUpdateEvent) {
+ _onIsolateUpdate.add(event);
+ } else if (event is M.ServiceExtensionAddedEvent) {
+ _onServiceExtensionAdded.add(event);
+ }
+ } else if (event is M.DebugEvent) {
+ _onDebugEvent.add(event);
+ if (event is M.PauseStartEvent) {
+ _onPauseStart.add(event);
+ } else if (event is M.PauseExitEvent) {
+ _onPauseExit.add(event);
+ } else if (event is M.PauseBreakpointEvent) {
+ _onPauseBreakpoint.add(event);
+ } else if (event is M.PauseInterruptedEvent) {
+ _onPauseInterrupted.add(event);
+ } else if (event is M.PauseExceptionEvent) {
+ _onPauseException.add(event);
+ } else if (event is M.ResumeEvent) {
+ _onResume.add(event);
+ } else if (event is M.BreakpointAddedEvent) {
+ _onBreakpointAdded.add(event);
+ } else if (event is M.BreakpointResolvedEvent) {
+ _onBreakpointResolved.add(event);
+ } else if (event is M.BreakpointRemovedEvent) {
+ _onBreakpointRemoved.add(event);
+ } else if (event is M.InspectEvent) {
+ _onInspect.add(event);
+ }
+ } else if (event is M.GCEvent) {
+ _onGCEvent.add(event);
+ } else if (event is M.ExtensionEvent) {
+ _onExtensionEvent.add(event);
+ } else if (event is M.TimelineEventsEvent) {
+ _onTimelineEvents.add(event);
+ }
+ }
+}
diff --git a/runtime/observatory/tests/observatory_ui/mocks/repositories/flag.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/flag.dart
new file mode 100644
index 0000000..e782b30
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/flag.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file
+
+part of mocks;
+
+class FlagsRepositoryMock implements M.FlagsRepository {
+ final Iterable<M.Flag> _list;
+ bool isListInvoked = false;
+
+ Future<Iterable<M.Flag>> list() async {
+ isListInvoked = true;
+ return _list;
+ }
+
+ FlagsRepositoryMock({Iterable<M.Flag> list: const []})
+ : _list = new List.unmodifiable(list);
+}
diff --git a/runtime/observatory/tests/observatory_ui/mocks/repositories/instance.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/instance.dart
new file mode 100644
index 0000000..299dcfc
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/instance.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of mocks;
+
+typedef Future<M.Instance> InstanceRepositoryMockCallback(String id);
+
+class InstanceRepositoryMock implements M.InstanceRepository {
+ final InstanceRepositoryMockCallback _get;
+
+ InstanceRepositoryMock({InstanceRepositoryMockCallback getter})
+ : _get = getter;
+
+ Future<M.Instance> get(String id){
+ if (_get != null) {
+ return _get(id);
+ }
+ return new Future.value(null);
+ }
+}
diff --git a/runtime/observatory/lib/src/mocks/repositories/notification.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/notification.dart
similarity index 96%
rename from runtime/observatory/lib/src/mocks/repositories/notification.dart
rename to runtime/observatory/tests/observatory_ui/mocks/repositories/notification.dart
index cf7f2b9..f03cd27 100644
--- a/runtime/observatory/lib/src/mocks/repositories/notification.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/notification.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/tests/observatory_ui/mocks/repositories/script.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/script.dart
new file mode 100644
index 0000000..78b9610
--- /dev/null
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/script.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of mocks;
+
+typedef Future<M.Script> ScriptRepositoryMockCallback(String id);
+
+class ScriptRepositoryMock implements M.ScriptRepository {
+ final ScriptRepositoryMockCallback _get;
+
+ ScriptRepositoryMock({ScriptRepositoryMockCallback getter})
+ : _get = getter;
+
+ Future<M.Script> get(String id){
+ if (_get != null) {
+ return _get(id);
+ }
+ return new Future.value(null);
+ }
+}
diff --git a/runtime/observatory/lib/src/mocks/repositories/target.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/target.dart
similarity index 96%
rename from runtime/observatory/lib/src/mocks/repositories/target.dart
rename to runtime/observatory/tests/observatory_ui/mocks/repositories/target.dart
index 8321f86..1c7f3ed 100644
--- a/runtime/observatory/lib/src/mocks/repositories/target.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/target.dart
@@ -1,6 +1,6 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file
+// BSD-style license that can be found in the LICENSE file.
part of mocks;
diff --git a/runtime/observatory/tests/observatory_ui/nav/bar/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/bar/element_test.dart
index fe54785..98b9653 100644
--- a/runtime/observatory/tests/observatory_ui/nav/bar/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/bar/element_test.dart
@@ -9,11 +9,11 @@
NavBarElement.tag.ensureRegistration();
test('instantiation', () {
- final NavBarElement e = new NavBarElement();
+ final e = new NavBarElement();
expect(e, isNotNull, reason: 'element correctly created');
});
test('elements created', () async {
- final NavBarElement e = new NavBarElement();
+ final e = new NavBarElement();
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/nav/class-menu/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/class-menu/element_test.dart
index df83ea4..1b3766d 100644
--- a/runtime/observatory/tests/observatory_ui/nav/class-menu/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/class-menu/element_test.dart
@@ -3,22 +3,22 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/nav/class_menu.dart';
+import '../../mocks.dart';
main(){
NavClassMenuElement.tag.ensureRegistration();
- final IsolateRefMock i_ref = const IsolateRefMock(id: 'i-id', name: 'i-name');
- final ClassRefMock c_ref = const ClassRefMock(id: 'c-id', name: 'c-name');
+ final i_ref = const IsolateRefMock(id: 'i-id', name: 'i-name');
+ final c_ref = const ClassRefMock(id: 'c-id', name: 'c-name');
test('instantiation', () {
- final NavClassMenuElement e = new NavClassMenuElement(i_ref, c_ref);
+ final e = new NavClassMenuElement(i_ref, c_ref);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(i_ref));
expect(e.cls, equals(c_ref));
});
test('elements created after attachment', () async {
- final NavClassMenuElement e = new NavClassMenuElement(i_ref, c_ref);
+ final e = new NavClassMenuElement(i_ref, c_ref);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.dart
index 27bf79c..235975f 100644
--- a/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/isolate-menu/element_test.dart
@@ -2,41 +2,36 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:async';
import 'package:unittest/unittest.dart';
-import 'package:observatory/models.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/nav/menu.dart';
import 'package:observatory/src/elements/nav/isolate_menu.dart';
+import '../../mocks.dart';
main(){
NavIsolateMenuElement.tag.ensureRegistration();
- final String tag = NavMenuElement.tag.name;
+ final tag = NavMenuElement.tag.name;
- StreamController<IsolateUpdateEvent> updatesController;
- final IsolateRefMock ref = const IsolateRefMock(id: 'i-id', name: 'old-name');
- final IsolateMock obj = const IsolateMock(id: 'i-id', name: 'new-name');
+ EventRepositoryMock events;
+ final ref = const IsolateRefMock(id: 'i-id', name: 'old-name');
+ final obj = const IsolateMock(id: 'i-id', name: 'new-name');
setUp(() {
- updatesController = new StreamController<IsolateUpdateEvent>();
+ events = new EventRepositoryMock();
});
group('instantiation', () {
test('IsolateRef', () {
- final NavIsolateMenuElement e = new NavIsolateMenuElement(ref,
- updatesController.stream);
+ final e = new NavIsolateMenuElement(ref, events);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(ref));
});
test('Isolate', () {
- final NavIsolateMenuElement e = new NavIsolateMenuElement(obj,
- updatesController.stream);
+ final e = new NavIsolateMenuElement(obj, events);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(obj));
});
});
test('elements created after attachment', () async {
- final NavIsolateMenuElement e = new NavIsolateMenuElement(ref,
- updatesController.stream);
+ final e = new NavIsolateMenuElement(ref, events);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
@@ -46,24 +41,22 @@
});
group('updates', () {
test('are correctly listen', () async {
- final NavIsolateMenuElement e = new NavIsolateMenuElement(ref,
- updatesController.stream);
- expect(updatesController.hasListener, isFalse);
+ final e = new NavIsolateMenuElement(ref, events);
+ expect(events.onIsolateUpdateHasListener, isFalse);
document.body.append(e);
await e.onRendered.first;
- expect(updatesController.hasListener, isTrue);
+ expect(events.onIsolateUpdateHasListener, isTrue);
e.remove();
await e.onRendered.first;
- expect(updatesController.hasListener, isFalse);
+ expect(events.onIsolateUpdateHasListener, isFalse);
});
test('have effects', () async {
- final NavIsolateMenuElement e = new NavIsolateMenuElement(ref,
- updatesController.stream);
+ final e = new NavIsolateMenuElement(ref, events);
document.body.append(e);
await e.onRendered.first;
expect((e.shadowRoot.querySelector(tag) as NavMenuElement)
.label.contains(ref.name), isTrue);
- updatesController.add(new IsolateUpdateEventMock(isolate: obj));
+ events.add(new IsolateUpdateEventMock(isolate: obj));
await e.onRendered.first;
expect((e.shadowRoot.querySelector(tag) as NavMenuElement)
.label.contains(ref.name), isFalse);
diff --git a/runtime/observatory/tests/observatory_ui/nav/library-menu/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/library-menu/element_test.dart
index f6967c9..2144520 100644
--- a/runtime/observatory/tests/observatory_ui/nav/library-menu/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/library-menu/element_test.dart
@@ -3,22 +3,22 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/nav/library_menu.dart';
+import '../../mocks.dart';
main(){
NavLibraryMenuElement.tag.ensureRegistration();
- final IsolateRefMock i_ref = const IsolateRefMock(id: 'i-id', name: 'i-name');
- final LibraryRefMock l_ref = const LibraryRefMock(id: 'l-id', name: 'l-name');
+ final i_ref = const IsolateRefMock(id: 'i-id', name: 'i-name');
+ final l_ref = const LibraryRefMock(id: 'l-id', name: 'l-name');
test('instantiation', () {
- final NavLibraryMenuElement e = new NavLibraryMenuElement(i_ref, l_ref);
+ final e = new NavLibraryMenuElement(i_ref, l_ref);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(i_ref));
expect(e.library, equals(l_ref));
});
test('elements created after attachment', () async {
- final NavLibraryMenuElement e = new NavLibraryMenuElement(i_ref, l_ref);
+ final e = new NavLibraryMenuElement(i_ref, l_ref);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.dart
index f4ee551..d439a60 100644
--- a/runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.dart
@@ -12,12 +12,12 @@
final label = 'custom-label';
final link = 'link-to-target';
test('label', () {
- final NavMenuItemElement e = new NavMenuItemElement(label);
+ final e = new NavMenuItemElement(label);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.label, equals(label), reason: 'element correctly created');
});
test('label', () {
- final NavMenuItemElement e = new NavMenuItemElement(label, link: link);
+ final e = new NavMenuItemElement(label, link: link);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.link, equals(link), reason: 'element correctly created');
});
@@ -25,7 +25,7 @@
group('elements', () {
test('created', () async {
final label = 'custom-label';
- final NavMenuItemElement e = new NavMenuItemElement(label);
+ final e = new NavMenuItemElement(label);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
@@ -38,7 +38,7 @@
test('react to label change', () async {
final label1 = 'custom-label-1';
final label2 = 'custom-label-2';
- final NavMenuItemElement e = new NavMenuItemElement(label1);
+ final e = new NavMenuItemElement(label1);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.innerHtml.contains(label1), isTrue);
@@ -54,7 +54,7 @@
final label = 'custom-label';
final link1 = 'custom-label-1';
final link2 = 'custom-label-2';
- final NavMenuItemElement e = new NavMenuItemElement(label, link: link1);
+ final e = new NavMenuItemElement(label, link: link1);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.innerHtml.contains(link1), isTrue);
diff --git a/runtime/observatory/tests/observatory_ui/nav/menu/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/menu/element_test.dart
index 0cabc3c..7e32086 100644
--- a/runtime/observatory/tests/observatory_ui/nav/menu/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/menu/element_test.dart
@@ -11,17 +11,17 @@
group('instantiation', () {
final label = 'custom-label';
test('label', () {
- final NavMenuElement e = new NavMenuElement(label);
+ final e = new NavMenuElement(label);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.label, equals(label), reason: 'element correctly created');
});
test('not last', () {
- final NavMenuElement e = new NavMenuElement(label, last: false);
+ final e = new NavMenuElement(label, last: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.last, isFalse, reason: 'element correctly created');
});
test('last', () {
- final NavMenuElement e = new NavMenuElement(label, last: true);
+ final e = new NavMenuElement(label, last: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.last, isTrue, reason: 'element correctly created');
});
@@ -29,7 +29,7 @@
group('elements', () {
test('created', () async {
final label = 'custom-label';
- final NavMenuElement e = new NavMenuElement(label);
+ final e = new NavMenuElement(label);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
@@ -42,7 +42,7 @@
test('react to label change', () async {
final label1 = 'custom-label-1';
final label2 = 'custom-label-2';
- final NavMenuElement e = new NavMenuElement(label1);
+ final e = new NavMenuElement(label1);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.innerHtml.contains(label1), isTrue);
@@ -56,7 +56,7 @@
});
test('react to last change', () async {
final label = 'custom-label';
- final NavMenuElement e = new NavMenuElement(label, last: false);
+ final e = new NavMenuElement(label, last: false);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.innerHtml.contains('>'), isTrue);
diff --git a/runtime/observatory/tests/observatory_ui/nav/notify/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/notify/element_test.dart
index 64adcfb..9cee6cf 100644
--- a/runtime/observatory/tests/observatory_ui/nav/notify/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/notify/element_test.dart
@@ -3,11 +3,11 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html' hide Notification, NotificationEvent;
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/models.dart' as M;
import 'package:observatory/src/elements/nav/notify.dart';
import 'package:observatory/src/elements/nav/notify_event.dart';
import 'package:observatory/src/elements/nav/notify_exception.dart';
+import '../../mocks.dart';
main() {
NavNotifyElement.tag.ensureRegistration();
@@ -19,29 +19,29 @@
const isolate = const IsolateRefMock(id: 'i-id', name: 'i-name');
group('instantiation', () {
+ NotificationRepositoryMock repository;
+ setUp(() {
+ repository = new NotificationRepositoryMock();
+ });
test('default', () {
- final NavNotifyElement e = new NavNotifyElement(
- new NotificationRepositoryMock());
+ final e = new NavNotifyElement(repository);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.notifyOnPause, isTrue, reason: 'notifyOnPause is default');
});
test('notify on pause', () {
- final NavNotifyElement e = new NavNotifyElement(
- new NotificationRepositoryMock(), notifyOnPause: true);
+ final e = new NavNotifyElement(repository, notifyOnPause: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.notifyOnPause, isTrue, reason: 'notifyOnPause is the same');
});
test('do not notify on pause', () {
- final NavNotifyElement e = new NavNotifyElement(
- new NotificationRepositoryMock(), notifyOnPause: false);
+ final e = new NavNotifyElement(repository, notifyOnPause: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.notifyOnPause, isFalse, reason: 'notifyOnPause is the same');
});
});
test('is correctly listening', () async {
- final NotificationRepositoryMock repository =
- new NotificationRepositoryMock();
- final NavNotifyElement e = new NavNotifyElement(repository);
+ final repository = new NotificationRepositoryMock();
+ final e = new NavNotifyElement(repository);
document.body.append(e);
await e.onRendered.first;
expect(repository.hasListeners, isTrue, reason: 'is listening');
@@ -51,13 +51,13 @@
});
group('elements', () {
test('created after attachment', () async {
- final NotificationRepositoryMock repository =
+ final repository =
new NotificationRepositoryMock(list: [
new ExceptionNotificationMock(exception: new Exception("ex")),
const EventNotificationMock(event: const VMUpdateEventMock(vm: vm)),
const EventNotificationMock(event: const VMUpdateEventMock(vm: vm))
]);
- final NavNotifyElement e = new NavNotifyElement(repository);
+ final e = new NavNotifyElement(repository);
document.body.append(e);
await e.onRendered.first;
expect(repository.listInvoked, isTrue, reason: 'should invoke list()');
@@ -76,8 +76,7 @@
const EventNotificationMock(
event: const PauseStartEventMock(isolate: isolate))
]);
- final NavNotifyElement e = new NavNotifyElement(repository,
- notifyOnPause: true);
+ final e = new NavNotifyElement(repository, notifyOnPause: true);
document.body.append(e);
await e.onRendered.first;
expect(e.querySelectorAll(evTag).length, equals(2));
@@ -99,10 +98,8 @@
new ExceptionNotificationMock(exception: new Exception("ex")),
const EventNotificationMock(event: const VMUpdateEventMock()),
];
- final NotificationRepositoryMock repository =
- new NotificationRepositoryMock(list: list);
- final NavNotifyElement e = new NavNotifyElement(repository,
- notifyOnPause: true);
+ final repository = new NotificationRepositoryMock(list: list);
+ final e = new NavNotifyElement(repository, notifyOnPause: true);
document.body.append(e);
await e.onRendered.first;
expect(e.querySelectorAll(evTag).length, equals(1));
diff --git a/runtime/observatory/tests/observatory_ui/nav/notify_event/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/notify_event/element_test.dart
index 5d5de5c..9cea3f5 100644
--- a/runtime/observatory/tests/observatory_ui/nav/notify_event/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/notify_event/element_test.dart
@@ -4,22 +4,22 @@
import 'dart:html';
import 'dart:async';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/nav/notify_event.dart';
+import '../../mocks.dart';
main() {
NavNotifyEventElement.tag.ensureRegistration();
- final PauseStartEventMock event = new PauseStartEventMock(
+ final event = new PauseStartEventMock(
isolate: new IsolateMock(id: 'isolate-id', name: 'isolate-name'));
group('instantiation', () {
- final NavNotifyEventElement e = new NavNotifyEventElement(event);
+ final e = new NavNotifyEventElement(event);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.event, equals(event));
});
group('elements', () {
test('created after attachment', () async {
- final NavNotifyEventElement e = new NavNotifyEventElement(event);
+ final e = new NavNotifyEventElement(event);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/nav/notify_exception/connection_exception_test.dart b/runtime/observatory/tests/observatory_ui/nav/notify_exception/connection_exception_test.dart
index e6b3bc2..f09ed32 100644
--- a/runtime/observatory/tests/observatory_ui/nav/notify_exception/connection_exception_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/notify_exception/connection_exception_test.dart
@@ -4,23 +4,19 @@
import 'dart:html';
import 'dart:async';
import 'package:unittest/unittest.dart';
-import 'package:observatory/models.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/nav/notify_exception.dart';
+import '../../mocks.dart';
main() {
NavNotifyExceptionElement.tag.ensureRegistration();
- final ConnectionException exception =
- new ConnectionExceptionMock(message: 'message');
+ final exception = new ConnectionExceptionMock(message: 'message');
test('instantiation', () {
- final NavNotifyExceptionElement e =
- new NavNotifyExceptionElement(exception);
+ final e = new NavNotifyExceptionElement(exception);
expect(e, isNotNull, reason: 'element correctly created');
});
test('elements created after attachment', () async {
- final NavNotifyExceptionElement e =
- new NavNotifyExceptionElement(exception);
+ final e = new NavNotifyExceptionElement(exception);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_test.dart b/runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_test.dart
index be9fdc5..4696ee8 100644
--- a/runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_test.dart
@@ -9,46 +9,42 @@
main() {
NavNotifyExceptionElement.tag.ensureRegistration();
- final StackTrace stacktrace = new StackTrace.fromString('stacktrace string');
+ final st = new StackTrace.fromString('stacktrace string');
group('normal exception', () {
- final Exception exception = new Exception('exception message');
+ final ex = new Exception('exception message');
group('instantiation', () {
test('no stacktrace', () {
- final NavNotifyExceptionElement e =
- new NavNotifyExceptionElement(exception);
+ final e = new NavNotifyExceptionElement(ex);
expect(e, isNotNull, reason: 'element correctly created');
- expect(e.exception, equals(exception));
+ expect(e.exception, equals(ex));
expect(e.stacktrace, isNull);
});
test('with stacktrace', () {
- final NavNotifyExceptionElement e =
- new NavNotifyExceptionElement(exception, stacktrace: stacktrace);
+ final e = new NavNotifyExceptionElement(ex, stacktrace: st);
expect(e, isNotNull, reason: 'element correctly created');
- expect(e.exception, equals(exception));
- expect(e.stacktrace, equals(stacktrace));
+ expect(e.exception, equals(ex));
+ expect(e.stacktrace, equals(st));
});
});
group('elements', () {
test('created after attachment (no stacktrace)', () async {
- final NavNotifyExceptionElement e =
- new NavNotifyExceptionElement(exception);
+ final e = new NavNotifyExceptionElement(ex);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
- expect(e.innerHtml.contains(exception.toString()), isTrue);
- expect(e.innerHtml.contains(stacktrace.toString()), isFalse);
+ expect(e.innerHtml.contains(ex.toString()), isTrue);
+ expect(e.innerHtml.contains(st.toString()), isFalse);
e.remove();
await e.onRendered.first;
expect(e.children.length, isZero, reason: 'is empty');
});
test('created after attachment (with stacktrace)', () async {
- final NavNotifyExceptionElement e =
- new NavNotifyExceptionElement(exception, stacktrace: stacktrace);
+ final e = new NavNotifyExceptionElement(ex, stacktrace: st);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
- expect(e.innerHtml.contains(exception.toString()), isTrue);
- expect(e.innerHtml.contains(stacktrace.toString()), isTrue);
+ expect(e.innerHtml.contains(ex.toString()), isTrue);
+ expect(e.innerHtml.contains(st.toString()), isTrue);
e.remove();
await e.onRendered.first;
expect(e.children.length, isZero, reason: 'is empty');
@@ -58,7 +54,7 @@
NavNotifyExceptionElement e;
StreamSubscription sub;
setUp(() async {
- e = new NavNotifyExceptionElement(exception, stacktrace: stacktrace);
+ e = new NavNotifyExceptionElement(ex, stacktrace: st);
document.body.append(e);
await e.onRendered.first;
});
@@ -74,9 +70,8 @@
test('onDelete events (DOM)', () async {
sub = e.onDelete.listen(expectAsync((ExceptionDeleteEvent event) {
expect(event, isNotNull, reason: 'event is passed');
- expect(event.exception, equals(exception),
- reason: 'exception is the same');
- expect(event.stacktrace, equals(stacktrace),
+ expect(event.exception, equals(ex), reason: 'exception is the same');
+ expect(event.stacktrace, equals(st),
reason: 'stacktrace is the same');
}, count: 1, reason: 'event is fired'));
e.querySelector('button').click();
@@ -84,9 +79,8 @@
test('onDelete events (code)', () async {
sub = e.onDelete.listen(expectAsync((ExceptionDeleteEvent event) {
expect(event, isNotNull, reason: 'event is passed');
- expect(event.exception, equals(exception),
- reason: 'exception is the same');
- expect(event.stacktrace, equals(stacktrace),
+ expect(event.exception, equals(ex), reason: 'exception is the same');
+ expect(event.stacktrace, equals(st),
reason: 'stacktrace is the same');
}, count: 1, reason: 'event is fired'));
e.delete();
diff --git a/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.dart
index 26c3ada..05b3370 100644
--- a/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/refresh/element_test.dart
@@ -8,34 +8,35 @@
main() {
NavRefreshElement.tag.ensureRegistration();
+
group('instantiation', () {
test('no parameters', () {
- final NavRefreshElement e = new NavRefreshElement();
+ final e = new NavRefreshElement();
expect(e, isNotNull, reason: 'element correctly created');
expect(e.label, isNotNull, reason: 'label is set to default');
expect(e.disabled, isFalse, reason: 'element correctly created');
});
test('label', () {
final label = 'custom-label';
- final NavRefreshElement e = new NavRefreshElement(label: label);
+ final e = new NavRefreshElement(label: label);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.label, isNotNull, reason: 'label is set');
expect(e.label, equals(label), reason: 'label is set to value');
});
test('not disabled', () {
- final NavRefreshElement e = new NavRefreshElement(disabled: false);
+ final e = new NavRefreshElement(disabled: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.disabled, isFalse, reason: 'element correctly created');
});
test('disabled', () {
- final NavRefreshElement e = new NavRefreshElement(disabled: true);
+ final e = new NavRefreshElement(disabled: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.disabled, isTrue, reason: 'element correctly created');
});
});
group('elements', () {
test('created after attachment', () async {
- final NavRefreshElement e = new NavRefreshElement();
+ final e = new NavRefreshElement();
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
@@ -45,7 +46,7 @@
});
test('contain custom label', () async {
final label = 'custom-label';
- final NavRefreshElement e = new NavRefreshElement(label: label);
+ final e = new NavRefreshElement(label: label);
document.body.append(e);
await e.onRendered.first;
expect(e.innerHtml.contains(label), isTrue);
@@ -55,7 +56,7 @@
test('react to label change', () async {
final label1 = 'custom-label-1';
final label2 = 'custom-label-2';
- final NavRefreshElement e = new NavRefreshElement(label: label1);
+ final e = new NavRefreshElement(label: label1);
document.body.append(e);
await e.onRendered.first;
expect(e.innerHtml.contains(label1), isTrue);
@@ -68,7 +69,7 @@
await e.onRendered.first;
});
test('react to disabled change', () async {
- final NavRefreshElement e = new NavRefreshElement(disabled: false);
+ final e = new NavRefreshElement(disabled: false);
document.body.append(e);
await e.onRendered.first;
expect(e.disabled, isFalse);
diff --git a/runtime/observatory/tests/observatory_ui/nav/top-menu/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/top-menu/element_test.dart
index df9f88c..5e62069 100644
--- a/runtime/observatory/tests/observatory_ui/nav/top-menu/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/top-menu/element_test.dart
@@ -9,27 +9,27 @@
main() {
NavTopMenuElement.tag.ensureRegistration();
- final String tag = NavMenuElement.tag.name;
+ final tag = NavMenuElement.tag.name;
group('instantiation', () {
test('default', () {
- final NavTopMenuElement e = new NavTopMenuElement();
+ final e = new NavTopMenuElement();
expect(e, isNotNull, reason: 'element correctly created');
});
test('not last', () {
- final NavTopMenuElement e = new NavTopMenuElement(last: false);
+ final e = new NavTopMenuElement(last: false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.last, isFalse, reason: 'element correctly created');
});
test('last', () {
- final NavTopMenuElement e = new NavTopMenuElement(last: true);
+ final e = new NavTopMenuElement(last: true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.last, isTrue, reason: 'element correctly created');
});
});
group('elements', () {
test('created', () async {
- final NavTopMenuElement e = new NavTopMenuElement();
+ final e = new NavTopMenuElement();
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
@@ -40,7 +40,7 @@
expect(e.shadowRoot.children.length, isZero, reason: 'is empty');
});
test('react to last change', () async {
- final NavTopMenuElement e = new NavTopMenuElement(last: false);
+ final e = new NavTopMenuElement(last: false);
document.body.append(e);
await e.onRendered.first;
expect((e.shadowRoot.querySelector(tag) as NavMenuElement).last, isFalse);
diff --git a/runtime/observatory/tests/observatory_ui/nav/vm_menu/element_test.dart b/runtime/observatory/tests/observatory_ui/nav/vm_menu/element_test.dart
index b0539ff..7aba8ed 100644
--- a/runtime/observatory/tests/observatory_ui/nav/vm_menu/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/nav/vm_menu/element_test.dart
@@ -2,13 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:async';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
-import 'package:observatory/models.dart' as M;
import 'package:observatory/src/elements/nav/menu.dart';
import 'package:observatory/src/elements/nav/menu_item.dart';
import 'package:observatory/src/elements/nav/vm_menu.dart';
+import '../../mocks.dart';
main(){
NavVMMenuElement.tag.ensureRegistration();
@@ -16,35 +14,22 @@
final mTag = NavMenuElement.tag.name;
final miTag = NavMenuItemElement.tag.name;
- StreamController<M.VMUpdateEvent> updatesController;
- final TargetMock target = new TargetMock(name: 'target-name');
- final VMMock vm1 = const VMMock(name: 'vm-name-1',
+ EventRepositoryMock events;
+ final vm1 = const VMMock(name: 'vm-name-1', displayName: 'display-name-1',
isolates: const [const IsolateRefMock(id: 'i-id-1', name: 'i-name-1')]);
- final VMMock vm2 = const VMMock(name: 'vm-name-2',
+ final vm2 = const VMMock(name: 'vm-name-2', displayName: 'display-name-2',
isolates: const [const IsolateRefMock(id: 'i-id-1', name: 'i-name-1'),
const IsolateRefMock(id: 'i-id-2', name: 'i-name-2')]);
setUp(() {
- updatesController = new StreamController<M.VMUpdateEvent>.broadcast();
+ events = new EventRepositoryMock();
});
- group('instantiation', () {
- test('no target', () {
- final NavVMMenuElement e = new NavVMMenuElement(vm1,
- updatesController.stream);
- expect(e, isNotNull, reason: 'element correctly created');
- expect(e.vm, equals(vm1));
- expect(e.target, isNull);
- });
- test('target', () {
- final NavVMMenuElement e = new NavVMMenuElement(vm1,
- updatesController.stream, target: target);
- expect(e, isNotNull, reason: 'element correctly created');
- expect(e.vm, equals(vm1));
- expect(e.target, equals(target));
- });
+ test('instantiation', () {
+ final e = new NavVMMenuElement(vm1, events);
+ expect(e, isNotNull, reason: 'element correctly created');
+ expect(e.vm, equals(vm1));
});
test('elements created after attachment', () async {
- final NavVMMenuElement e = new NavVMMenuElement(vm1,
- updatesController.stream);
+ final e = new NavVMMenuElement(vm1, events);
document.body.append(e);
await e.onRendered.first;
expect(e.shadowRoot.children.length, isNonZero, reason: 'has elements');
@@ -54,29 +39,27 @@
});
group('updates', () {
test('are correctly listen', () async {
- final NavVMMenuElement e = new NavVMMenuElement(vm1,
- updatesController.stream);
- expect(updatesController.hasListener, isFalse);
+ final e = new NavVMMenuElement(vm1, events);
+ expect(events.onVMUpdateHasListener, isFalse);
document.body.append(e);
await e.onRendered.first;
- expect(updatesController.hasListener, isTrue);
+ expect(events.onVMUpdateHasListener, isTrue);
e.remove();
await e.onRendered.first;
- expect(updatesController.hasListener, isFalse);
+ expect(events.onVMUpdateHasListener, isFalse);
});
test('have effects', () async {
- final NavVMMenuElement e = new NavVMMenuElement(vm1,
- updatesController.stream);
+ final e = new NavVMMenuElement(vm1, events);
document.body.append(e);
await e.onRendered.first;
expect((e.shadowRoot.querySelector(mTag) as NavMenuElement).label,
- equals(vm1.name));
+ equals(vm1.displayName));
expect(e.shadowRoot.querySelectorAll(miTag).length,
equals(vm1.isolates.length));
- updatesController.add(new VMUpdateEventMock(vm: vm2));
+ events.add(new VMUpdateEventMock(vm: vm2));
await e.onRendered.first;
expect((e.shadowRoot.querySelector(mTag) as NavMenuElement).label,
- equals(vm2.name));
+ equals(vm2.displayName));
expect(e.shadowRoot.querySelectorAll(miTag).length,
equals(vm2.isolates.length));
e.remove();
diff --git a/runtime/observatory/tests/observatory_ui/script_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/script_ref/element_test.dart
index eda7d49..6dc2b84 100644
--- a/runtime/observatory/tests/observatory_ui/script_ref/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/script_ref/element_test.dart
@@ -3,32 +3,31 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
-import 'package:observatory/models.dart' as M;
import 'package:observatory/src/elements/script_ref.dart';
+import '../mocks.dart';
main() {
ScriptRefElement.tag.ensureRegistration();
- final M.IsolateRef isolate = const IsolateRefMock(id: 'isolate-id');
- final M.ScriptRef ref = const ScriptRefMock(id: 'script-id',
- uri: 'package/filename.dart');
+ const isolate = const IsolateRefMock(id: 'isolate-id');
+ const file = 'filename.dart';
+ const ref = const ScriptRefMock(id: 'script-id', uri: 'package/$file');
group('instantiation', () {
test('no position', () {
- final ScriptRefElement e = new ScriptRefElement(isolate, ref);
+ final e = new ScriptRefElement(isolate, ref);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(isolate));
expect(e.script, equals(ref));
});
});
test('elements created after attachment', () async {
- final ScriptRefElement e = new ScriptRefElement(isolate, ref);
+ final e = new ScriptRefElement(isolate, ref);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
expect(e.innerHtml.contains(isolate.id), isTrue,
reason: 'no message in the component');
- expect(e.innerHtml.contains('filename.dart'), isTrue,
+ expect(e.innerHtml.contains(file), isTrue,
reason: 'no message in the component');
e.remove();
await e.onRendered.first;
diff --git a/runtime/observatory/tests/observatory_ui/source_link/element_test.dart b/runtime/observatory/tests/observatory_ui/source_link/element_test.dart
index 2d4cfba..3dcb5dd 100644
--- a/runtime/observatory/tests/observatory_ui/source_link/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/source_link/element_test.dart
@@ -3,40 +3,41 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
-import 'package:observatory/models.dart' as M;
import 'package:observatory/src/elements/source_link.dart';
+import '../mocks.dart';
main() {
SourceLinkElement.tag.ensureRegistration();
- final M.IsolateRef isolate = const IsolateRefMock(id: 'isolate-id');
- final M.Script script = new ScriptMock(id: 'script-id',
- uri: 'package/filename.dart',
- tokenToLine: (int token) => 1,
- tokenToCol: (int token) => 2);
- final M.SourceLocation location = new SourceLocationMock(script: script,
- tokenPos: 0, endTokenPos: 1);
- M.ScriptRepository repository;
- setUp(() {
- repository = new ScriptRepositoryMock({ 'script-id': script });
- });
+ const isolate = const IsolateRefMock(id: 'isolate-id');
+ const script_id = 'script-id';
+ const file = 'filename.dart';
+ final script = new ScriptMock(id: script_id, uri: 'package/$file',
+ tokenToLine: (int token) => 1, tokenToCol: (int token) => 2);
+ final location = new SourceLocationMock(script: script, tokenPos: 0,
+ endTokenPos: 1);
test('instantiation', () {
- final SourceLinkElement e = new SourceLinkElement(isolate, location,
- repository);
+ final e = new SourceLinkElement(isolate, location,
+ new ScriptRepositoryMock());
expect(e, isNotNull, reason: 'element correctly created');
expect(e.isolate, equals(isolate));
expect(e.location, equals(location));
});
test('elements created after attachment', () async {
- final SourceLinkElement e = new SourceLinkElement(isolate, location,
- repository);
+ bool rendered = false;
+ final e = new SourceLinkElement(isolate, location,
+ new ScriptRepositoryMock(getter: expectAsync((String id) async {
+ expect(rendered, isFalse);
+ expect(id, equals(script_id));
+ return script;
+ }, count: 1)));
document.body.append(e);
await e.onRendered.first;
+ rendered = true;
expect(e.children.length, isNonZero, reason: 'has elements');
expect(e.innerHtml.contains(isolate.id), isTrue,
reason: 'no message in the component');
- expect(e.innerHtml.contains('filename.dart'), isTrue,
+ expect(e.innerHtml.contains(file), isTrue,
reason: 'no message in the component');
e.remove();
await e.onRendered.first;
diff --git a/runtime/observatory/tests/observatory_ui/view_footer/element_test.dart b/runtime/observatory/tests/observatory_ui/view_footer/element_test.dart
index f3ab727..143464e 100644
--- a/runtime/observatory/tests/observatory_ui/view_footer/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/view_footer/element_test.dart
@@ -9,11 +9,11 @@
ViewFooterElement.tag.ensureRegistration();
test('instantiation', () {
- final ViewFooterElement e = new ViewFooterElement();
+ final e = new ViewFooterElement();
expect(e, isNotNull, reason: 'element correctly created');
});
test('elements created', () async {
- final ViewFooterElement e = new ViewFooterElement();
+ final e = new ViewFooterElement();
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart b/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
index 15a853ca..270e0d5 100644
--- a/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
@@ -3,31 +3,30 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
-import 'package:observatory/models.dart' as M;
import 'package:observatory/src/elements/nav/notify.dart';
import 'package:observatory/src/elements/vm_connect_target.dart';
import 'package:observatory/src/elements/vm_connect.dart';
+import '../mocks.dart';
+
+void load(_) {}
main() {
VMConnectElement.tag.ensureRegistration();
- final String nTag = NavNotifyElement.tag.name;
- final String tTag = VMConnectTargetElement.tag.name;
+ final nTag = NavNotifyElement.tag.name;
+ final tTag = VMConnectTargetElement.tag.name;
group('instantiation', () {
test('default', () {
- final VMConnectElement e = new VMConnectElement(
- new TargetRepositoryMock(),
- new CrashDumpRepositoryMock(),
- new NotificationRepositoryMock());
+ final e = new VMConnectElement(new TargetRepositoryMock(),
+ load, new NotificationRepositoryMock());
expect(e, isNotNull, reason: 'element correctly created');
});
});
test('is correctly listening', () async {
final targets = new TargetRepositoryMock();
- final VMConnectElement e = new VMConnectElement(targets,
- new CrashDumpRepositoryMock(), new NotificationRepositoryMock());
+ final e = new VMConnectElement(targets, load,
+ new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
expect(targets.hasListeners, isTrue, reason: 'is listening');
@@ -40,8 +39,8 @@
final targets = new TargetRepositoryMock(list: const [
const TargetMock(name: 't-1'), const TargetMock(name: 't-2'),
]);
- final VMConnectElement e = new VMConnectElement(targets,
- new CrashDumpRepositoryMock(), new NotificationRepositoryMock());
+ final e = new VMConnectElement(targets, load,
+ new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
expect(targets.listInvoked, isTrue, reason: 'should invoke list()');
@@ -54,10 +53,10 @@
expect(e.children.length, isZero, reason: 'is empty');
});
test('react to update event', () async {
- final list = <M.Target>[const TargetMock(name: 't-1')];
+ final list = <TargetMock>[const TargetMock(name: 't-1')];
final targets = new TargetRepositoryMock(list: list);
- final VMConnectElement e = new VMConnectElement(targets,
- new CrashDumpRepositoryMock(), new NotificationRepositoryMock());
+ final e = new VMConnectElement(targets, load,
+ new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
expect(e.querySelectorAll(tTag).length, equals(1));
@@ -73,14 +72,13 @@
group('invokes', () {
test('add on click', () async {
final address = 'ws://host:1234';
- final list = <M.Target>[const TargetMock(name: 't-1')];
+ final list = <TargetMock>[const TargetMock(name: 't-1')];
final targets = new TargetRepositoryMock(list: list,
add: expectAsync((String val) {
expect(val, equals(address));
}, count: 1, reason: 'should be invoked'));
- final VMConnectElement e = new VMConnectElement(targets,
- new CrashDumpRepositoryMock(), new NotificationRepositoryMock(),
- address: address);
+ final e = new VMConnectElement(targets, load,
+ new NotificationRepositoryMock(), address: address);
document.body.append(e);
await e.onRendered.first;
(e.querySelector('button.vm_connect') as ButtonElement).click();
@@ -88,13 +86,13 @@
await e.onRendered.first;
});
test('connect', () async {
- final list = <M.Target>[const TargetMock(name: 't-1')];
+ final list = <TargetMock>[const TargetMock(name: 't-1')];
final targets = new TargetRepositoryMock(list: list,
- setCurrent: expectAsync((M.Target t) {
+ setCurrent: expectAsync((TargetMock t) {
expect(t, equals(list[0]));
}, count: 1, reason: 'should be invoked'));
- final VMConnectElement e = new VMConnectElement(targets,
- new CrashDumpRepositoryMock(), new NotificationRepositoryMock());
+ final e = new VMConnectElement(targets, load,
+ new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
(e.querySelector(tTag) as VMConnectTargetElement).connect();
@@ -102,13 +100,13 @@
await e.onRendered.first;
});
test('delete', () async {
- final list = <M.Target>[const TargetMock(name: 't-1')];
+ final list = <TargetMock>[const TargetMock(name: 't-1')];
final targets = new TargetRepositoryMock(list: list,
- delete: expectAsync((M.Target t) {
+ delete: expectAsync((TargetMock t) {
expect(t, equals(list[0]));
}, count: 1, reason: 'should be invoked'));
- final VMConnectElement e = new VMConnectElement(targets,
- new CrashDumpRepositoryMock(), new NotificationRepositoryMock());
+ final e = new VMConnectElement(targets, load,
+ new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
(e.querySelector(tTag) as VMConnectTargetElement).delete();
diff --git a/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart b/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart
index a4340e8..45efab6 100644
--- a/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
-import 'package:observatory/mocks.dart';
import 'package:observatory/src/elements/vm_connect_target.dart';
+import '../mocks.dart';
main() {
VMConnectTargetElement.tag.ensureRegistration();
@@ -15,28 +15,26 @@
});
group('instantiation', () {
test('no other parameters', () {
- final VMConnectTargetElement e = new VMConnectTargetElement(t);
+ final e = new VMConnectTargetElement(t);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.target, t, reason: 'target not setted');
expect(e.current, isFalse, reason: 'default to not current');
});
test('isCurrent: false', () {
- final VMConnectTargetElement e = new VMConnectTargetElement(t,
- current:false);
+ final e = new VMConnectTargetElement(t, current:false);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.target, t, reason: 'target not setted');
expect(e.current, isFalse, reason: 'default to not current');
});
test('isCurrent: true', () {
- final VMConnectTargetElement e = new VMConnectTargetElement(t,
- current:true);
+ final e = new VMConnectTargetElement(t, current:true);
expect(e, isNotNull, reason: 'element correctly created');
expect(e.target, t, reason: 'target not setted');
expect(e.current, isTrue, reason: 'default to not current');
});
});
test('elements created after attachment', () async {
- final VMConnectTargetElement e = new VMConnectTargetElement(t);
+ final e = new VMConnectTargetElement(t);
document.body.append(e);
await e.onRendered.first;
expect(e.children.length, isNonZero, reason: 'has elements');
diff --git a/runtime/observatory/tests/service/debugger_inspect_test.dart b/runtime/observatory/tests/service/debugger_inspect_test.dart
index 1f7fe31..269a123 100644
--- a/runtime/observatory/tests/service/debugger_inspect_test.dart
+++ b/runtime/observatory/tests/service/debugger_inspect_test.dart
@@ -26,7 +26,7 @@
var subscription;
subscription = stream.listen((ServiceEvent event) {
if (event.kind == ServiceEvent.kInspect) {
- expect((event.inspectee as Instance).clazz.name, equals('Point'));
+ expect(event.inspectee.clazz.name, equals('Point'));
subscription.cancel();
completer.complete();
}
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 32dc967..52aaa44 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -2595,7 +2595,8 @@
ASSERT(heap() != NULL);
thread->heap_ = heap();
thread->set_os_thread(os_thread);
- ASSERT(thread->execution_state() == Thread::kThreadInVM);
+ ASSERT(thread->execution_state() == Thread::kThreadInNative);
+ thread->set_execution_state(Thread::kThreadInVM);
thread->set_safepoint_state(0);
thread->set_vm_tag(VMTag::kVMTagId);
ASSERT(thread->no_safepoint_scope_depth() == 0);
@@ -2646,8 +2647,8 @@
thread->isolate_ = NULL;
thread->heap_ = NULL;
thread->set_os_thread(NULL);
- thread->set_execution_state(Thread::kThreadInVM);
- thread->set_safepoint_state(0);
+ thread->set_execution_state(Thread::kThreadInNative);
+ thread->set_safepoint_state(Thread::SetAtSafepoint(true, 0));
thread->clear_pending_functions();
ASSERT(thread->no_safepoint_scope_depth() == 0);
// Return thread structure.
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index e635a7b..0957f6f 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -442,6 +442,7 @@
if (!modified_libs_->Contains(root_lib.index())) {
ASSERT(modified_libs_->IsEmpty());
reload_skipped_ = true;
+ ReportOnJSON(js_);
TIR_Print("---- SKIPPING RELOAD (No libraries were modified)\n");
return;
}
@@ -596,14 +597,20 @@
void IsolateReloadContext::ReportOnJSON(JSONStream* stream) {
- // Clear the buffer.
- stream->buffer()->Clear();
JSONObject jsobj(stream);
jsobj.AddProperty("type", "ReloadReport");
- jsobj.AddProperty("success", !HasReasonsForCancelling());
+ jsobj.AddProperty("success", reload_skipped_ || !HasReasonsForCancelling());
{
JSONObject details(&jsobj, "details");
- if (HasReasonsForCancelling()) {
+ if (reload_skipped_) {
+ // Reload was skipped.
+ const GrowableObjectArray& libs =
+ GrowableObjectArray::Handle(object_store()->libraries());
+ const intptr_t final_library_count = libs.Length();
+ details.AddProperty("savedLibraryCount", final_library_count);
+ details.AddProperty("loadedLibraryCount", static_cast<intptr_t>(0));
+ details.AddProperty("finalLibraryCount", final_library_count);
+ } else if (HasReasonsForCancelling()) {
// Reload was rejected.
JSONArray array(&jsobj, "notices");
for (intptr_t i = 0; i < reasons_to_cancel_reload_.length(); i++) {
@@ -1359,8 +1366,12 @@
void IsolateReloadContext::ResetUnoptimizedICsOnStack() {
- Code& code = Code::Handle();
- Function& function = Function::Handle();
+ Thread* thread = Thread::Current();
+ StackZone stack_zone(thread);
+ Zone* zone = stack_zone.GetZone();
+
+ Code& code = Code::Handle(zone);
+ Function& function = Function::Handle(zone);
DartFrameIterator iterator;
StackFrame* frame = iterator.NextFrame();
while (frame != NULL) {
@@ -1372,9 +1383,9 @@
function = code.function();
code = function.unoptimized_code();
ASSERT(!code.IsNull());
- code.ResetICDatas();
+ code.ResetICDatas(zone);
} else {
- code.ResetICDatas();
+ code.ResetICDatas(zone);
}
frame = iterator.NextFrame();
}
@@ -1393,13 +1404,15 @@
class MarkFunctionsForRecompilation : public ObjectVisitor {
public:
MarkFunctionsForRecompilation(Isolate* isolate,
- IsolateReloadContext* reload_context)
+ IsolateReloadContext* reload_context,
+ Zone* zone)
: ObjectVisitor(),
- handle_(Object::Handle()),
- owning_class_(Class::Handle()),
- owning_lib_(Library::Handle()),
- code_(Code::Handle()),
- reload_context_(reload_context) {
+ handle_(Object::Handle(zone)),
+ owning_class_(Class::Handle(zone)),
+ owning_lib_(Library::Handle(zone)),
+ code_(Code::Handle(zone)),
+ reload_context_(reload_context),
+ zone_(zone) {
}
virtual void VisitObject(RawObject* obj) {
@@ -1453,7 +1466,7 @@
ASSERT(!code_.IsNull());
// We are preserving the unoptimized code, fill all ICData arrays with
// the sentinel values so that we have no stale type feedback.
- code_.ResetICDatas();
+ code_.ResetICDatas(zone_);
}
bool IsFromDirtyLibrary(const Function& func) {
@@ -1467,15 +1480,19 @@
Library& owning_lib_;
Code& code_;
IsolateReloadContext* reload_context_;
+ Zone* zone_;
};
void IsolateReloadContext::MarkAllFunctionsForRecompilation() {
TIMELINE_SCOPE(MarkAllFunctionsForRecompilation);
TIR_Print("---- MARKING ALL FUNCTIONS FOR RECOMPILATION\n");
+ Thread* thread = Thread::Current();
+ StackZone stack_zone(thread);
+ Zone* zone = stack_zone.GetZone();
NoSafepointScope no_safepoint;
HeapIterationScope heap_iteration_scope;
- MarkFunctionsForRecompilation visitor(isolate_, this);
+ MarkFunctionsForRecompilation visitor(isolate_, this, zone);
isolate_->heap()->VisitObjects(&visitor);
}
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index 070897e..b6a6c98 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -1487,6 +1487,354 @@
}
+TEST_CASE(IsolateReload_DanglingGetter_Instance) {
+ const char* kScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class C {\n"
+ " var x = 3;\n"
+ " var y = 4;\n"
+ "}\n"
+ "invoke(f) {\n"
+ " try {\n"
+ " return f();\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " var c = new C();\n"
+ " var f = c#y;\n"
+ " var r1 = invoke(f);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+
+ const char* kReloadScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class C {\n"
+ " var x = 3;\n"
+ "}\n"
+ "invoke(f) {\n"
+ " try {\n"
+ " return f();\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " var c = new C();\n"
+ " var f = c#y;\n"
+ " var r1 = invoke(f);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ TestCase::SetReloadTestScript(kReloadScript);
+
+ EXPECT_STREQ("4 Class 'C' has no instance getter 'y'.",
+ SimpleInvokeStr(lib, "main"));
+
+ lib = TestCase::GetReloadErrorOrRootLibrary();
+ EXPECT_VALID(lib);
+}
+
+
+TEST_CASE(IsolateReload_DanglingGetter_Class) {
+ const char* kScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class C {\n"
+ " static var x;\n"
+ " static var y;\n"
+ "}\n"
+ "invoke(f) {\n"
+ " try {\n"
+ " return f();\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " C.x = 3;\n"
+ " C.y = 4;\n"
+ " var f = C#y;\n"
+ " var r1 = invoke(f);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+
+ const char* kReloadScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class C {\n"
+ " static var x;\n"
+ "}\n"
+ "invoke(f) {\n"
+ " try {\n"
+ " return f();\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " C.x = 3;\n"
+ " C.y = 4;\n"
+ " var f = C#y;\n"
+ " var r1 = invoke(f);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ TestCase::SetReloadTestScript(kReloadScript);
+
+ EXPECT_STREQ("4 No static getter 'y' declared in class 'C'.",
+ SimpleInvokeStr(lib, "main"));
+
+ lib = TestCase::GetReloadErrorOrRootLibrary();
+ EXPECT_VALID(lib);
+}
+
+
+static void IsolateReload_DanlingGetter_LibraryReload(
+ Dart_NativeArguments native_args) {
+ const char* kImportScript2 =
+ "var x;\n";
+ TestCase::AddTestLib("test:other", kImportScript2);
+
+ DART_CHECK_VALID(TestCase::TriggerReload());
+}
+
+
+static Dart_NativeFunction IsolateReload_DanlingGetter_LibraryNativeResolver(
+ Dart_Handle name,
+ int num_of_arguments,
+ bool* auto_setup_scope) {
+ return IsolateReload_DanlingGetter_LibraryReload;
+}
+
+
+TEST_CASE(IsolateReload_DanglingGetter_Library) {
+ const char* kImportScript =
+ "var x;\n"
+ "var y;\n";
+ TestCase::AddTestLib("test:other", kImportScript);
+
+ const char* kScript =
+ "import 'test:other' as prefix;\n"
+ "reloadTest() native 'ReloadTest';\n"
+ "invoke(f) {\n"
+ " try {\n"
+ " return f();\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " prefix.x = 3;\n"
+ " prefix.y = 4;\n"
+ " var f = prefix#y;\n"
+ " var r1 = invoke(f);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ Dart_Handle lib = TestCase::LoadTestScript(
+ kScript, IsolateReload_DanlingGetter_LibraryNativeResolver);
+ EXPECT_VALID(lib);
+
+ TestCase::SetReloadTestScript(kScript); // Root library does not change.
+
+ EXPECT_STREQ("4 No top-level getter 'y' declared.",
+ SimpleInvokeStr(lib, "main"));
+
+ lib = TestCase::GetReloadErrorOrRootLibrary();
+ EXPECT_VALID(lib);
+}
+
+
+TEST_CASE(IsolateReload_DanglingSetter_Instance) {
+ const char* kScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class C {\n"
+ " var x = 3;\n"
+ " var y = 4;\n"
+ "}\n"
+ "invoke(f, a) {\n"
+ " try {\n"
+ " return f(a);\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " var c = new C();\n"
+ " var f = c#y=;\n"
+ " var r1 = invoke(f, 5);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f, 6);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+
+ const char* kReloadScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class C {\n"
+ " var x = 3;\n"
+ "}\n"
+ "invoke(f, a) {\n"
+ " try {\n"
+ " return f(a);\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " var c = new C();\n"
+ " var f = c#y=;\n"
+ " var r1 = invoke(f, 5);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f, 6);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ TestCase::SetReloadTestScript(kReloadScript);
+
+ EXPECT_STREQ("null Class 'C' has no instance setter 'y='.",
+ SimpleInvokeStr(lib, "main"));
+
+ lib = TestCase::GetReloadErrorOrRootLibrary();
+ EXPECT_VALID(lib);
+}
+
+
+TEST_CASE(IsolateReload_DanglingSetter_Class) {
+ const char* kScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class C {\n"
+ " static var x;\n"
+ " static var y;\n"
+ "}\n"
+ "invoke(f, a) {\n"
+ " try {\n"
+ " return f(a);\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " C.x = 3;\n"
+ " C.y = 4;\n"
+ " var f = C#y=;\n"
+ " var r1 = invoke(f, 5);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f, 6);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+
+ const char* kReloadScript =
+ "import 'test:isolate_reload_helper';\n"
+ "class C {\n"
+ " static var x;\n"
+ "}\n"
+ "invoke(f, a) {\n"
+ " try {\n"
+ " return f(a);\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " C.x = 3;\n"
+ " C.y = 4;\n"
+ " var f = C#y=;\n"
+ " var r1 = invoke(f, 5);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f, 6);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ TestCase::SetReloadTestScript(kReloadScript);
+
+ EXPECT_STREQ("5 No static setter 'y=' declared in class 'C'.",
+ SimpleInvokeStr(lib, "main"));
+
+ lib = TestCase::GetReloadErrorOrRootLibrary();
+ EXPECT_VALID(lib);
+}
+
+
+static void IsolateReload_DanlingSetter_LibraryReload(
+ Dart_NativeArguments native_args) {
+ const char* kImportScript2 =
+ "var x;\n";
+ TestCase::AddTestLib("test:other", kImportScript2);
+
+ DART_CHECK_VALID(TestCase::TriggerReload());
+}
+
+
+static Dart_NativeFunction IsolateReload_DanlingSetter_LibraryNativeResolver(
+ Dart_Handle name,
+ int num_of_arguments,
+ bool* auto_setup_scope) {
+ return IsolateReload_DanlingSetter_LibraryReload;
+}
+
+
+TEST_CASE(IsolateReload_DanglingSetter_Library) {
+ const char* kImportScript =
+ "var x;\n"
+ "var y;\n";
+ TestCase::AddTestLib("test:other", kImportScript);
+
+ const char* kScript =
+ "import 'test:other' as prefix;\n"
+ "reloadTest() native 'ReloadTest';\n"
+ "invoke(f, a) {\n"
+ " try {\n"
+ " return f(a);\n"
+ " } catch (e) {\n"
+ " return e.toString().split('\\n').first;\n"
+ " }\n"
+ "}\n"
+ "main() {\n"
+ " prefix.x = 3;\n"
+ " prefix.y = 4;\n"
+ " var f = prefix#y=;\n"
+ " var r1 = invoke(f, 5);\n"
+ " reloadTest();\n"
+ " var r2 = invoke(f, 6);\n"
+ " return '$r1 $r2';\n"
+ "}\n";
+
+ Dart_Handle lib = TestCase::LoadTestScript(
+ kScript, IsolateReload_DanlingSetter_LibraryNativeResolver);
+ EXPECT_VALID(lib);
+
+ TestCase::SetReloadTestScript(kScript); // Root library does not change.
+
+ EXPECT_STREQ("5 No top-level setter 'y=' declared.",
+ SimpleInvokeStr(lib, "main"));
+
+ lib = TestCase::GetReloadErrorOrRootLibrary();
+ EXPECT_VALID(lib);
+}
+
+
TEST_CASE(IsolateReload_EnumEquality) {
const char* kScript =
"enum Fruit {\n"
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index 5e5f685..80cfbbf 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -64,6 +64,7 @@
should_pause_on_exit_(false),
is_paused_on_start_(false),
is_paused_on_exit_(false),
+ delete_me_(false),
paused_timestamp_(-1),
pool_(NULL),
task_(NULL),
@@ -78,6 +79,10 @@
MessageHandler::~MessageHandler() {
delete queue_;
delete oob_queue_;
+ queue_ = NULL;
+ oob_queue_ = NULL;
+ pool_ = NULL;
+ task_ = NULL;
}
@@ -110,6 +115,7 @@
name());
}
ASSERT(pool_ == NULL);
+ ASSERT(!delete_me_);
pool_ = pool;
start_callback_ = start_callback;
end_callback_ = end_callback;
@@ -148,6 +154,7 @@
message = NULL; // Do not access message. May have been deleted.
if ((pool_ != NULL) && (task_ == NULL)) {
+ ASSERT(!delete_me_);
task_ = new MessageHandlerTask(this);
task_running = pool_->Run(task_);
}
@@ -251,6 +258,7 @@
// assigned to a thread pool.
MonitorLocker ml(&monitor_);
ASSERT(pool_ == NULL);
+ ASSERT(!delete_me_);
#if defined(DEBUG)
CheckAccess();
#endif
@@ -263,6 +271,7 @@
// assigned to a thread pool.
MonitorLocker ml(&monitor_);
ASSERT(pool_ == NULL);
+ ASSERT(!delete_me_);
#if defined(DEBUG)
CheckAccess();
#endif
@@ -275,6 +284,7 @@
return kOK;
}
MonitorLocker ml(&monitor_);
+ ASSERT(!delete_me_);
#if defined(DEBUG)
CheckAccess();
#endif
@@ -316,6 +326,7 @@
ASSERT(Isolate::Current() == NULL);
MessageStatus status = kOK;
bool run_end_callback = false;
+ bool delete_me = false;
{
// We will occasionally release and reacquire this monitor in this
// function. Whenever we reacquire the monitor we *must* process
@@ -395,6 +406,7 @@
}
pool_ = NULL;
run_end_callback = true;
+ delete_me = delete_me_;
}
// Clear the task_ last. This allows other tasks to potentially start
@@ -402,10 +414,17 @@
ASSERT(oob_queue_->IsEmpty());
task_ = NULL;
}
+
+ // Message handlers either use delete_me or end_callback but not both.
+ ASSERT(!delete_me || end_callback_ == NULL);
+
if (run_end_callback && end_callback_ != NULL) {
end_callback_(callback_data_);
// The handler may have been deleted after this point.
}
+ if (delete_me) {
+ delete this;
+ }
}
@@ -433,6 +452,22 @@
}
+void MessageHandler::RequestDeletion() {
+ ASSERT(OwnedByPortMap());
+ {
+ MonitorLocker ml(&monitor_);
+ if (task_ != NULL) {
+ // This message handler currently has a task running on the thread pool.
+ delete_me_ = true;
+ return;
+ }
+ }
+
+ // This message handler has no current task. Delete it.
+ delete this;
+}
+
+
void MessageHandler::increment_live_ports() {
MonitorLocker ml(&monitor_);
#if defined(DEBUG)
diff --git a/runtime/vm/message_handler.h b/runtime/vm/message_handler.h
index c52431d..825e3d3 100644
--- a/runtime/vm/message_handler.h
+++ b/runtime/vm/message_handler.h
@@ -187,6 +187,10 @@
// This is used to delete handlers when their last live port is closed.
virtual bool OwnedByPortMap() const { return false; }
+ // Requests deletion of this message handler when the next task
+ // completes.
+ void RequestDeletion();
+
void increment_live_ports();
void decrement_live_ports();
// ------------ END PortMap API ------------
@@ -241,6 +245,7 @@
bool should_pause_on_exit_;
bool is_paused_on_start_;
bool is_paused_on_exit_;
+ bool delete_me_;
int64_t paused_timestamp_;
ThreadPool* pool_;
ThreadPool::Task* task_;
diff --git a/runtime/vm/native_api_impl.cc b/runtime/vm/native_api_impl.cc
index 1bc5d4c..7abd52e 100644
--- a/runtime/vm/native_api_impl.cc
+++ b/runtime/vm/native_api_impl.cc
@@ -90,6 +90,7 @@
NativeMessageHandler* nmh = new NativeMessageHandler(name, handler);
Dart_Port port_id = PortMap::CreatePort(nmh);
+ PortMap::SetPortState(port_id, PortMap::kLivePort);
nmh->Run(Dart::thread_pool(), NULL, NULL, 0);
return port_id;
}
diff --git a/runtime/vm/native_message_handler.cc b/runtime/vm/native_message_handler.cc
index 7779e95..1763341 100644
--- a/runtime/vm/native_message_handler.cc
+++ b/runtime/vm/native_message_handler.cc
@@ -15,8 +15,6 @@
Dart_NativeMessageHandler func)
: name_(strdup(name)),
func_(func) {
- // A NativeMessageHandler always has one live port.
- increment_live_ports();
}
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 0506fa7..0886a30 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -12973,10 +12973,6 @@
}
-void ICData::ValidateSentinelLocations() const {
-}
-
-
void ICData::AddReceiverCheck(intptr_t receiver_class_id,
const Function& target,
intptr_t count) const {
@@ -13416,12 +13412,10 @@
}
-RawArray* ICData::NewEmptyICDataArray(intptr_t num_args_tested) {
+RawArray* ICData::CachedEmptyICDataArray(intptr_t num_args_tested) {
ASSERT(num_args_tested >= 0);
- if (num_args_tested < kCachedICDataArrayCount) {
- return cached_icdata_arrays_[num_args_tested];
- }
- return NewNonCachedEmptyICDataArray(num_args_tested);
+ ASSERT(num_args_tested < kCachedICDataArrayCount);
+ return cached_icdata_arrays_[num_args_tested];
}
@@ -13468,16 +13462,6 @@
}
-void ICData::ResetData() const {
- // Number of array elements in one test entry.
- intptr_t len = TestEntryLength();
- // IC data array must be null terminated (sentinel entry).
- const Array& ic_data = Array::Handle(Array::New(len, Heap::kOld));
- set_ic_data_array(ic_data);
- WriteSentinel(ic_data, len);
-}
-
-
RawICData* ICData::New() {
ICData& result = ICData::Handle();
{
@@ -13513,7 +13497,7 @@
num_args_tested,
is_static_call));
result.set_ic_data_array(
- Array::Handle(zone, NewEmptyICDataArray(num_args_tested)));
+ Array::Handle(zone, CachedEmptyICDataArray(num_args_tested)));
return result.raw();
}
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index e9c9280..6be932d 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1853,8 +1853,7 @@
bool IsImmutable() const;
- void Reset() const;
- void ResetData() const;
+ void Reset(Zone* zone) const;
// Note: only deopts with reasons before Unknown in this list are recorded in
// the ICData. All other reasons are used purely for informational messages
@@ -1960,7 +1959,6 @@
RawArray* FindFreeIndex(intptr_t* index) const;
void DebugDump() const;
- void ValidateSentinelLocations() const;
// Returns true if this is a two arg smi operation.
bool AddSmiSmiCheckForFastSmiStubs() const;
@@ -2133,7 +2131,7 @@
intptr_t TestEntryLength() const;
static RawArray* NewNonCachedEmptyICDataArray(intptr_t num_args_tested);
- static RawArray* NewEmptyICDataArray(intptr_t num_args_tested);
+ static RawArray* CachedEmptyICDataArray(intptr_t num_args_tested);
static RawICData* NewDescriptor(Zone* zone,
const Function& owner,
const String& target_name,
@@ -4504,7 +4502,7 @@
// Used during reloading (see object_reload.cc). Calls Reset on all ICDatas
// that are embedded inside the Code object.
- void ResetICDatas() const;
+ void ResetICDatas(Zone* zone) const;
TokenPosition GetTokenPositionAt(intptr_t offset) const;
diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc
index ec79c6b..31fdfed 100644
--- a/runtime/vm/object_reload.cc
+++ b/runtime/vm/object_reload.cc
@@ -57,7 +57,7 @@
}
-void Code::ResetICDatas() const {
+void Code::ResetICDatas(Zone* zone) const {
// Iterate over the Code's object pool and reset all ICDatas.
#ifdef TARGET_ARCH_IA32
// IA32 does not have an object pool, but, we can iterate over all
@@ -65,10 +65,10 @@
if (!is_alive()) {
return;
}
- const Instructions& instrs = Instructions::Handle(instructions());
+ const Instructions& instrs = Instructions::Handle(zone, instructions());
ASSERT(!instrs.IsNull());
uword base_address = instrs.EntryPoint();
- Object& object = Object::Handle();
+ Object& object = Object::Handle(zone);
intptr_t offsets_length = pointer_offsets_length();
const int32_t* offsets = raw_ptr()->data();
for (intptr_t i = 0; i < offsets_length; i++) {
@@ -81,12 +81,12 @@
}
object = raw_object;
if (object.IsICData()) {
- ICData::Cast(object).Reset();
+ ICData::Cast(object).Reset(zone);
}
}
#else
- const ObjectPool& pool = ObjectPool::Handle(object_pool());
- Object& object = Object::Handle();
+ const ObjectPool& pool = ObjectPool::Handle(zone, object_pool());
+ Object& object = Object::Handle(zone);
ASSERT(!pool.IsNull());
for (intptr_t i = 0; i < pool.Length(); i++) {
ObjectPool::EntryType entry_type = pool.InfoAt(i);
@@ -95,7 +95,7 @@
}
object = pool.ObjectAt(i);
if (object.IsICData()) {
- ICData::Cast(object).Reset();
+ ICData::Cast(object).Reset(zone);
}
}
#endif
@@ -679,24 +679,24 @@
static const Function* static_call_target = NULL;
-void ICData::Reset() const {
+void ICData::Reset(Zone* zone) const {
if (is_static_call()) {
- const Function& old_target = Function::Handle(GetTargetAt(0));
+ const Function& old_target = Function::Handle(zone, GetTargetAt(0));
if (old_target.IsNull()) {
FATAL("old_target is NULL.\n");
}
static_call_target = &old_target;
- const String& selector = String::Handle(old_target.name());
- Function& new_target = Function::Handle();
+ const String& selector = String::Handle(zone, old_target.name());
+ Function& new_target = Function::Handle(zone);
if (!old_target.is_static()) {
if (old_target.kind() == RawFunction::kConstructor) {
return; // Super constructor call.
}
- Function& caller = Function::Handle();
+ Function& caller = Function::Handle(zone);
caller ^= Owner();
ASSERT(!caller.is_static());
- Class& cls = Class::Handle(caller.Owner());
+ Class& cls = Class::Handle(zone, caller.Owner());
if (cls.raw() == old_target.Owner()) {
// Dispatcher.
if (caller.IsImplicitClosureFunction()) {
@@ -707,7 +707,7 @@
return;
}
const Function& caller_parent =
- Function::Handle(caller.parent_function());
+ Function::Handle(zone, caller.parent_function());
if (!caller_parent.IsNull()) {
if (caller_parent.kind() == RawFunction::kInvokeFieldDispatcher) {
return; // Call-through-getter.
@@ -730,23 +730,30 @@
}
} else {
// This can be incorrect if the call site was an unqualified invocation.
- const Class& cls = Class::Handle(old_target.Owner());
+ const Class& cls = Class::Handle(zone, old_target.Owner());
new_target = cls.LookupStaticFunction(selector);
}
- const Array& args_desc_array = Array::Handle(arguments_descriptor());
+ const Array& args_desc_array = Array::Handle(zone, arguments_descriptor());
ArgumentsDescriptor args_desc(args_desc_array);
if (new_target.IsNull() ||
!new_target.AreValidArguments(args_desc, NULL)) {
// TODO(rmacnak): Patch to a NSME stub.
VTIR_Print("Cannot rebind static call to %s from %s\n",
old_target.ToCString(),
- Object::Handle(Owner()).ToCString());
+ Object::Handle(zone, Owner()).ToCString());
return;
}
ClearAndSetStaticTarget(new_target);
} else {
- ClearWithSentinel();
+ intptr_t num_args = NumArgsTested();
+ if (num_args == 2) {
+ ClearWithSentinel();
+ } else {
+ const Array& data_array =
+ Array::Handle(zone, CachedEmptyICDataArray(num_args));
+ set_ic_data_array(data_array);
+ }
}
}
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 7eab800..84708d7 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -1135,15 +1135,15 @@
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
jsobj.AddProperty("kind", "Type");
- if (IsCanonical()) {
+ if (HasResolvedTypeClass()) {
const Class& type_cls = Class::Handle(type_class());
if (type_cls.CanonicalType() == raw()) {
intptr_t cid = type_cls.id();
jsobj.AddFixedServiceId("classes/%" Pd "/types/%d", cid, 0);
- jsobj.AddProperty("typeClass", type_cls);
} else {
jsobj.AddServiceId(*this);
}
+ jsobj.AddProperty("typeClass", type_cls);
} else {
jsobj.AddServiceId(*this);
}
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index fc3e0f9..8626a5f 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -48,6 +48,8 @@
// committed to the current version.
DEFINE_FLAG(bool, conditional_directives, true,
"Enable conditional directives");
+DEFINE_FLAG(bool, initializing_formal_access, false,
+ "Make initializing formal parameters visible in initializer list.");
DEFINE_FLAG(bool, warn_super, false,
"Warning if super initializer not last in initializer list.");
DEFINE_FLAG(bool, await_is_keyword, false,
@@ -697,12 +699,23 @@
for (int i = 0; i < num_params; i++) {
ParamDesc& param = (*parameters)[i];
ASSERT(param.var != NULL);
- if (!param.is_field_initializer) {
+ if (FLAG_initializing_formal_access || !param.is_field_initializer) {
param.var->set_invisible(invisible);
}
}
}
+ void HideInitFormals() {
+ const intptr_t num_params = parameters->length();
+ for (int i = 0; i < num_params; i++) {
+ ParamDesc& param = (*parameters)[i];
+ if (param.is_field_initializer) {
+ ASSERT(param.var != NULL);
+ param.var->set_invisible(true);
+ }
+ }
+ }
+
void SetImplicitlyFinal() {
implicitly_final = true;
}
@@ -1548,32 +1561,14 @@
&Object::dynamic_type());
const Function& parent = Function::Handle(func.parent_function());
- const String& target_name = String::Handle(parent.name());
- const Class& owner = Class::Handle(parent.Owner());
- Function& target = Function::ZoneHandle(owner.LookupFunction(target_name));
- if (target.raw() != parent.raw()) {
- ASSERT(Isolate::Current()->HasAttemptedReload());
- if (target.IsNull() ||
- (target.is_static() != parent.is_static()) ||
- (target.kind() != parent.kind())) {
- // TODO(26977): call noSuchMethod/throw NSME instead.
- target = parent.raw();
- }
- }
-
- if (target.IsImplicitSetterFunction()) {
+ if (parent.IsImplicitSetterFunction()) {
const TokenPosition ident_pos = func.token_pos();
ASSERT(IsIdentifier());
- const String& field_name = *CurrentLiteral();
- const Class& field_class = Class::ZoneHandle(Z, target.Owner());
- const Field& field =
- Field::ZoneHandle(Z, field_class.LookupInstanceField(field_name));
- const AbstractType& field_type = AbstractType::ZoneHandle(Z, field.type());
params.AddFinalParameter(ident_pos,
&Symbols::Value(),
- &field_type);
+ &Object::dynamic_type());
ASSERT(func.num_fixed_parameters() == 2); // closure, value.
- } else if (!target.IsGetterFunction() && !target.IsImplicitGetterFunction()) {
+ } else if (!parent.IsGetterFunction() && !parent.IsImplicitGetterFunction()) {
const bool allow_explicit_default_values = true;
SkipFunctionPreamble();
ParseFormalParameterList(allow_explicit_default_values, false, ¶ms);
@@ -1604,7 +1599,71 @@
}
func_args->set_names(arg_names);
}
- StaticCallNode* call = new StaticCallNode(token_pos, target, func_args);
+
+ const String& func_name = String::ZoneHandle(parent.name());
+ const Class& owner = Class::Handle(parent.Owner());
+ Function& target = Function::ZoneHandle(owner.LookupFunction(func_name));
+ if (target.raw() != parent.raw()) {
+ ASSERT(Isolate::Current()->HasAttemptedReload());
+ if (target.IsNull() ||
+ (target.is_static() != parent.is_static()) ||
+ (target.kind() != parent.kind())) {
+ target = Function::null();
+ }
+ }
+
+ AstNode* call = NULL;
+ if (!target.IsNull()) {
+ call = new StaticCallNode(token_pos, target, func_args);
+ } else if (!parent.is_static()) {
+ ASSERT(Isolate::Current()->HasAttemptedReload());
+ // If a subsequent reload reintroduces the target in the middle of the
+ // Invocation object being constructed, we won't be able to successfully
+ // deopt because the generated AST will change.
+ current_function().SetIsOptimizable(false);
+
+ ArgumentListNode* arguments = BuildNoSuchMethodArguments(
+ token_pos, func_name, *func_args, NULL, false);
+ const intptr_t kNumArguments = 2; // Receiver, InvocationMirror.
+ ArgumentsDescriptor args_desc(
+ Array::Handle(Z, ArgumentsDescriptor::New(kNumArguments)));
+ Function& no_such_method = Function::ZoneHandle(Z,
+ Resolver::ResolveDynamicForReceiverClass(owner,
+ Symbols::NoSuchMethod(),
+ args_desc));
+ if (no_such_method.IsNull()) {
+ // If noSuchMethod(i) is not found, call Object:noSuchMethod.
+ no_such_method ^= Resolver::ResolveDynamicForReceiverClass(
+ Class::Handle(Z, I->object_store()->object_class()),
+ Symbols::NoSuchMethod(),
+ args_desc);
+ }
+ call = new StaticCallNode(token_pos, no_such_method, arguments);
+ } else {
+ ASSERT(Isolate::Current()->HasAttemptedReload());
+ // If a subsequent reload reintroduces the target in the middle of the
+ // arguments array being constructed, we won't be able to successfully
+ // deopt because the generated AST will change.
+ current_function().SetIsOptimizable(false);
+
+ InvocationMirror::Type im_type;
+ if (parent.IsImplicitGetterFunction()) {
+ im_type = InvocationMirror::kGetter;
+ } else if (parent.IsImplicitSetterFunction()) {
+ im_type = InvocationMirror::kSetter;
+ } else {
+ im_type = InvocationMirror::kMethod;
+ }
+ call = ThrowNoSuchMethodError(TokenPos(),
+ owner,
+ func_name,
+ func_args,
+ InvocationMirror::kStatic,
+ im_type,
+ NULL); // No existing function.
+ }
+
+ ASSERT(call != NULL);
ReturnNode* return_node = new ReturnNode(token_pos, call);
current_block_->statements->Add(return_node);
return CloseBlock();
@@ -1902,6 +1961,7 @@
TRACE_PARSER("ParseFormalParameter");
ParamDesc parameter;
bool var_seen = false;
+ bool final_seen = false;
bool this_seen = false;
if (evaluate_metadata && (CurrentToken() == Token::kAT)) {
@@ -1912,6 +1972,7 @@
if (CurrentToken() == Token::kFINAL) {
ConsumeToken();
+ final_seen = true;
parameter.is_final = true;
} else if (CurrentToken() == Token::kVAR) {
ConsumeToken();
@@ -1926,6 +1987,9 @@
ExpectToken(Token::kPERIOD);
this_seen = true;
parameter.is_field_initializer = true;
+ if (FLAG_initializing_formal_access) {
+ parameter.is_final = true;
+ }
}
if ((parameter.type == NULL) && (CurrentToken() == Token::kVOID)) {
ConsumeToken();
@@ -1967,6 +2031,9 @@
ExpectToken(Token::kPERIOD);
this_seen = true;
parameter.is_field_initializer = true;
+ if (FLAG_initializing_formal_access) {
+ parameter.is_final = true;
+ }
}
// At this point, we must see an identifier for the parameter name.
@@ -1996,7 +2063,11 @@
// This parameter is probably a closure. If we saw the keyword 'var'
// or 'final', a closure is not legal here and we ignore the
// opening parens.
- if (!var_seen && !parameter.is_final) {
+ // TODO(hausner): The language spec appears to allow var and final
+ // in signature types when used with initializing formals:
+ // fieldFormalParameter:
+ // metadata finalConstVarOrType? this ‘.’ identifier formalParameterList? ;
+ if (!var_seen && !final_seen) {
// The parsed parameter type is actually the function result type.
const AbstractType& result_type =
AbstractType::Handle(Z, parameter.type->raw());
@@ -3202,7 +3273,6 @@
// Thus, they are set to be invisible when added to the scope.
LocalVariable* p = param.var;
ASSERT(p != NULL);
- ASSERT(p->is_invisible());
AstNode* value = new LoadLocalNode(param.name_pos, p);
EnsureExpressionTemp();
AstNode* initializer =
@@ -3232,6 +3302,9 @@
// Parsing of initializers done. Now we parse the constructor body.
OpenBlock(); // Block to collect constructor body nodes.
+ if (FLAG_initializing_formal_access) {
+ params.HideInitFormals();
+ }
if (CurrentToken() == Token::kLBRACE) {
// We checked in the top-level parse phase that a redirecting
// constructor does not have a body.
@@ -7422,7 +7495,10 @@
if (param_desc.is_final) {
parameter->set_is_final();
}
- if (param_desc.is_field_initializer) {
+ if (FLAG_initializing_formal_access) {
+ // Field initializer parameters are implicitly final.
+ ASSERT(!param_desc.is_field_initializer || param_desc.is_final);
+ } else if (param_desc.is_field_initializer) {
parameter->set_invisible(true);
}
}
diff --git a/runtime/vm/port.cc b/runtime/vm/port.cc
index 2541b38..d5513d5 100644
--- a/runtime/vm/port.cc
+++ b/runtime/vm/port.cc
@@ -216,7 +216,8 @@
}
handler->ClosePort(port);
if (!handler->HasLivePorts() && handler->OwnedByPortMap()) {
- delete handler;
+ // Delete handler as soon as it isn't busy with a task.
+ handler->RequestDeletion();
}
return true;
}
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 21b8bf8..b8827c58 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -949,7 +949,9 @@
void Profiler::DumpStackTrace(bool native_stack_trace) {
Thread* thread = Thread::Current();
- ASSERT(thread != NULL);
+ if (thread == NULL) {
+ return;
+ }
OSThread* os_thread = thread->os_thread();
ASSERT(os_thread != NULL);
Isolate* isolate = thread->isolate();
diff --git a/runtime/vm/service/service.md b/runtime/vm/service/service.md
index 6e3c180..7aab061 100644
--- a/runtime/vm/service/service.md
+++ b/runtime/vm/service/service.md
@@ -1535,7 +1535,7 @@
// Type
string name [optional];
- // The corresponding Class if this Type is canonical.
+ // The corresponding Class if this Type has a resolved typeClass.
//
// Provided for instance kinds:
// Type
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 69e7820..406f0bc 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -97,7 +97,7 @@
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
safepoint_state_(0),
- execution_state_(kThreadInVM),
+ execution_state_(kThreadInNative),
next_(NULL) {
NOT_IN_PRODUCT(
dart_stream_ = Timeline::GetDartStream();
diff --git a/samples/samples.status b/samples/samples.status
index 1fa1d28..c01c0d9 100644
--- a/samples/samples.status
+++ b/samples/samples.status
@@ -18,10 +18,6 @@
[ $compiler == dart2analyzer ]
build_dart: Skip
-[ $compiler == dart2dart ]
-# Skip until we stabilize language tests.
-*: Skip
-
[ $arch == arm ]
sample_extension/test/sample_extension_test: Skip # Issue 14705
diff --git a/sdk/lib/_internal/js_runtime/lib/mirror_helper.dart b/sdk/lib/_internal/js_runtime/lib/mirror_helper.dart
deleted file mode 100644
index 9c3024f..0000000
--- a/sdk/lib/_internal/js_runtime/lib/mirror_helper.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-/**
- * Helps dealing with reflection in the case that the source code has been
- * changed as a result of compiling with dart2dart.
- */
-library _mirror_helper;
-
-import 'dart:mirrors';
-
-/// The compiler will replace this variable with a map containing all the
-/// renames made in dart2dart.
-const Map<String, String> _SYMBOLS = null;
-
-/// This method is a wrapper for MirrorSystem.getName() and will be inlined and
-/// called in the generated output Dart code.
-String helperGetName(Symbol sym) {
- var name = MirrorSystem.getName(sym);
- if (_SYMBOLS.containsKey(name)) {
- return _SYMBOLS[name];
- } else {
- return name;
- }
-}
diff --git a/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart b/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
index 0ecb55805..b439338 100644
--- a/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
+++ b/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart
@@ -227,14 +227,6 @@
documented: false,
platforms: DART2JS_PLATFORM),
- // TODO(ahe): This library is only for dart2dart, perhaps it should use a
- // different platform.
- "_mirror_helper": const LibraryInfo(
- "_internal/js_runtime/lib/mirror_helper.dart",
- categories: "",
- documented: false,
- platforms: DART2JS_PLATFORM),
-
"_js_embedded_names": const LibraryInfo(
"_internal/js_runtime/lib/shared/embedded_names.dart",
categories: "",
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 3e7c1cb..aa9292e 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -181,6 +181,17 @@
*
* The returned [Iterable] is lazy, and calls [f] for each element
* of this every time it's iterated.
+ *
+ * Example:
+ *
+ * var pairs = [[1, 2], [3, 4]];
+ * var flattened = pairs.expand((pair) => pair).toList();
+ * print(flattened); // => [1, 2, 3, 4];
+ *
+ * var input = [1, 2, 3];
+ * var duplicated = input.expand((i) => [i, i]).toList();
+ * print(duplicated); // => [1, 1, 2, 2, 3, 3]
+ *
*/
Iterable/*<T>*/ expand/*<T>*/(Iterable/*<T>*/ f(E element)) =>
new ExpandIterable<E, dynamic/*=T*/>(this, f);
@@ -208,7 +219,6 @@
return false;
}
-
/**
* Applies the function [f] to each element of this collection in iteration
* order.
@@ -316,7 +326,6 @@
return buffer.toString();
}
-
/**
* Checks whether any element of this iterable satisfies [test].
*
@@ -382,7 +391,7 @@
*/
bool get isNotEmpty => !isEmpty;
- /**
+ /**
* Returns a lazy iterable of the [count] first elements of this iterable.
*
* The returned `Iterable` may contain fewer than `count` elements, if `this`
@@ -480,7 +489,7 @@
E result;
do {
result = it.current;
- } while(it.moveNext());
+ } while (it.moveNext());
return result;
}
@@ -506,7 +515,7 @@
* function is returned.
* If [orElse] is omitted, it defaults to throwing a [StateError].
*/
- E firstWhere(bool test(E element), { E orElse() }) {
+ E firstWhere(bool test(E element), {E orElse()}) {
for (E element in this) {
if (test(element)) return element;
}
diff --git a/sdk/lib/dart2dart.platform b/sdk/lib/dart2dart.platform
deleted file mode 100644
index d9aaa19..0000000
--- a/sdk/lib/dart2dart.platform
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# The platform when compiling with dart2js for dart2dart.
-#
-# Includes the _mirror_helpers private libraries
-
-[dart-spec]
-spec:3rd edition.
-
-[features]
-# No extra features.
-
-[libraries]
-async: async/async.dart
-_chrome: _chrome/dart2js/chrome_dart2js.dart
-collection: collection/collection.dart
-convert: convert/convert.dart
-core: core/core.dart
-developer: developer/developer.dart
-html: html/dart2js/html_dart2js.dart
-html_common: html/html_common/html_common_dart2js.dart
-indexed_db: indexed_db/dart2js/indexed_db_dart2js.dart
-io: io/io.dart
-isolate: isolate/isolate.dart
-js: js/dart2js/js_dart2js.dart
-js_util: js_util/dart2js/js_util_dart2js.dart
-math: math/math.dart
-mirrors: mirrors/mirrors.dart
-nativewrappers: html/dart2js/nativewrappers.dart
-typed_data: typed_data/typed_data.dart
-_native_typed_data: _internal/js_runtime/lib/native_typed_data.dart
-svg: svg/dart2js/svg_dart2js.dart
-web_audio: web_audio/dart2js/web_audio_dart2js.dart
-web_gl: web_gl/dart2js/web_gl_dart2js.dart
-web_sql: web_sql/dart2js/web_sql_dart2js.dart
-_internal: internal/internal.dart
-_js_helper: _internal/js_runtime/lib/js_helper.dart
-_interceptors: _internal/js_runtime/lib/interceptors.dart
-_foreign_helper: _internal/js_runtime/lib/foreign_helper.dart
-_isolate_helper: _internal/js_runtime/lib/isolate_helper.dart
-_js_mirrors: _internal/js_runtime/lib/js_mirrors.dart
-_js_names: _internal/js_runtime/lib/js_names.dart
-_js_primitives: _internal/js_runtime/lib/js_primitives.dart
-_mirror_helper: _internal/js_runtime/lib/mirror_helper.dart
-_js_embedded_names: _internal/js_runtime/lib/shared/embedded_names.dart
-_async_await_error_codes: _internal/js_runtime/lib/shared/async_await_error_codes.dart
-_metadata: html/html_common/metadata.dart
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index d1662c9..a0dd69f 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -1677,6 +1677,7 @@
[ $compiler == dart2js && $runtime == chrome && $system == macos ]
Language/Expressions/Function_Invocation/async_invokation_t04: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/canvas-test_t01: Skip # Times out. Please triage this failure
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Skip # Times out flakily.
LayoutTests/fast/canvas/webgl/context-lost-restored_t01: Skip # Times out. Please triage this failure.
LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d_t01: Pass, RuntimeError # Please triage this failure
LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError # Please triage this failure
@@ -1842,10 +1843,7 @@
LayoutTests/fast/canvas/canvas-currentColor_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/canvas-currentTransform_t01: RuntimeError # Feature is not implemented.
LayoutTests/fast/canvas/canvas-drawImage-incomplete_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-ellipse-360-winding_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-ellipse-negative-radius_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/canvas-ellipse-zero-lineto_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/canvas/canvas-ellipse_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/canvas-empty-image-pattern_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/canvas-fill-zeroSizeGradient_t01: RuntimeError # Please triage this failure
LayoutTests/fast/canvas/canvas-fillRect-zeroSizeGradient_t01: RuntimeError # Please triage this failure
@@ -2057,7 +2055,6 @@
LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-css-escapes_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-css-nonascii_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-selector-error-recovery_t01: RuntimeError # Please triage this failure
LayoutTests/fast/css/parsing-unexpected-eof_t01: RuntimeError # Please triage this failure
@@ -2814,7 +2811,6 @@
LayoutTests/fast/writing-mode/positionForPoint_t01: RuntimeError # Please triage this failure
LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError # Please triage this failure
LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-invalid-values_t01: RuntimeError # Please triage this failure
LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-invalid-xml_t01: RuntimeError # Please triage this failure
LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError # Please triage this failure
LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-abort_t01: RuntimeError # Please triage this failure
@@ -2944,6 +2940,7 @@
LibTest/html/Window/requestFileSystem_A02_t01: RuntimeError # Please triage this failure
LibTest/html/Window/resizeBy_A01_t01: RuntimeError # Please triage this failure
LibTest/html/Window/resizeTo_A01_t01: RuntimeError # Please triage this failure
+LibTest/math/log_A01_t01: Fail # Please triage this failure.
LibTest/typed_data/Float32List/Float32List.view_A06_t01: RuntimeError # Please triage this failure
LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: RuntimeError # Please triage this failure
LibTest/typed_data/Float64List/Float64List.view_A06_t01: RuntimeError # Please triage this failure
diff --git a/tests/compiler/dart2js/analyze_unused_dart2js_test.dart b/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
index 8106a06..a17914e 100644
--- a/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
+++ b/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
@@ -23,9 +23,6 @@
"The method 'asAssert' is never called.",
"The method 'asLiteralBool' is never called."],
- // Some things in dart_printer are not yet used
- "lib/src/dart_backend/backend_ast_nodes.dart": const [" is never "],
-
// Uncalled methods in SemanticSendVisitor and subclasses.
"lib/src/resolution/semantic_visitor.dart": const [
"The method 'error"],
@@ -56,10 +53,6 @@
"accept", "CreateFunction",
],
- "lib/src/dart_backend/backend_ast_to_frontend_ast.dart": const [
- " is never "
- ],
-
// Useful utility functions that are not currently used.
"lib/src/cps_ir/cps_fragment.dart": const [
"The method 'beginLoop' is never called.",
diff --git a/tests/compiler/dart2js/backend_dart/dart_backend_test.dart b/tests/compiler/dart2js/backend_dart/dart_backend_test.dart
deleted file mode 100644
index 5db4160..0000000
--- a/tests/compiler/dart2js/backend_dart/dart_backend_test.dart
+++ /dev/null
@@ -1,1119 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/expect.dart";
-import 'dart:async';
-import 'dart:io' as io;
-import "package:async_helper/async_helper.dart";
-import '../mock_compiler.dart';
-import '../mock_libraries.dart';
-import '../output_collector.dart';
-import 'package:compiler/compiler.dart';
-import 'package:compiler/src/common/names.dart' show Identifiers;
-import 'package:compiler/src/dart_backend/dart_backend.dart';
-import 'package:compiler/src/elements/elements.dart';
-import 'package:compiler/src/tree/tree.dart';
-
-const ioLib = r'''
-library io;
-class Platform {
- static int operatingSystem;
-}
-''';
-
-const htmlLib = r'''
-library html;
-Window __window;
-Window get window => __window;
-abstract class Window {
- Navigator get navigator;
-}
-abstract class Navigator {
- String get userAgent;
-}
-''';
-
-/**
- * Library name is assumed to be 'mylib' in 'mylib.dart' file.
- */
-testDart2Dart(String mainSrc, {String librarySrc,
- String expectedResult,
- bool minify: false,
- bool stripTypes: false}) {
-
- // If expectedResult is not provided, check that source string remains the
- // same.
- if (expectedResult == null) {
- Expect.equals(null, librarySrc);
- expectedResult = mainSrc;
- }
-
- fileUri(path) => new Uri(scheme: 'file', path: path);
-
- final scriptUri = fileUri('script.dart');
- final libUri = fileUri('mylib.dart');
-
- provider(uri) {
- if (uri == scriptUri) return new Future.value(mainSrc);
- if (uri.toString() == libUri.toString()) {
- return new Future.value(librarySrc);
- }
- if (uri.path.endsWith('/dart2dart.platform')) {
- return new io.File.fromUri(uri).readAsBytes();
- } else if (uri.path.endsWith('/core.dart')) {
- return new Future.value(buildLibrarySource(DEFAULT_CORE_LIBRARY));
- } else if (uri.path.endsWith('/core_patch.dart')) {
- return new Future.value(DEFAULT_PATCH_CORE_SOURCE);
- } else if (uri.path.endsWith('/io.dart')) {
- return new Future.value(ioLib);
- } else if (uri.path.endsWith('/js_helper.dart')) {
- return new Future.value(buildLibrarySource(DEFAULT_JS_HELPER_LIBRARY));
- } else if (uri.path.endsWith('/html_dart2js.dart')) {
- // TODO(smok): The file should change to html_dartium at some point.
- return new Future.value(htmlLib);
- } else if (uri.path.endsWith('/foreign_helper.dart')) {
- return new Future.value(
- buildLibrarySource(DEFAULT_FOREIGN_HELPER_LIBRARY));
- } else if (uri.path.endsWith('/isolate_helper.dart')) {
- return new Future.value(
- buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY));
- }
- return new Future.value('');
- }
-
- handler(uri, begin, end, message, kind) {
- if (identical(kind, Diagnostic.ERROR) || identical(kind, Diagnostic.CRASH)) {
- Expect.fail('$uri: $begin-$end: $message [$kind]');
- }
- }
-
- final options = <String>['--output-type=dart'];
- // Some tests below are using dart:io.
- if (minify) options.add('--minify');
- if (stripTypes) options.add('--force-strip=types');
-
- asyncTest(() {
- OutputCollector outputCollector = new OutputCollector();
- return compile(
- scriptUri,
- Uri.base.resolve('sdk/'),
- fileUri('packageRoot/'),
- provider,
- handler,
- options,
- outputCollector).then((_) {
- String code = outputCollector.getOutput('', 'dart');
- Expect.equals(expectedResult, code,
- 'expected:\n$expectedResult\nactual:\n$code');
- });
- });
-}
-
-testSimpleFileUnparse() {
- final src = '''
-should_be_dropped() {
-}
-
-should_be_kept() {
-}
-
-main() {
- should_be_kept();
-}
-''';
- testDart2Dart(src, expectedResult: '''
-should_be_kept() {}
-main() {
- should_be_kept();
-}
-''');
-}
-testTopLevelField() {
- testDart2Dart('''
-final String x = "asd";
-main() {
- x;
-}
-''');
-}
-
-testSimpleTopLevelClass() {
- testDart2Dart('''
-main() {
- new A();
-}
-class A {
- A() {}
-}
-''');
-}
-
-testClassWithSynthesizedConstructor() {
- testDart2Dart('''
-main() {
- new A();
-}
-class A {}
-''');
-}
-
-testClassWithMethod() {
- testDart2Dart(r'''
-main() {
- var a = new A();
- a.foo();
-}
-class A {
- void foo() {}
-}
-''');
-}
-
-testExtendsImplements() {
- testDart2Dart('''
-main() {
- new B<Object>();
-}
-class A<T> {}
-class B<T> extends A<T> {}
-''');
-}
-
-testVariableDefinitions() {
- testDart2Dart('''
-main() {
- var x, y;
- final String s = null;
-}
-''');
- testDart2Dart('''
-main() {
- final int x = 0, y = 0;
- final String s = null;
-}
-''');
- testDart2Dart('''
-foo(f, g) {}
-main() {
- foo(1, 2);
-}
-''');
- testDart2Dart('''
-foo(f(arg)) {}
-main() {
- foo(main);
-}
-''');
- // A couple of static/finals inside a class.
- testDart2Dart('''
-main() {
- A.a;
- A.b;
-}
-class A {
- static const String a = "5";
- static const String b = "4";
-}
-''');
- // Class member of typedef-ed function type.
- // Maybe typedef should be included in the result too, but it
- // works fine without it.
- testDart2Dart('''
-typedef void foofunc(_0);
-main() {
- new A((arg) {});
-}
-class A {
- A(foofunc this.handler);
- final foofunc handler;
-}
-''');
-}
-
-testGetSet() {
- // Top-level get/set.
- testDart2Dart('''
-set foo(arg) {}
-get foo {
- return 5;
-}
-main() {
- foo;
- foo = 5;
-}
-''');
- // Field get/set.
- testDart2Dart('''
-main() {
- var a = new A();
- a.foo;
- a.foo = 5;
-}
-class A {
- set foo(a) {}
- get foo {
- return 5;
- }
-}
-''');
- // Typed get/set.
- testDart2Dart('''
-String get foo {
- return "a";
-}
-main() {
- foo;
-}
-''');
-}
-
-testAbstractClass() {
- testDart2Dart('''
-main() {
- A.foo;
-}
-abstract class A {
- static final num foo = 0;
-}
-''');
-}
-
-testConflictSendsRename() {
- // Various Send-s to current library and external library. Verify that
- // everything is renamed correctly in conflicting class names and global
- // functions.
- var librarySrc = '''
-library mylib;
-
-globalfoo() {}
-var globalVar;
-var globalVarInitialized = 6, globalVarInitialized2 = 7;
-
-class A {
- A(){}
- A.fromFoo(){}
- static staticfoo(){}
- foo(){}
- static const field = 5;
-}
-''';
- var mainSrc = '''
-import 'mylib.dart' as mylib;
-
-globalfoo() {}
-var globalVar;
-var globalVarInitialized = 6, globalVarInitialized2 = 7;
-
-class A {
- A(){}
- A.fromFoo(){}
- static staticfoo(){}
- foo(){}
- static const field = 5;
-}
-
-main() {
- globalVar;
- globalVarInitialized;
- globalVarInitialized2;
- globalfoo();
- A.field;
- A.staticfoo();
- new A();
- new A.fromFoo();
- new A().foo();
-
- mylib.globalVar;
- mylib.globalVarInitialized;
- mylib.globalVarInitialized2;
- mylib.globalfoo();
- mylib.A.field;
- mylib.A.staticfoo();
- new mylib.A();
- new mylib.A.fromFoo();
- new mylib.A().foo();
-}
-''';
- var expectedResult = '''
-globalfoo() {}
-var globalVar;
-var globalVarInitialized = 6;
-var globalVarInitialized2 = 7;
-class A {
- A() {}
- A.fromFoo() {}
- static staticfoo() {}
- foo() {}
- static const field = 5;
-}
-globalfoo_A() {}
-var globalVar_A;
-var globalVarInitialized_A = 6;
-var globalVarInitialized2_A = 7;
-class A_A {
- A_A() {}
- A_A.fromFoo_A() {}
- static staticfoo_A() {}
- foo() {}
- static const field_A = 5;
-}
-main() {
- globalVar_A;
- globalVarInitialized_A;
- globalVarInitialized2_A;
- globalfoo_A();
- A_A.field_A;
- A_A.staticfoo_A();
- new A_A();
- new A_A.fromFoo_A();
- new A_A().foo();
- globalVar;
- globalVarInitialized;
- globalVarInitialized2;
- globalfoo();
- A.field;
- A.staticfoo();
- new A();
- new A.fromFoo();
- new A().foo();
-}
-''';
- testDart2Dart(mainSrc, librarySrc: librarySrc,
- expectedResult: expectedResult);
-}
-
-testNoConflictSendsRename() {
- // Various Send-s to current library and external library. Nothing should be
- // renamed here, only library prefixes must be cut.
- var librarySrc = '''
-library mylib;
-
-globalfoo() {}
-
-class A {
- A(){}
- A.fromFoo(){}
- static staticfoo(){}
- foo(){}
- static const field = 5;
-}
-''';
- var mainSrc = '''
-import 'mylib.dart' as mylib;
-
-myglobalfoo() {}
-
-class MyA {
- MyA(){}
- MyA.myfromFoo(){}
- static mystaticfoo(){}
- myfoo(){}
- static const myfield = 5;
-}
-
-main() {
- myglobalfoo();
- MyA.myfield;
- MyA.mystaticfoo();
- new MyA();
- new MyA.myfromFoo();
- new MyA().myfoo();
-
- mylib.globalfoo();
- mylib.A.field;
- mylib.A.staticfoo();
- new mylib.A();
- new mylib.A.fromFoo();
- new mylib.A().foo();
-}
-''';
- var expectedResult = '''
-globalfoo() {}
-class A {
- A() {}
- A.fromFoo() {}
- static staticfoo() {}
- foo() {}
- static const field = 5;
-}
-myglobalfoo() {}
-class MyA {
- MyA() {}
- MyA.myfromFoo() {}
- static mystaticfoo() {}
- myfoo() {}
- static const myfield = 5;
-}
-main() {
- myglobalfoo();
- MyA.myfield;
- MyA.mystaticfoo();
- new MyA();
- new MyA.myfromFoo();
- new MyA().myfoo();
- globalfoo();
- A.field;
- A.staticfoo();
- new A();
- new A.fromFoo();
- new A().foo();
-}
-''';
- testDart2Dart(mainSrc, librarySrc: librarySrc,
- expectedResult: expectedResult);
-}
-
-testConflictLibraryClassRename() {
- var librarySrc = '''
-library mylib;
-
-topfoo() {}
-
-class A {
- foo() {}
-}
-''';
- var mainSrc = '''
-import 'mylib.dart' as mylib;
-topfoo() {
- var x = 5;
-}
-class A {
- num foo() {}
- A.fromFoo() {}
- mylib.A myliba;
- List<A> mylist;
-}
-mylib.A getA() => null;
-main() {
- var a = new mylib.A();
- a.foo();
- var b = new A.fromFoo();
- b.foo();
- var GREATVAR = b.myliba;
- b.mylist;
- a = getA();
- topfoo();
- mylib.topfoo();
-}
-''';
- var expectedResult = '''
-topfoo() {}
-class A {
- foo() {}
-}
-topfoo_A() {
- var x = 5;
-}
-class A_A {
- num foo() {}
- A_A.fromFoo() {}
- A myliba;
- List<A_A> mylist;
-}
-A getA() => null;
-main() {
- var a = new A();
- a.foo();
- var b = new A_A.fromFoo();
- b.foo();
- var GREATVAR = b.myliba;
- b.mylist;
- a = getA();
- topfoo_A();
- topfoo();
-}
-''';
- testDart2Dart(mainSrc, librarySrc: librarySrc,
- expectedResult: expectedResult);
-}
-
-testClassExtendsWithArgs() {
- testDart2Dart('''
-main() {
- new B<Object>();
-}
-class A<T extends Object> {}
-class B<T extends Object> extends A<T> {}
-''', expectedResult: '''
-main() {
- new B<Object>();
-}
-class A<T> {}
-class B<T> extends A<T> {}
-''');
-}
-
-testStaticInvocation() {
- testDart2Dart('''
-main() {
- var x = double.parseDouble("1");
-}
-''');
-}
-
-testLibraryGetSet() {
- var librarySrc = '''
-library mylib;
-
-get topgetset => 5;
-set topgetset(arg) {}
-''';
- var mainSrc = '''
-import 'mylib.dart' as mylib;
-
-get topgetset => 6;
-set topgetset(arg) {}
-
-main() {
- topgetset;
- topgetset = 6;
-
- mylib.topgetset;
- mylib.topgetset = 5;
-}
-''';
- var expectedResult = '''
-get topgetset => 5;
-set topgetset(arg) {}
-get topgetset_A => 6;
-set topgetset_A(arg) {}
-main() {
- topgetset_A;
- topgetset_A = 6;
- topgetset;
- topgetset = 5;
-}
-''';
- testDart2Dart(mainSrc, librarySrc: librarySrc,
- expectedResult: expectedResult);
-}
-
-testFieldTypeOutput() {
- testDart2Dart('''
-main() {
- new A().field;
-}
-class B {}
-class A {
- B field;
-}
-''');
-}
-
-class DynoMap implements Map<Element, ElementAst> {
- final compiler;
- DynoMap(this.compiler);
-
- ElementAst operator[](AstElement element) {
- return new ElementAst(element.resolvedAst.node,
- element.resolvedAst.elements);
- }
-
- noSuchMethod(Invocation invocation) => throw 'unimplemented method';
-}
-
-PlaceholderCollector collectPlaceholders(compiler, element) {
- DartBackend backend = compiler.backend;
- return new PlaceholderCollector(
- compiler.reporter,
- backend.mirrorRenamer,
- new Set<String>(),
- new DynoMap(compiler),
- compiler.mainFunction)
- ..collect(element);
-}
-
-testLocalFunctionPlaceholder() {
- var src = '''
-main() {
- function localfoo() {}
- localfoo();
-}
-''';
- MockCompiler compiler = new MockCompiler.internal(emitJavaScript: false);
- asyncTest(() => compiler.init().then((_) {
- assert(compiler.backend is DartBackend);
- compiler.parseScript(src);
- FunctionElement mainElement = compiler.mainApp.find(Identifiers.main);
- compiler.processQueue(compiler.enqueuer.resolution, mainElement);
- PlaceholderCollector collector = collectPlaceholders(compiler, mainElement);
- FunctionExpression mainNode = mainElement.node;
- Block body = mainNode.body;
- FunctionDeclaration functionDeclaration = body.statements.nodes.head;
- FunctionExpression fooNode = functionDeclaration.function;
- LocalPlaceholder fooPlaceholder =
- collector.functionScopes[mainElement].localPlaceholders.first;
- Expect.isTrue(fooPlaceholder.nodes.contains(fooNode.name));
- }));
-}
-
-testTypeVariablesAreRenamed() {
- // Somewhat a hack: we require all the references of the identifier
- // to be renamed in the same way for the whole library. Hence
- // if we have a class and type variable with the same name, they
- // both should be renamed.
- var librarySrc = '''
-library mylib;
-typedef void MyFunction<T extends num>(T arg);
-class T {}
-class B<T> {}
-class A<T> extends B<T> { T f; }
-''';
- var mainSrc = '''
-import 'mylib.dart' as mylib;
-typedef void MyFunction<T extends num>(T arg);
-class T {}
-class B<T> {}
-class A<T> extends B<T> { T f; }
-
-main() {
- MyFunction myf1;
- mylib.MyFunction myf2;
- new A<int>().f;
- new T();
-
- new mylib.A<int>().f;
- new mylib.T();
-}
-''';
- var expectedResult = '''
-typedef void MyFunction<T_B extends num>(T_B _0);
-class T {}
-class B<T_B> {}
-class A<T_B> extends B<T_B> {
- T_B f;
-}
-typedef void MyFunction_A<T_B extends num>(T_B _0);
-class T_A {}
-class B_A<T_B> {}
-class A_A<T_B> extends B_A<T_B> {
- T_B f;
-}
-main() {
- MyFunction_A myf1;
- MyFunction myf2;
- new A_A<int>().f;
- new T_A();
- new A<int>().f;
- new T();
-}
-''';
- testDart2Dart(mainSrc, librarySrc: librarySrc,
- expectedResult: expectedResult);
-}
-
-testClassTypeArgumentBound() {
- var librarySrc = '''
-library mylib;
-
-class I {}
-class A<T extends I> {}
-
-''';
- var mainSrc = '''
-import 'mylib.dart' as mylib;
-
-class I {}
-class A<T extends I> {}
-
-main() {
- new A();
- new mylib.A();
-}
-''';
- var expectedResult = '''
-class I {}
-class A<T extends I> {}
-class I_A {}
-class A_A<T extends I_A> {}
-main() {
- new A_A();
- new A();
-}
-''';
- testDart2Dart(mainSrc, librarySrc: librarySrc,
- expectedResult: expectedResult);
- }
-
-testDoubleMains() {
- var librarySrc = '''
-library mylib;
-main() {}
-''';
- var mainSrc = '''
-import 'mylib.dart' as mylib;
-main() {
- mylib.main();
-}
-''';
- var expectedResult = '''
-main_A() {}
-main() {
- main_A();
-}
-''';
- testDart2Dart(mainSrc, librarySrc: librarySrc,
- expectedResult: expectedResult);
-}
-
-testStaticAccessIoLib() {
- var src = '''
-import 'dart:io';
-
-main() {
- Platform.operatingSystem;
-}
-''';
- var expectedResult = '''
-import "dart:io";
-main() {
- Platform.operatingSystem;
-}
-''';
- testDart2Dart(src, expectedResult: expectedResult);
-}
-
-testMinification() {
- var src = '''
-class ClassWithVeryVeryLongName {}
-main() {
- new ClassWithVeryVeryLongName();
-}
-''';
- var expectedResult =
- 'class A{}'
- 'main(){new A();}';
- testDart2Dart(src, expectedResult: expectedResult, minify: true);
-}
-
-testClosureLocalsMinified() {
- var src = '''
-main() {
- var a = 7;
- void foo1(a,b) {
- void foo2(c,d) {
- var E = a;
- }
- foo2(b, a);
- }
- foo1(a, 8);
-}
-''';
- var expectedResult =
- 'main(){var A=7; B(A,C){ D(E,F){var G=A;}D(C,A);}B(A,8);}';
- testDart2Dart(src, expectedResult: expectedResult, minify: true);
-}
-
-testParametersMinified() {
- var src = '''
-class A {
- var a;
- static foo(arg1) {
- // Should not rename arg1 to a.
- arg1 = 5;
- }
-}
-
-fooglobal(arg,{optionalarg: 7}) {
- arg = 6;
-}
-
-main() {
- new A().a;
- A.foo(8);
- fooglobal(8);
-}
-''';
- var expectedResult =
- 'class B{var E;static C(A){A=5;}}D(A,{optionalarg: 7}){A=6;}'
- 'main(){new B().E;B.C(8);D(8);}';
- testDart2Dart(src, expectedResult: expectedResult, minify: true);
-}
-
-testDeclarationTypePlaceholders() {
- var src = '''
-String globalfield;
-const String globalconstfield;
-
-void foo(String arg) {}
-
-main() {
- String localvar;
- foo("5");
-}
-''';
- var expectedResult = '''
-foo( arg) {}
-main() {
- var localvar;
- foo("5");
-}
-''';
- testDart2Dart(src, expectedResult: expectedResult, stripTypes: true);
-}
-
-testPlatformLibraryMemberNamesAreFixed() {
- var src = '''
-import 'dart:html';
-
-class A {
- static String get userAgent => window.navigator.userAgent;
-}
-
-main() {
- A.userAgent;
-}
-''';
- var expectedResult = '''
-import "dart:html";
-class A {
- static String get userAgent_A => window.navigator.userAgent;
-}
-main() {
- A.userAgent_A;
-}
-''';
- testDart2Dart(src, expectedResult: expectedResult);
-}
-
-testConflictsWithCoreLib() {
- var src = '''
-import 'dart:core' as fisk;
-
-print(x) { throw 'fisk'; }
-
-main() {
- fisk.print('corelib');
- print('local');
-}
-''';
- var expectedResult = """
-print_A(x) {
- throw 'fisk';
-}
-main() {
- print('corelib');
- print_A('local');
-}
-""";
- testDart2Dart(src, expectedResult: expectedResult);
-}
-
-testUnresolvedNamedConstructor1() {
- var src = '''
-class A {
-}
-
-main() {
- new A.named();
-}
-''';
- var expectedResult = """
-main() {
- new Unresolved();
-}
-""";
- testDart2Dart(src, expectedResult: expectedResult);
-}
-
-testUnresolvedNamedConstructor2() {
- var src = '''
-class A {
- A() {}
-}
-
-main() {
- new A();
- new A.named();
-}
-''';
- var expectedResult = """
-class A {
- A() {}
-}
-main() {
- new A();
- new Unresolved();
-}
-""";
- testDart2Dart(src, expectedResult: expectedResult);
-}
-
-testUnresolvedNamedConstructor3() {
- var src = '''
-class A {
- static method() {}
-}
-
-main() {
- A.method();
- new A.named();
-}
-''';
- var expectedResult = """
-class A {
- static method() {}
-}
-main() {
- A.method();
- new Unresolved();
-}
-""";
- testDart2Dart(src, expectedResult: expectedResult);
-}
-
-testClassAndNamedMixinDeclarations() {
- test(String declarations, {String expectedDeclarations}) {
- const String mainSource = 'main() => new A();';
- if (expectedDeclarations == null) {
- expectedDeclarations = declarations;
- }
- testDart2Dart('$declarations\n$mainSource\n',
- expectedResult: '$expectedDeclarations\n$mainSource\n');
- }
-
- test('class A {}');
- test('class A<T> {}');
- test('class A<T extends num> {}');
- test('class A<T extends Object> {}', expectedDeclarations: 'class A<T> {}');
- test('class A extends Object {}', expectedDeclarations: 'class A {}');
-
- test('''
-class S1 {}
-class A extends S1 {}''');
-
- test('''
-class S1 {}
-class A implements S1 {}''');
-
- test('''
-class S1 {}
-class S2 {}
-class A extends S1 implements S2 {}''');
-
- test('''
-class S1 {}
-class S2 {}
-class S3 {}
-class A extends S1 implements S2, S3 {}''');
-
- test('''
-class S1 {}
-class S2 {}
-class A implements S1, S2 {}''');
-
- test('''
-class S1 {}
-class S2 {}
-class A extends Object implements S1, S2 {}''',
- expectedDeclarations: '''
-class S1 {}
-class S2 {}
-class A implements S1, S2 {}''');
-
- test('''
-class S1 {}
-class A extends Object with S1 {}''');
-
- test('''
-class S1 {}
-class A = Object with S1;''');
-
- test('''
-class S1 {}
-class S2 {}
-class A extends S1 with S2 {}''');
-
- test('''
-class S1 {}
-class S2 {}
-class A = S1 with S2;''');
-
- test('''
-class S1 {}
-class S2 {}
-class S3 {}
-class A extends S1 with S2, S3 {}''');
-
- test('''
-class S1 {}
-class S2 {}
-class S3 {}
-class A = S1 with S2, S3;''');
-
- test('''
-class S1 {}
-class S2 {}
-class S3 {}
-class S4 {}
-class S5 {}
-class A extends S1 with S2, S3 implements S4, S5 {}''');
-
- test('''
-class S1 {}
-class S2 {}
-class S3 {}
-class S4 {}
-class S5 {}
-class A = S1 with S2, S3 implements S4, S5;''');
-
- test('''
-class S1 {}
-class A extends Object with S1 implements S1 {}''',
- expectedDeclarations: '''
-class S1 {}
-class A extends Object with S1 {}''');
-
- test('''
-class S1 {}
-class A = Object with S1 implements S1;''',
- expectedDeclarations: '''
-class S1 {}
-class A = Object with S1;''');
-
- test('''
-class S1<T1> {}
-class S2<T2> {}
-class S3<T3> {}
-class S4<T4> {}
-class S5<T5, T6> {}
-class A<U1, U2, U3, U4, U5> extends S1<U1> with S2<U2>, S3<U3> '''
- '''implements S4<U4>, S5<U5, S5<U5, int>> {}''');
-}
-
-main() {
- testSimpleFileUnparse();
- testTopLevelField();
- testSimpleTopLevelClass();
- testClassWithSynthesizedConstructor();
- testClassWithMethod();
- testExtendsImplements();
- testVariableDefinitions();
- testGetSet();
- testAbstractClass();
- testConflictSendsRename();
- testNoConflictSendsRename();
- testConflictLibraryClassRename();
- testClassExtendsWithArgs();
- testStaticInvocation();
- testLibraryGetSet();
- testFieldTypeOutput();
- testTypeVariablesAreRenamed();
- testClassTypeArgumentBound();
- testDoubleMains();
- testStaticAccessIoLib();
- testLocalFunctionPlaceholder();
- testMinification();
- testClosureLocalsMinified();
- testParametersMinified();
- testDeclarationTypePlaceholders();
- testPlatformLibraryMemberNamesAreFixed();
- testConflictsWithCoreLib();
- testUnresolvedNamedConstructor1();
- testUnresolvedNamedConstructor2();
- testUnresolvedNamedConstructor3();
- testClassAndNamedMixinDeclarations();
-}
-
diff --git a/tests/compiler/dart2js/backend_dart/dart_printer_test.dart b/tests/compiler/dart2js/backend_dart/dart_printer_test.dart
deleted file mode 100644
index 4d331b3..0000000
--- a/tests/compiler/dart2js/backend_dart/dart_printer_test.dart
+++ /dev/null
@@ -1,990 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart_printer_test;
-
-import 'dart:mirrors';
-import 'package:expect/expect.dart';
-import 'package:compiler/src/constants/values.dart';
-import 'package:compiler/src/dart_backend/backend_ast_nodes.dart';
-import 'package:compiler/src/dart_backend/backend_ast_to_frontend_ast.dart'
- show TreePrinter;
-import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
-import 'package:compiler/src/diagnostics/messages.dart';
-import 'package:compiler/src/diagnostics/spannable.dart' show Spannable;
-import 'package:compiler/src/parser/listener.dart';
-import 'package:compiler/src/parser/parser.dart';
-import 'package:compiler/src/scanner/scanner.dart';
-import 'package:compiler/src/tokens/token.dart';
-import 'package:compiler/src/tokens/token_constants.dart';
-import 'package:compiler/src/io/source_file.dart';
-import 'package:compiler/src/string_validator.dart';
-import 'package:compiler/src/tree/tree.dart' show DartString;
-import 'package:compiler/src/tree/tree.dart' as tree;
-import '../options_helper.dart';
-
-/// For debugging the [AstBuilder] stack. Prints information about [x].
-void show(x) {
- StringBuffer buf = new StringBuffer();
- Unparser unparser = new Unparser(buf);
- void unparse(x) {
- if (x is Expression)
- unparser.writeExpression(x);
- else if (x is TypeAnnotation)
- unparser.writeType(x);
- else if (x is Statement)
- unparser.writeStatement(x);
- else if (x is List) {
- buf.write('[');
- bool first = true;
- for (var y in x) {
- if (first)
- first = false;
- else
- buf.write(', ');
- unparse(y);
- }
- buf.write(']');
- }
- }
- unparse(x);
- print("${x.runtimeType}: ${buf.toString()}");
-}
-
-class PrintDiagnosticListener implements DiagnosticReporter {
- void log(message) {
- print(message);
- }
-
- void internalError(Spannable spannable, message) {
- print(message);
- }
-
- SourceSpan spanFromSpannable(Spannable node) {
- return new SourceSpan(null, 0, 0);
- }
-
- void reportFatalError(Spannable node, MessageKind errorCode,
- [Map arguments = const {}]) {
- print(errorCode);
- throw new Error();
- }
-
- void reportError(Spannable node, MessageKind errorCode,
- [Map arguments = const {}]) {
- print(errorCode);
- }
-
- void reportWarning(Spannable node, MessageKind errorCode,
- [Map arguments = const {}]) {
- print(errorCode);
- }
-
- void reportHint(Spannable node, MessageKind errorCode,
- [Map arguments = const {}]) {
- print(errorCode);
- }
-
- void reportInfo(Spannable node, MessageKind errorCode,
- [Map arguments = const {}]) {
- print(errorCode);
- }
-
- withCurrentElement(element, f()) {
- f();
- }
-}
-
-class AstBuilder extends Listener {
- final List stack = [];
- final StringValidator stringValidator
- = new StringValidator(new PrintDiagnosticListener());
-
- String asName(e) {
- if (e is Identifier)
- return e.name;
- else if (e == null)
- return null;
- else
- throw 'Expression is not a name: ${e.runtimeType}';
- }
-
- TypeAnnotation asType(x) {
- if (x is TypeAnnotation)
- return x;
- if (x is Identifier)
- return new TypeAnnotation(x.name);
- if (x == null)
- return null;
- else
- throw "Not a type: ${x.runtimeType}";
- }
-
- Parameter asParameter(x) {
- if (x is Parameter)
- return x;
- if (x is Identifier)
- return new Parameter(x.name);
- else
- throw "Not a parameter: ${x.runtimeType}";
- }
-
- void push(node) {
- stack.add(node);
- }
- dynamic peek() {
- return stack.last;
- }
- dynamic pop([coerce(x) = null]) {
- var x = stack.removeLast();
- if (coerce != null)
- return coerce(x);
- else
- return x;
- }
- List popList(int count, [List result, coerce(x) = null]) {
- if (result == null)
- result = <Node>[];
- for (int i=0; i<count; i++) {
- var x = stack[stack.length-count+i];
- if (coerce != null) {
- x = coerce(x);
- }
- result.add(x);
- }
- stack.removeRange(stack.length-count, stack.length);
- return result;
- }
- popTypeAnnotation() {
- List<TypeAnnotation> args = pop();
- if (args == null)
- return null;
- String name = pop(asName);
- return new TypeAnnotation(name, args);
- }
-
- // EXPRESSIONS
- endCascade() {
- throw "Cascade not supported yet";
- }
- endIdentifierList(int count) {
- push(popList(count, <Identifier>[]));
- }
- endTypeList(int count) {
- push(popList(count, <TypeAnnotation>[], asType));
- }
- beginLiteralString(Token token) {
- String source = token.value;
- tree.StringQuoting quoting = StringValidator.quotingFromString(source);
- push(quoting);
- push(token); // collect token at the end
- }
- handleStringPart(Token token) {
- push(token); // collect token at the end
- }
- endLiteralString(int interpCount) {
- List parts = popList(2 * interpCount + 1, []);
- tree.StringQuoting quoting = pop();
- List<Expression> members = <Expression>[];
- for (var i=0; i<parts.length; i++) {
- var part = parts[i];
- if (part is Expression) {
- members.add(part);
- } else {
- assert(part is Token);
- DartString str = stringValidator.validateInterpolationPart(
- part as Token,
- quoting,
- isFirst: i == 0,
- isLast: i == parts.length - 1);
- members.add(new Literal(new StringConstantValue(str)));
- }
- }
- push(new StringConcat(members));
- }
- handleStringJuxtaposition(int litCount) {
- push(new StringConcat(popList(litCount, <Expression>[])));
- }
- endArguments(int count, begin, end) {
- push(popList(count, <Argument>[]));
- }
- handleNoArguments(token) {
- push(null);
- }
- handleNoTypeArguments(token) {
- push(<TypeAnnotation>[]);
- }
- endTypeArguments(int count, t, y) {
- List<TypeAnnotation> args = <TypeAnnotation>[];
- for (var i=0; i<count; i++) {
- args.add(popTypeAnnotation());
- }
- push(args.reversed.toList(growable:false));
- }
- handleVoidKeyword(token) {
- push(new Identifier("void"));
- push(<TypeAnnotation>[]); // prepare for popTypeAnnotation
- }
- handleQualified(Token period) {
- String last = pop(asName);
- String first = pop(asName);
- push(new Identifier('$first.$last'));
- }
- endSend(t) {
- List<Argument> arguments = pop();
- pop(); // typeArguments
- if (arguments == null)
- return; // not a function call
- Expression selector = pop();
- push(new CallFunction(selector, arguments));
- }
- endThrowExpression(t, tt) {
- push(new Throw(pop()));
- }
- handleAssignmentExpression(Token token) {
- Expression right = pop();
- Expression left = pop();
- push(new Assignment(left, token.value, right));
- }
- handleBinaryExpression(Token token) {
- Expression right = pop();
- Receiver left = pop();
- String tokenString = token.stringValue;
- if (tokenString == '.') {
- if (right is CallFunction) {
- String name = (right.callee as Identifier).name;
- push(new CallMethod(left, name, right.arguments));
- } else {
- push(new FieldExpression(left, (right as Identifier).name));
- }
- } else {
- push(new BinaryOperator(left, tokenString, right));
- }
- }
- handleConditionalExpression(question, colon) {
- Expression elseExpression = pop();
- Expression thenExpression = pop();
- Expression condition = pop();
- push(new Conditional(condition, thenExpression, elseExpression));
- }
- handleIdentifier(Token t) {
- push(new Identifier(t.value));
- }
- handleOperator(t) {
- push(new Identifier(t.value));
- }
- handleIndexedExpression(open, close) {
- Expression index = pop();
- Receiver object = pop();
- push(new IndexExpression(object, index));
- }
- handleIsOperator(operathor, not, endToken) {
- TypeAnnotation type = popTypeAnnotation();
- Expression exp = pop();
- TypeOperator r = new TypeOperator(exp, 'is', type);
- if (not != null) {
- push(new UnaryOperator('!', r));
- } else {
- push(r);
- }
- }
- handleAsOperator(operathor, endToken) {
- TypeAnnotation type = popTypeAnnotation();
- Expression exp = pop();
- push(new TypeOperator(exp, 'as', type));
- }
- handleLiteralBool(Token t) {
- bool value = t.value == 'true';
- push(new Literal(
- value ? new TrueConstantValue() : new FalseConstantValue()));
- }
- handleLiteralDouble(t) {
- push(new Literal(new DoubleConstantValue(double.parse(t.value))));
- }
- handleLiteralInt(Token t) {
- push(new Literal(new IntConstantValue(int.parse(t.value))));
- }
- handleLiteralNull(t) {
- push(new Literal(new NullConstantValue()));
- }
- endLiteralSymbol(Token hash, int idCount) {
- List<Identifier> ids = popList(idCount, <Identifier>[]);
- push(new LiteralSymbol(ids.map((id) => id.name).join('.')));
- }
- handleLiteralList(int count, begin, constKeyword, end) {
- List<Expression> exps = popList(count, <Expression>[]);
- List<TypeAnnotation> types = pop();
- assert(types.length <= 1);
- push(new LiteralList(exps,
- isConst: constKeyword != null,
- typeArgument: types.length == 0 ? null : types[0]
- ));
- }
- handleLiteralMap(int count, begin, constKeyword, end) {
- List<LiteralMapEntry> entries = popList(count, <LiteralMapEntry>[]);
- List<TypeAnnotation> types = pop();
- assert(types.length == 0 || types.length == 2);
- push(new LiteralMap(entries,
- isConst: constKeyword != null,
- typeArguments: types
- ));
- }
- endLiteralMapEntry(colon, endToken) {
- Expression value = pop();
- Expression key = pop();
- push(new LiteralMapEntry(key,value));
- }
- handleNamedArgument(colon) {
- Expression exp = pop();
- Identifier name = pop();
- push(new NamedArgument(name.name, exp));
- }
- endConstructorReference(Token start, Token period, Token end) {
- if (period == null) {
- push(null); // indicate missing constructor name
- }
- }
- handleNewExpression(t) {
- List<Argument> args = pop();
- String constructorName = pop(asName);
- TypeAnnotation type = popTypeAnnotation();
- push(new CallNew(type, args, constructorName: constructorName));
- }
- handleConstExpression(t) {
- List<Argument> args = pop();
- String constructorName = pop(asName);
- TypeAnnotation type = popTypeAnnotation();
- push(new CallNew(type, args, constructorName: constructorName,
- isConst:true));
- }
- handleParenthesizedExpression(t) {
- // do nothing, just leave expression on top of stack
- }
- handleSuperExpression(t) {
- push(new SuperReceiver());
- }
- handleThisExpression(t) {
- push(new This());
- }
- handleUnaryPostfixAssignmentExpression(Token t) {
- push(new Increment.postfix(pop(), t.value));
- }
- handleUnaryPrefixAssignmentExpression(Token t) {
- push(new Increment.prefix(pop(), t.value));
- }
- handleUnaryPrefixExpression(Token t) {
- push(new UnaryOperator(t.value, pop()));
- }
-
- handleFunctionTypedFormalParameter(tok) {
- // handled in endFormalParameter
- }
- endFormalParameter(thisKeyword) {
- Expression defaultValue = null;
- var x = pop();
- if (x is DefaultValue) {
- defaultValue = x.expression;
- x = pop();
- }
- if (x is Parameters) {
- String name = pop(asName);
- TypeAnnotation returnType = popTypeAnnotation();
- push(new Parameter.function(name, returnType, x, defaultValue));
- } else {
- String name = asName(x);
- TypeAnnotation type = popTypeAnnotation();
- push(new Parameter(name, type:type, defaultValue:defaultValue));
- }
- }
- handleValuedFormalParameter(eq, tok) {
- push(new DefaultValue(pop()));
- }
- endOptionalFormalParameters(int count, begin, end) {
- bool isNamed = end.value == '}';
- push(popList(count, <Parameter>[], asParameter));
- push(isNamed); // Indicate optional parameters to endFormalParameters.
- }
- endFormalParameters(count, begin, end) {
- if (count == 0) {
- push(new Parameters([]));
- return;
- }
- var last = pop(); // Detect if optional parameters are present.
- if (last is bool) { // See endOptionalFormalParameters.
- List<Parameter> optional = pop();
- List<Parameter> required = popList(count-1, <Parameter>[], asParameter);
- push(new Parameters(required, optional, last));
- } else {
- // No optional parameters.
- List<Parameter> required = popList(count-1, <Parameter>[], asParameter);
- required.add(last);
- push(new Parameters(required));
- }
- }
- handleNoFormalParameters(tok) {
- push(new Parameters([]));
- }
-
- endUnnamedFunction(t) {
- Statement body = pop();
- Parameters parameters = pop();
- push(new FunctionExpression(parameters, body));
- }
-
- handleNoType(Token token) {
- push(null);
- }
-
- endReturnStatement(bool hasExpression, begin, end) {
- // This is also called for functions whose body is "=> expression"
- if (hasExpression) {
- push(new Return(pop()));
- } else {
- push(new Return());
- }
- }
-
- endExpressionStatement(Token token) {
- push(new ExpressionStatement(pop()));
- }
-
- endDoWhileStatement(Token doKeyword, Token whileKeyword, Token end) {
- Expression condition = pop();
- Statement body = pop();
- push(new DoWhile(body, condition));
- }
-
- endWhileStatement(Token whileKeyword, Token end) {
- Statement body = pop();
- Expression condition = pop();
- push(new While(condition, body));
- }
-
- endBlock(int count, Token begin, Token end) {
- push(new Block(popList(count, <Statement>[])));
- }
-
- endRethrowStatement(Token throwToken, Token endToken) {
- push(new Rethrow());
- }
-
- endTryStatement(int catchCount, Token tryKeyword, Token finallyKeyword) {
- Statement finallyBlock = null;
- if (finallyKeyword != null) {
- finallyBlock = pop();
- }
- List<CatchBlock> catchBlocks = popList(catchCount, <CatchBlock>[]);
- Statement tryBlock = pop();
- push(new Try(tryBlock, catchBlocks, finallyBlock));
- }
-
- void handleCatchBlock(Token onKeyword, Token catchKeyword) {
- Statement block = pop();
- String exceptionVar = null;
- String stackVar = null;
- if (catchKeyword != null) {
- Parameters params = pop();
- exceptionVar = params.requiredParameters[0].name;
- if (params.requiredParameters.length > 1) {
- stackVar = params.requiredParameters[1].name;
- }
- }
- TypeAnnotation type = onKeyword == null ? null : pop();
- push(new CatchBlock(block,
- onType: type,
- exceptionVar: exceptionVar,
- stackVar: stackVar
- ));
- }
-
- endSwitchStatement(Token switchKeyword, Token end) {
- List<SwitchCase> cases = pop();
- Expression expression = pop();
- push(new Switch(expression, cases));
- }
-
- endSwitchBlock(int caseCount, Token begin, Token end) {
- push(popList(caseCount, <SwitchCase>[]));
- }
-
- handleSwitchCase(int labelCount, int caseCount, Token defaultKeyword,
- int statementCount, Token first, Token end) {
- List<Statement> statements = popList(statementCount, <Statement>[]);
- List<Expression> cases = popList(caseCount, <Expression>[]);
- if (defaultKeyword != null) {
- cases = null;
- }
- push(new SwitchCase(cases, statements));
- }
-
- handleCaseMatch(Token caseKeyword, Token colon) {
- // do nothing, leave case expression on stack
- }
-
- handleBreakStatement(bool hasTarget, Token breakKeyword, Token end) {
- String target = hasTarget ? pop(asName) : null;
- push(new Break(target));
- }
-
- handleContinueStatement(bool hasTarget, Token continueKeyword, Token end) {
- String target = hasTarget ? pop(asName) : null;
- push(new Continue(target));
- }
-
- handleEmptyStatement(Token token) {
- push(new EmptyStatement());
- }
-
-
- VariableDeclaration asVariableDeclaration(x) {
- if (x is VariableDeclaration)
- return x;
- if (x is Identifier)
- return new VariableDeclaration(x.name);
- throw "Not a variable definition: ${x.runtimeType}";
- }
-
- endVariablesDeclaration(int count, Token end) {
- List<VariableDeclaration> variables =
- popList(count, <VariableDeclaration>[], asVariableDeclaration);
- TypeAnnotation type = popTypeAnnotation();
- push(new VariableDeclarations(variables,
- type: type,
- isFinal: false, // TODO(asgerf): Parse modifiers.
- isConst: false
- ));
- }
-
- endInitializer(Token assign) {
- Expression init = pop();
- String name = pop(asName);
- push(new VariableDeclaration(name, init));
- }
-
- endIfStatement(Token ifToken, Token elseToken) {
- Statement elsePart = (elseToken == null) ? null : pop();
- Statement thenPart = pop();
- Expression condition = pop();
- push(new If(condition, thenPart, elsePart));
- }
-
- endForStatement(int updateCount, Token begin, Token end) {
- Statement body = pop();
- List<Expression> updates = popList(updateCount, <Expression>[]);
- ExpressionStatement condition = pop(); // parsed as expression statement
- Expression exp = condition == null ? null : condition.expression;
- Node initializer = pop();
- push(new For(initializer, exp, updates, body));
- }
-
- handleNoExpression(Token token) {
- push(null);
- }
-
- endForIn(Token await, Token begin, Token inKeyword, Token end) {
- Statement body = pop();
- Expression exp = pop();
- Node declaredIdentifier = pop();
- push(new ForIn(declaredIdentifier, exp, body));
- }
-
- handleAssertStatement(Token assertKeyword,
- Token commaToken, Token semicolonToken) {
- Expression message;
- if (commaToken != null) message = pop();
- Expression exp = pop();
- var arguments = [exp];
- if (message != null) arguments.add(message);
- Expression call = new CallFunction(new Identifier("assert"), arguments);
- push(new ExpressionStatement(call));
- }
-
- endLabeledStatement(int labelCount) {
- Statement statement = pop();
- for (int i=0; i<labelCount; i++) {
- String label = pop(asName);
- statement = new LabeledStatement(label, statement);
- }
- push(statement);
- }
-
- endFunctionDeclaration(Token end) {
- Statement body = pop();
- Parameters parameters = pop();
- String name = pop(asName);
- TypeAnnotation returnType = popTypeAnnotation();
- push(new FunctionDeclaration(new FunctionExpression(parameters, body,
- name: name,
- returnType: returnType)));
- }
-
- endFunctionBody(int count, Token begin, Token end) {
- push(new Block(popList(count, <Statement>[])));
- }
-}
-
-class DefaultValue {
- final Expression expression;
- DefaultValue(this.expression);
-}
-
-/// Compares ASTs for structural equality.
-void checkDeepEqual(x, y) {
- if (x is List && y is List) {
- if (x.length != y.length)
- return;
- for (var i=0; i<x.length; i++) {
- checkDeepEqual(x[i], y[i]);
- }
- }
- else if (x is Node && y is Node) {
- if (x.runtimeType != y.runtimeType)
- throw new Error();
- InstanceMirror xm = reflect(x);
- InstanceMirror ym = reflect(y);
- for (Symbol name in xm.type.instanceMembers.keys) {
- if (reflectClass(Object).declarations.containsKey(name)) {
- continue; // do not check things from Object, such as hashCode
- }
- MethodMirror mm = xm.type.instanceMembers[name];
- if (mm.isGetter) {
- var xv = xm.getField(name).reflectee;
- var yv = ym.getField(name).reflectee;
- checkDeepEqual(xv,yv);
- }
- }
- }
- else if (x is PrimitiveConstantValue && y is PrimitiveConstantValue) {
- checkDeepEqual(x.primitiveValue, y.primitiveValue);
- }
- else if (x is DartString && y is DartString) {
- if (x.slowToString() != y.slowToString()) {
- throw new Error();
- }
- }
- else {
- if (x != y) {
- throw new Error();
- }
- }
-}
-
-Expression parseExpression(String code) {
- SourceFile file = new StringSourceFile.fromName('', code);
- Scanner scan = new Scanner(file);
- Token tok = scan.tokenize();
- AstBuilder builder = new AstBuilder();
- Parser parser = new Parser(builder, new MockParserOptions());
- tok = parser.parseExpression(tok);
- if (builder.stack.length != 1 || tok.kind != EOF_TOKEN) {
- throw "Parse error in $code";
- }
- return builder.pop();
-}
-Statement parseStatement(String code) {
- SourceFile file = new StringSourceFile.fromName('', code);
- Scanner scan = new Scanner(file);
- Token tok = scan.tokenize();
- AstBuilder builder = new AstBuilder();
- Parser parser = new Parser(builder, new MockParserOptions());
- tok = parser.parseStatement(tok);
- if (builder.stack.length != 1 || tok.kind != EOF_TOKEN) {
- throw "Parse error in $code";
- }
- return builder.pop();
-}
-
-String unparseExpression(Expression exp) {
- StringBuffer buf = new StringBuffer();
- new Unparser(buf).writeExpression(exp);
- return buf.toString();
-}
-String unparseStatement(Statement stmt) {
- StringBuffer buf = new StringBuffer();
- new Unparser(buf).writeStatement(stmt);
- return buf.toString();
-}
-
-/// Converts [exp] to an instance of the frontend AST and unparses that.
-String frontUnparseExpression(Expression exp) {
- tree.Node node = new TreePrinter().makeExpression(exp);
- return tree.unparse(node);
-}
-/// Converts [stmt] to an instance of the frontend AST and unparses that.
-String frontUnparseStatement(Statement stmt) {
- tree.Node node = new TreePrinter().makeStatement(stmt);
- return tree.unparse(node);
-}
-
-/// Parses [code], unparses the resulting AST, then parses the unparsed text.
-/// The ASTs from the first and second parse are then compared for structural
-/// equality. Alternatively, if [expected] is not an empty string, the second
-/// parse must match the AST of parsing [expected].
-void checkFn(String code, String expected, Function parse, Function unparse) {
- var firstParse = parse(code);
- String unparsed = unparse(firstParse);
- try {
- var secondParse = parse(unparsed);
- var baseline = expected == "" ? firstParse : parse(expected);
- checkDeepEqual(baseline, secondParse);
- } catch (e, stack) {
- Expect.fail('"$code" was unparsed as "$unparsed"');
- }
-}
-
-void checkExpression(String code, [String expected="", String expected2=""]) {
- checkFn(code, expected, parseExpression, unparseExpression);
- checkFn(code, expected2, parseExpression, frontUnparseExpression);
-}
-void checkStatement(String code, [String expected="", String expected2=""]) {
- checkFn(code, expected, parseStatement, unparseStatement);
- checkFn(code, expected2, parseStatement, frontUnparseStatement);
-}
-
-void debugTokens(String code) {
- SourceFile file = new StringSourceFile.fromName('', code);
- Scanner scan = new Scanner(file);
- Token tok = scan.tokenize();
- while (tok.next != tok) {
- print(tok.toString());
- tok = tok.next;
- }
-}
-
-void main() {
- // To check if these tests are effective, one should manually alter
- // something in [Unparser] and see if a test fails.
-
- checkExpression(" a + b + c");
- checkExpression("(a + b) + c");
- checkExpression(" a + (b + c)");
-
- checkExpression(" a + b - c");
- checkExpression("(a + b) - c");
- checkExpression(" a + (b - c)");
-
- checkExpression(" a - b + c");
- checkExpression("(a - b) + c");
- checkExpression(" a - (b + c)");
-
- checkExpression(" a * b + c");
- checkExpression("(a * b) + c");
- checkExpression(" a * (b + c)");
-
- checkExpression(" a + b * c");
- checkExpression("(a + b) * c");
- checkExpression(" a + (b * c)");
-
- checkExpression(" a * b * c");
- checkExpression("(a * b) * c");
- checkExpression(" a * (b * c)");
-
- checkExpression("a is T");
- checkExpression("a is! T");
- checkExpression("!(a is T)");
-
- checkExpression("a is T.x");
- checkExpression("a is! T.x");
- checkExpression("!(a is T.x)");
- checkExpression("!(a is T).x");
-
- checkExpression("a as T.x");
- checkExpression("(a as T).x");
-
- checkExpression("a == b");
- checkExpression("a != b");
- checkExpression("!(a == b)", "a != b");
-
- checkExpression("a && b ? c : d");
- checkExpression("(a && b) ? c : d");
- checkExpression("a && (b ? c : d)");
-
- checkExpression("a || b ? c : d");
- checkExpression("(a || b) ? c : d");
- checkExpression("a || (b ? c : d)");
-
- checkExpression(" a ? b : c && d");
- checkExpression(" a ? b : (c && d)");
- checkExpression("(a ? b : c) && d");
-
- checkExpression(" a ? b : c = d");
- checkExpression(" a ? b : (c = d)");
-
- checkExpression("(a == b) == c");
- checkExpression("a == (b == c)");
-
- checkExpression(" a < b == c");
- checkExpression("(a < b) == c");
- checkExpression(" a < (b == c)");
-
- checkExpression(" a == b < c");
- checkExpression("(a == b) < c");
- checkExpression(" a == (b < c)");
-
- checkExpression("x.f()");
- checkExpression("(x.f)()");
-
- checkExpression("x.f()()");
- checkExpression("(x.f)()()");
-
- checkExpression("x.f().g()");
- checkExpression("(x.f)().g()");
-
- checkExpression("x.f()");
- checkExpression("x.f(1 + 2)");
- checkExpression("x.f(1 + 2, 3 + 4)");
- checkExpression("x.f(1 + 2, foo:3 + 4)");
- checkExpression("x.f(1 + 2, foo:3 + 4, bar: 5)");
- checkExpression("x.f(foo:3 + 4)");
- checkExpression("x.f(foo:3 + 4, bar: 5)");
-
- checkExpression("x.f.g.h");
- checkExpression("(x.f).g.h");
- checkExpression("(x.f.g).h");
-
- checkExpression(" a = b + c");
- checkExpression(" a = (b + c)");
- checkExpression("(a = b) + c");
-
- checkExpression("a + (b = c)");
-
- checkExpression("dx * dx + dy * dy < r * r",
- "((dx * dx) + (dy * dy)) < (r * r)");
- checkExpression("mid = left + right << 1",
- "mid = ((left + right) << 1)");
- checkExpression("a + b % c * -d ^ e - f ~/ x & ++y / z++ | w > a ? b : c");
- checkExpression("a + b % c * -d ^ (e - f) ~/ x & ++y / z++ | w > a ? b : c");
-
- checkExpression("'foo'");
- checkExpression("'foo' 'bar'", "'foobar'");
-
- checkExpression("{}.length");
- checkExpression("{x: 1+2}.length");
- checkExpression("<String,int>{}.length");
- checkExpression("<String,int>{x: 1+2}.length");
-
- checkExpression("[].length");
- checkExpression("[1+2].length");
- checkExpression("<num>[].length");
- checkExpression("<num>[1+2].length");
-
- checkExpression("x + -y");
- checkExpression("x + --y");
- checkExpression("x++ + y");
- checkExpression("x + ++y");
- checkExpression("x-- - y");
- checkExpression("x-- - -y");
- checkExpression("x - --y");
-
- checkExpression("x && !y");
- checkExpression("!x && y");
- checkExpression("!(x && y)");
-
- checkExpression(" super + 1 * 2");
- checkExpression("(super + 1) * 2");
- checkExpression(" super + (1 * 2)");
- checkExpression("x + -super");
- checkExpression("x-- - -super");
- checkExpression("x - -super");
- checkExpression("x && !super");
-
- checkExpression("super.f(1, 2) + 3");
- checkExpression("super.f + 3");
-
- checkExpression(r"'foo\nbar'");
- checkExpression(r"'foo\r\nbar'");
- checkExpression(r"'foo\rbar'");
- checkExpression(r"'foo\'bar'");
- checkExpression(r"""'foo"bar'""");
- checkExpression(r"r'foo\nbar'");
- checkExpression("''");
- checkExpression("r''");
-
- var sq = "'";
- var dq = '"';
- checkExpression("'$dq$dq' \"$sq$sq\"");
- checkExpression("'$dq$dq$dq$dq' \"$sq$sq$sq$sq\"");
- checkExpression(r"'\$\$\$\$\$\$\$\$\$'");
- checkExpression("'$dq$dq$dq' '\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n' \"$sq$sq$sq\"");
- checkExpression("'$dq$dq$dq' '\\r\\r\\r\\r\\r\\r\\r\\r\\r\\r' \"$sq$sq$sq\"");
- checkExpression("'$dq$dq$dq' '\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n' \"$sq$sq$sq\"");
-
- checkExpression(r"'$foo'");
- checkExpression(r"'${foo}x'");
- checkExpression(r"'${foo}x\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'");
- checkExpression(r"'abc' '${foo}' r'\\\\\\\'");
-
- checkExpression(r"'${$x}'");
- checkExpression(r"'${$x}y'");
- checkExpression("null + null");
-
- checkExpression("(x) => x",
- '',
- '(x){return x;}');
- checkStatement("fn(x) => x;",
- '',
- 'fn(x){return x;}');
-
- checkExpression("throw x");
- checkStatement("throw x;");
-
- checkStatement("var x, y, z;");
- checkStatement("final x, y, z;");
- checkStatement("dynamic x, y, z;");
- checkStatement("String x, y, z;");
- checkStatement("List<int> x, y, z;");
- checkStatement("final dynamic x, y, z;");
- checkStatement("final String x, y, z;");
- checkStatement("final List<int> x, y, z;");
-
- checkStatement("var x = y, z;");
- checkStatement("var x, y = z;");
- checkStatement("var x = y = z;");
-
- // Note: We sometimes have to pass an expected string to account for
- // block flattening which does not preserve structural AST equality
- checkStatement("if (x) if (y) foo(); else bar(); ");
- checkStatement("if (x) { if (y) foo(); } else bar(); ");
- checkStatement("if (x) { if (y) foo(); else bar(); }",
- "if (x) if (y) foo(); else bar(); ");
-
- checkStatement("if (x) while (y) if (z) foo(); else bar(); ");
- checkStatement("if (x) while (y) { if (z) foo(); } else bar(); ");
- checkStatement("if (x) while (y) { if (z) foo(); else bar(); }",
- "if (x) while (y) if (z) foo(); else bar(); ");
-
- checkStatement("{var x = 1; {var x = 2;} return x;}");
- checkStatement("{var x = 1; {x = 2;} return x;}",
- "{var x = 1; x = 2; return x;}",
- "{var x = 1; x = 2; return x;}");
-
- checkStatement("if (x) {var x = 1;}");
-
- checkStatement("({'foo': 1}).bar();");
- checkStatement("({'foo': 1}).length;");
- checkStatement("({'foo': 1}).length + 1;");
- checkStatement("({'foo': 1})['foo'].toString();");
- checkStatement("({'foo': 1})['foo'] = 3;");
- checkStatement("({'foo': 1}['foo']());");
- checkStatement("({'foo': 1}['foo'])();");
- checkStatement("({'foo': 1})['foo'].x++;");
- checkStatement("({'foo': 1}) is Map;");
- checkStatement("({'foo': 1}) as Map;");
- checkStatement("({'foo': 1}) is util.Map;");
- checkStatement("({'foo': 1}) + 1;");
-
- checkStatement("[1].bar();");
- checkStatement("1.bar();");
- checkStatement("'foo'.bar();");
-
- checkStatement("do while(x); while (y);");
- checkStatement("{do; while(x); while (y);}");
-
- checkStatement('switch(x) { case 1: case 2: return y; }');
- checkStatement('switch(x) { default: return y; }');
- checkStatement('switch(x) { case 1: x=y; default: return y; }');
- checkStatement('switch(x) { case 1: x=y; y=z; break; default: return y; }');
-
-}
-
diff --git a/tests/compiler/dart2js/backend_dart/end2end_test.dart b/tests/compiler/dart2js/backend_dart/end2end_test.dart
deleted file mode 100644
index 60156c7..0000000
--- a/tests/compiler/dart2js/backend_dart/end2end_test.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// End-to-end test of the dart2dart compiler.
-library dart_backend.end2end_test;
-
-import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/dart_backend/dart_backend.dart';
-import 'package:expect/expect.dart';
-
-import '../../../../pkg/analyzer2dart/test/test_helper.dart' hide TestSpec;
-import '../../../../pkg/analyzer2dart/test/end2end_data.dart';
-
-import 'test_helper.dart';
-import '../output_collector.dart';
-
-main(List<String> args) {
- performTests(TEST_DATA, asyncTester, runTest, args);
-}
-
-runTest(TestSpec result) {
- OutputCollector outputCollector = new OutputCollector();
- asyncTest(() => compilerFor(result.input, outputProvider: outputCollector)
- .then((Compiler compiler) {
- String expectedOutput = result.output.trim();
- compiler.phase = Compiler.PHASE_COMPILING;
- DartBackend backend = compiler.backend;
- backend.assembleProgram();
- String output = outputCollector.getOutput('', 'dart').trim();
- Expect.equals(expectedOutput, output,
- '\nInput:\n${result.input}\n'
- 'Expected:\n$expectedOutput\n'
- 'Actual:\n$output\n');
- }));
-}
\ No newline at end of file
diff --git a/tests/compiler/dart2js/backend_dart/opt_constprop_test.dart b/tests/compiler/dart2js/backend_dart/opt_constprop_test.dart
deleted file mode 100644
index 2ee3890..0000000
--- a/tests/compiler/dart2js/backend_dart/opt_constprop_test.dart
+++ /dev/null
@@ -1,528 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import '../mock_compiler.dart';
-import 'sexpr_unstringifier.dart';
-import 'package:async_helper/async_helper.dart';
-import "package:expect/expect.dart";
-import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart';
-import 'package:compiler/src/cps_ir/optimizers.dart';
-import 'package:compiler/src/constant_system_dart.dart';
-
-// The tests in this file that ensure that sparse constant propagation on the
-// CPS IR works as expected.
-
-// CP1 represents the following incoming dart code:
-//
-// int main() {
-// int i = 1;
-// int j;
-// if (i == 1) {
-// j = 2;
-// } else {
-// j = 3;
-// }
-// return j;
-// }
-
-String CP1_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 1)))
- (LetCont
- ((k0 (v2)
- (LetCont
- ((k1 ()
- (LetPrim (v3 (Constant (Int 2)))
- (InvokeContinuation return (v3))))
- (k2 ()
- (LetPrim (v4 (Constant (Int 3)))
- (InvokeContinuation return (v4)))))
- (Branch (IsTrue v2) k1 k2))))
- (InvokeMethod v0 == (v1) k0)))))
-""";
-String CP1_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 1)))
- (LetCont
- ((k0 (v2)
- (LetCont
- ((k1 ()
- (LetPrim (v3 (Constant (Int 2)))
- (InvokeContinuation return (v3))))
- (k2 ()
- (LetPrim (v4 (Constant (Int 3)))
- (InvokeContinuation return (v4)))))
- (InvokeContinuation k1 ()))))
- (LetPrim (v5 (Constant (Bool true)))
- (InvokeContinuation k0 (v5)))))))
-""";
-
-// CP2 represents the following incoming dart code:
-//
-// int main() {
-// int i = 1;
-// while (true) {
-// if (false || false) {
-// return i;
-// }
-// if (true && i == 1) {
-// return i;
-// }
-// }
-// return 42;
-// }
-
-String CP2_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetCont
- ((rec k0 ()
- (LetCont
- ((k1 ()
- (LetPrim (v1 (Constant (Int 42)))
- (InvokeContinuation return (v1))))
- (k2 ()
- (LetPrim (v2 (Constant (Bool false)))
- (LetCont
- ((k3 (v3)
- (LetCont
- ((k4 ()
- (InvokeContinuation return (v0)))
- (k5 ()
- (LetPrim (v4 (Constant (Bool true)))
- (LetCont
- ((k6 (v5)
- (LetCont
- ((k7 ()
- (InvokeContinuation return (v0)))
- (k8 ()
- (InvokeContinuation rec k0 ())))
- (Branch (IsTrue v5) k7 k8))))
- (LetCont
- ((k9 ()
- (LetPrim (v6 (Constant (Int 1)))
- (LetCont
- ((k10 (v7)
- (LetCont
- ((k11 ()
- (LetPrim (v8 (Constant (Bool true)))
- (InvokeContinuation k6 (v8))))
- (k12 ()
- (LetPrim (v9 (Constant (Bool false)))
- (InvokeContinuation k6 (v9)))))
- (Branch (IsTrue v7) k11 k12))))
- (InvokeMethod v0 == (v6) k10))))
- (k13 ()
- (LetPrim (v10 (Constant (Bool false)))
- (InvokeContinuation k6 (v10)))))
- (Branch (IsTrue v4) k9 k13))))))
- (Branch (IsTrue v3) k4 k5))))
- (LetCont
- ((k14 ()
- (LetPrim (v11 (Constant (Bool true)))
- (InvokeContinuation k3 (v11))))
- (k15 ()
- (LetPrim (v12 (Constant (Bool false)))
- (LetCont
- ((k16 ()
- (LetPrim (v13 (Constant (Bool true)))
- (InvokeContinuation k3 (v13))))
- (k17 ()
- (LetPrim (v14 (Constant (Bool false)))
- (InvokeContinuation k3 (v14)))))
- (Branch (IsTrue v12) k16 k17)))))
- (Branch (IsTrue v2) k14 k15))))))
- (LetPrim (v15 (Constant (Bool true)))
- (Branch (IsTrue v15) k2 k1)))))
- (InvokeContinuation k0 ()))))
-""";
-String CP2_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetCont
- ((rec k0 ()
- (LetCont
- ((k1 ()
- (LetPrim (v1 (Constant (Int 42)))
- (InvokeContinuation return (v1))))
- (k2 ()
- (LetPrim (v2 (Constant (Bool false)))
- (LetCont
- ((k3 (v3)
- (LetCont
- ((k4 ()
- (InvokeContinuation return (v0)))
- (k5 ()
- (LetPrim (v4 (Constant (Bool true)))
- (LetCont
- ((k6 (v5)
- (LetCont
- ((k7 ()
- (InvokeContinuation return (v0)))
- (k8 ()
- (InvokeContinuation rec k0 ())))
- (InvokeContinuation k7 ()))))
- (LetCont
- ((k9 ()
- (LetPrim (v6 (Constant (Int 1)))
- (LetCont
- ((k10 (v7)
- (LetCont
- ((k11 ()
- (LetPrim (v8 (Constant (Bool true)))
- (InvokeContinuation k6 (v8))))
- (k12 ()
- (LetPrim (v9 (Constant (Bool false)))
- (InvokeContinuation k6 (v9)))))
- (InvokeContinuation k11 ()))))
- (LetPrim (v10 (Constant (Bool true)))
- (InvokeContinuation k10 (v10))))))
- (k13 ()
- (LetPrim (v11 (Constant (Bool false)))
- (InvokeContinuation k6 (v11)))))
- (InvokeContinuation k9 ()))))))
- (InvokeContinuation k5 ()))))
- (LetCont
- ((k14 ()
- (LetPrim (v12 (Constant (Bool true)))
- (InvokeContinuation k3 (v12))))
- (k15 ()
- (LetPrim (v13 (Constant (Bool false)))
- (LetCont
- ((k16 ()
- (LetPrim (v14 (Constant (Bool true)))
- (InvokeContinuation k3 (v14))))
- (k17 ()
- (LetPrim (v15 (Constant (Bool false)))
- (InvokeContinuation k3 (v15)))))
- (InvokeContinuation k17 ())))))
- (InvokeContinuation k15 ()))))))
- (LetPrim (v16 (Constant (Bool true)))
- (InvokeContinuation k2 ())))))
- (InvokeContinuation k0 ()))))
-""";
-
-// CP3 represents the following incoming dart code:
-//
-// int main() {
-// int i = 1;
-// i = f();
-// if (i == 1) {
-// return 42;
-// }
-// return i;
-// }
-
-String CP3_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetCont
- ((k0 (v1)
- (LetPrim (v2 (Constant (Int 1)))
- (LetCont
- ((k1 (v3)
- (LetCont
- ((k2 ()
- (LetPrim (v4 (Constant (Int 42)))
- (InvokeContinuation return (v4))))
- (k3 ()
- (InvokeContinuation return (v1))))
- (Branch (IsTrue v3) k2 k3))))
- (InvokeMethod v1 == (v2) k1)))))
- (InvokeStatic f () k0))))
-""";
-String CP3_OUT = CP3_IN;
-
-// Addition.
-
-String CP4_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 2)))
- (LetCont
- ((k0 (v2)
- (InvokeContinuation return (v2))))
- (InvokeMethod v0 + (v1) k0)))))
-""";
-String CP4_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 2)))
- (LetCont
- ((k0 (v2)
- (InvokeContinuation return (v2))))
- (LetPrim (v3 (Constant (Int 3)))
- (InvokeContinuation k0 (v3)))))))
-""";
-
-// Array access operator (no optimization).
-
-String CP5_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 2)))
- (LetCont
- ((k0 (v2)
- (InvokeContinuation return (v2))))
- (InvokeMethod v0 [] (v1) k0)))))
-""";
-String CP5_OUT = CP5_IN;
-
-// Division by 0.
-
-String CP6_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((k0 (v2)
- (InvokeContinuation return (v2))))
- (InvokeMethod v0 / (v1) k0)))))
-""";
-String CP6_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((k0 (v2)
- (InvokeContinuation return (v2))))
- (LetPrim (v3 (Constant (Double Infinity)))
- (InvokeContinuation k0 (v3)))))))
-""";
-
-// Concatenate strings.
-
-String CP7_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (String "b")))
- (LetPrim (v1 (Constant (String "d")))
- (LetPrim (v2 (Constant (String "a")))
- (LetPrim (v3 (Constant (String "c")))
- (LetPrim (v4 (Constant (String "")))
- (LetCont
- ((k0 (v5)
- (LetCont
- ((k1 (v6)
- (InvokeContinuation return (v6))))
- (InvokeMethod v5 length () k1))))
- (ConcatenateStrings (v2 v0 v3 v1 v4) k0))))))))
-""";
-String CP7_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (String "b")))
- (LetPrim (v1 (Constant (String "d")))
- (LetPrim (v2 (Constant (String "a")))
- (LetPrim (v3 (Constant (String "c")))
- (LetPrim (v4 (Constant (String "")))
- (LetCont
- ((k0 (v5)
- (LetCont
- ((k1 (v6)
- (InvokeContinuation return (v6))))
- (InvokeMethod v5 length () k1))))
- (LetPrim (v7 (Constant (String "abcd")))
- (InvokeContinuation k0 (v7))))))))))
-""";
-
-// TODO(jgruber): We can't test is-check optimization because the unstringifier
-// does not recreate accurate types for the TypeOperator node.
-
-// Simple branch removal.
-
-String CP8_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 1)))
- (LetCont
- ((k0 (v2)
- (LetCont
- ((k1 ()
- (LetPrim (v3 (Constant (Int 42)))
- (InvokeContinuation return (v3))))
- (k2 ()
- (InvokeContinuation return (v0))))
- (Branch (IsTrue v2) k1 k2))))
- (InvokeMethod v0 == (v1) k0)))))
-""";
-String CP8_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetPrim (v1 (Constant (Int 1)))
- (LetCont
- ((k0 (v2)
- (LetCont
- ((k1 ()
- (LetPrim (v3 (Constant (Int 42)))
- (InvokeContinuation return (v3))))
- (k2 ()
- (InvokeContinuation return (v0))))
- (InvokeContinuation k1 ()))))
- (LetPrim (v4 (Constant (Bool true)))
- (InvokeContinuation k0 (v4)))))))
-""";
-
-// While loop.
-
-String CP9_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetCont
- ((rec k0 (v1)
- (LetCont
- ((k1 ()
- (InvokeContinuation return (v1)))
- (k2 ()
- (LetPrim (v2 (Constant (Int 1)))
- (LetCont
- ((k3 (v3)
- (LetCont
- ((k4 (v4)
- (LetCont
- ((k5 ()
- (LetPrim (v5 (Constant (Int 42)))
- (InvokeContinuation return (v5))))
- (k6 ()
- (LetPrim (v6 (Constant (Int 1)))
- (LetCont
- ((k7 (v7)
- (InvokeContinuation rec k0 (v7))))
- (InvokeMethod v1 + (v6) k7)))))
- (Branch (IsTrue v4) k5 k6))))
- (LetCont
- ((k8 ()
- (LetPrim (v8 (Constant (Bool false)))
- (InvokeContinuation k4 (v8))))
- (k9 ()
- (LetPrim (v9 (Constant (Bool true)))
- (InvokeContinuation k4 (v9)))))
- (Branch (IsTrue v3) k8 k9)))))
- (InvokeMethod v1 == (v2) k3)))))
- (LetPrim (v10 (Constant (Bool true)))
- (Branch (IsTrue v10) k2 k1)))))
- (InvokeContinuation k0 (v0)))))
-""";
-String CP9_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 1)))
- (LetCont
- ((rec k0 (v1)
- (LetCont
- ((k1 ()
- (InvokeContinuation return (v1)))
- (k2 ()
- (LetPrim (v2 (Constant (Int 1)))
- (LetCont
- ((k3 (v3)
- (LetCont
- ((k4 (v4)
- (LetCont
- ((k5 ()
- (LetPrim (v5 (Constant (Int 42)))
- (InvokeContinuation return (v5))))
- (k6 ()
- (LetPrim (v6 (Constant (Int 1)))
- (LetCont
- ((k7 (v7)
- (InvokeContinuation rec k0 (v7))))
- (InvokeMethod v1 + (v6) k7)))))
- (Branch (IsTrue v4) k5 k6))))
- (LetCont
- ((k8 ()
- (LetPrim (v8 (Constant (Bool false)))
- (InvokeContinuation k4 (v8))))
- (k9 ()
- (LetPrim (v9 (Constant (Bool true)))
- (InvokeContinuation k4 (v9)))))
- (Branch (IsTrue v3) k8 k9)))))
- (InvokeMethod v1 == (v2) k3)))))
- (LetPrim (v10 (Constant (Bool true)))
- (InvokeContinuation k2 ())))))
- (InvokeContinuation k0 (v0)))))
-""";
-
-// While loop, from:
-//
-// int main() {
-// for (int i = 0; i < 2; i++) {
-// print(42 + i);
-// }
-// }
-
-String CP10_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v1)
- (LetCont
- ((k1 ()
- (LetPrim (v2 (Constant (Null)))
- (InvokeContinuation return (v2))))
- (k2 ()
- (LetPrim (v3 (Constant (Int 42)))
- (LetCont
- ((k3 (v4)
- (LetCont
- ((k4 (v5)
- (LetPrim (v6 (Constant (Int 1)))
- (LetCont
- ((k5 (v7)
- (InvokeContinuation rec k0 (v7))))
- (InvokeMethod v1 + (v6) k5)))))
- (InvokeStatic print (v4) k4))))
- (InvokeMethod v3 + (v1) k3)))))
- (LetPrim (v8 (Constant (Int 2)))
- (LetCont
- ((k6 (v9)
- (Branch (IsTrue v9) k2 k1)))
- (InvokeMethod v1 < (v8) k6))))))
- (InvokeContinuation k0 (v0)))))
-""";
-String CP10_OUT = CP10_IN;
-
-/// Normalizes whitespace by replacing all whitespace sequences by a single
-/// space and trimming leading and trailing whitespace.
-String normalizeSExpr(String input) {
- return input.replaceAll(new RegExp(r'[ \n\t]+'), ' ').trim();
-}
-
-/// Parses the given input IR, runs an optimization pass over it, and compares
-/// the stringification of the result against the expected output.
-Future testConstantPropagator(String input, String expectedOutput) {
- final compiler = new MockCompiler.internal(
- emitJavaScript: false,
- enableMinification: false);
- return compiler.init().then((_) {
- final unstringifier = new SExpressionUnstringifier();
- final stringifier = new SExpressionStringifier();
- final optimizer = new TypePropagator(
- compiler.types,
- DART_CONSTANT_SYSTEM,
- new UnitTypeSystem(),
- compiler.internalError);
-
- final f = unstringifier.unstringify(input);
- optimizer.rewrite(f);
-
- String expected = normalizeSExpr(expectedOutput);
- String actual = normalizeSExpr(stringifier.visit(f));
-
- Expect.equals(expected, actual);
- });
-}
-
-void main() {
- asyncTest(() => testConstantPropagator(CP1_IN, CP1_OUT));
- asyncTest(() => testConstantPropagator(CP2_IN, CP2_OUT));
- asyncTest(() => testConstantPropagator(CP3_IN, CP3_OUT));
- asyncTest(() => testConstantPropagator(CP4_IN, CP4_OUT));
- asyncTest(() => testConstantPropagator(CP5_IN, CP5_OUT));
- asyncTest(() => testConstantPropagator(CP6_IN, CP6_OUT));
- asyncTest(() => testConstantPropagator(CP7_IN, CP7_OUT));
- asyncTest(() => testConstantPropagator(CP8_IN, CP8_OUT));
- asyncTest(() => testConstantPropagator(CP9_IN, CP9_OUT));
- asyncTest(() => testConstantPropagator(CP10_IN, CP10_OUT));
-}
diff --git a/tests/compiler/dart2js/backend_dart/opt_cyclic_redundant_phi_test.dart b/tests/compiler/dart2js/backend_dart/opt_cyclic_redundant_phi_test.dart
deleted file mode 100644
index 7132824..0000000
--- a/tests/compiler/dart2js/backend_dart/opt_cyclic_redundant_phi_test.dart
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'opt_redundant_phi_test.dart';
-
-// The 'cyclic deps' IR tests removal of redundant phis with cyclic
-// dependencies.
-//
-// void main() {
-// var x = 0;
-// var y = x;
-// for (int i = 0; i < 10; i++) {
-// if (i == -1) x = y;
-// if (i == -1) y = x;
-// }
-// print(x);
-// print(y);
-// }
-
-String CYCLIC_DEPS_IN = """
-(FunctionDefinition main (return) (LetPrim v0 (Constant 0))
- (LetPrim v1 (Constant 0))
- (LetCont* (k0 v2 v3 v4)
- (LetCont (k1)
- (LetCont (k2 v5)
- (LetCont (k3 v6) (LetPrim v7 (Constant null))
- (InvokeContinuation return v7))
- (InvokeStatic print v3 k3))
- (InvokeStatic print v2 k2))
- (LetCont (k4) (LetPrim v8 (Constant 1))
- (LetCont (k5 v9)
- (LetCont (k6 v10)
- (LetCont (k7 v11) (LetPrim v12 (Constant 1))
- (LetCont (k8 v13)
- (LetCont (k9 v14)
- (LetCont (k10 v15)
- (LetPrim v16 (Constant 1))
- (LetCont (k11 v17)
- (InvokeContinuation* k0 v11 v15 v17))
- (InvokeMethod v4 + v16 k11))
- (LetCont (k12) (InvokeContinuation k10 v11))
- (LetCont (k13) (InvokeContinuation k10 v3))
- (Branch (IsTrue v14) k12 k13))
- (InvokeMethod v4 == v13 k9))
- (InvokeMethod v12 unary- k8))
- (LetCont (k14) (InvokeContinuation k7 v3))
- (LetCont (k15) (InvokeContinuation k7 v2))
- (Branch (IsTrue v10) k14 k15))
- (InvokeMethod v4 == v9 k6))
- (InvokeMethod v8 unary- k5))
- (LetPrim v18 (Constant 10))
- (LetCont (k16 v19) (Branch (IsTrue v19) k4 k1))
- (InvokeMethod v4 < v18 k16))
- (InvokeContinuation k0 v0 v0 v1))
-""";
-
-String CYCLIC_DEPS_OUT = """
-(FunctionDefinition main (return) (LetPrim v0 (Constant 0))
- (LetPrim v1 (Constant 0))
- (LetCont* (k0 v2)
- (LetCont (k1)
- (LetCont (k2 v3)
- (LetCont (k3 v4) (LetPrim v5 (Constant null))
- (InvokeContinuation return v5))
- (InvokeStatic print v0 k3))
- (InvokeStatic print v0 k2))
- (LetCont (k4) (LetPrim v6 (Constant 1))
- (LetCont (k5 v7)
- (LetCont (k6 v8)
- (LetCont (k7) (LetPrim v9 (Constant 1))
- (LetCont (k8 v10)
- (LetCont (k9 v11)
- (LetCont (k10)
- (LetPrim v12 (Constant 1))
- (LetCont (k11 v13)
- (InvokeContinuation* k0 v13))
- (InvokeMethod v2 + v12 k11))
- (LetCont (k12) (InvokeContinuation k10))
- (LetCont (k13) (InvokeContinuation k10))
- (Branch (IsTrue v11) k12 k13))
- (InvokeMethod v2 == v10 k9))
- (InvokeMethod v9 unary- k8))
- (LetCont (k14) (InvokeContinuation k7))
- (LetCont (k15) (InvokeContinuation k7))
- (Branch (IsTrue v8) k14 k15))
- (InvokeMethod v2 == v7 k6))
- (InvokeMethod v6 unary- k5))
- (LetPrim v14 (Constant 10))
- (LetCont (k16 v15) (Branch (IsTrue v15) k4 k1))
- (InvokeMethod v2 < v14 k16))
- (InvokeContinuation k0 v1))
-""";
-
-void main() {
- testRedundantPhi(CYCLIC_DEPS_IN, CYCLIC_DEPS_OUT);
-}
diff --git a/tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart b/tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart
deleted file mode 100644
index 50422e2..0000000
--- a/tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart
+++ /dev/null
@@ -1,309 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'sexpr_unstringifier.dart';
-import "package:expect/expect.dart";
-import 'package:compiler/src/cps_ir/cps_ir_nodes.dart';
-import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart';
-import 'package:compiler/src/cps_ir/optimizers.dart';
-
-// The 'read in loop' IR tests the most basic case of redundant phi removal
-// and represents the following source code:
-//
-// void main() {
-// int j = 42;
-// for (int i = 0; i < 2; i++) {
-// print(j.toString());
-// }
-// }
-
-String READ_IN_LOOP_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 42)))
- (LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v2 v3)
- (LetCont
- ((k1 ()
- (LetPrim (v4 (Constant (Null)))
- (InvokeContinuation return (v4))))
- (k2 ()
- (LetCont
- ((k3 (v5)
- (LetCont
- ((k4 (v6)
- (LetPrim (v7 (Constant (Int 1)))
- (LetCont
- ((k5 (v8)
- (InvokeContinuation rec k0 (v2 v8))))
- (InvokeMethod v3 + (v7) k5)))))
- (InvokeStatic print (v5) k4))))
- (InvokeMethod v2 toString () k3))))
- (LetPrim (v9 (Constant (Int 2)))
- (LetCont
- ((k6 (v10)
- (Branch (IsTrue v10) k2 k1)))
- (InvokeMethod v3 < (v9) k6))))))
- (InvokeContinuation k0 (v0 v1))))))
-""";
-
-String READ_IN_LOOP_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 42)))
- (LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v2)
- (LetCont
- ((k1 ()
- (LetPrim (v3 (Constant (Null)))
- (InvokeContinuation return (v3))))
- (k2 ()
- (LetCont
- ((k3 (v4)
- (LetCont
- ((k4 (v5)
- (LetPrim (v6 (Constant (Int 1)))
- (LetCont
- ((k5 (v7)
- (InvokeContinuation rec k0 (v7))))
- (InvokeMethod v2 + (v6) k5)))))
- (InvokeStatic print (v4) k4))))
- (InvokeMethod v0 toString () k3))))
- (LetPrim (v8 (Constant (Int 2)))
- (LetCont
- ((k6 (v9)
- (Branch (IsTrue v9) k2 k1)))
- (InvokeMethod v2 < (v8) k6))))))
- (InvokeContinuation k0 (v1))))))
-""";
-
-// The 'inner loop' IR represents the following source code:
-//
-// void main() {
-// int j = 42;
-// for (int i = 0; i < 2; i++) {
-// for (int k = 0; k < 2; k++) {
-// print(i.toString());
-// }
-// }
-// print(j.toString());
-// }
-//
-// This test case ensures that iterative optimization works: first, v8 and v9
-// are removed from k5, and only then can k0 be optimized as well.
-
-const String INNER_LOOP_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 42)))
- (LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v2 v3)
- (LetCont
- ((k1 ()
- (LetCont
- ((k2 (v4)
- (LetCont
- ((k3 (v5)
- (LetPrim (v6 (Constant (Null)))
- (InvokeContinuation return (v6)))))
- (InvokeStatic print (v4) k3))))
- (InvokeMethod v2 toString () k2)))
- (k4 ()
- (LetPrim (v7 (Constant (Int 0)))
- (LetCont
- ((rec k5 (v8 v9 v10)
- (LetCont
- ((k6 ()
- (LetPrim (v11 (Constant (Int 1)))
- (LetCont
- ((k7 (v12)
- (InvokeContinuation rec k0 (v8 v12))))
- (InvokeMethod v9 + (v11) k7))))
- (k8 ()
- (LetCont
- ((k9 (v13)
- (LetCont
- ((k10 (v14)
- (LetPrim (v15 (Constant (Int 1)))
- (LetCont
- ((k11 (v16)
- (InvokeContinuation rec k5 (v8 v9 v16))))
- (InvokeMethod v10 + (v15) k11)))))
- (InvokeStatic print (v13) k10))))
- (InvokeMethod v9 toString () k9))))
- (LetPrim (v17 (Constant (Int 2)))
- (LetCont
- ((k12 (v18)
- (Branch (IsTrue v18) k8 k6)))
- (InvokeMethod v10 < (v17) k12))))))
- (InvokeContinuation k5 (v2 v3 v7))))))
- (LetPrim (v19 (Constant (Int 2)))
- (LetCont
- ((k13 (v20)
- (Branch (IsTrue v20) k4 k1)))
- (InvokeMethod v3 < (v19) k13))))))
- (InvokeContinuation k0 (v0 v1))))))
-""";
-
-const String INNER_LOOP_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 42)))
- (LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v2)
- (LetCont
- ((k1 ()
- (LetCont
- ((k2 (v3)
- (LetCont
- ((k3 (v4)
- (LetPrim (v5 (Constant (Null)))
- (InvokeContinuation return (v5)))))
- (InvokeStatic print (v3) k3))))
- (InvokeMethod v0 toString () k2)))
- (k4 ()
- (LetPrim (v6 (Constant (Int 0)))
- (LetCont
- ((rec k5 (v7)
- (LetCont
- ((k6 ()
- (LetPrim (v8 (Constant (Int 1)))
- (LetCont
- ((k7 (v9)
- (InvokeContinuation rec k0 (v9))))
- (InvokeMethod v2 + (v8) k7))))
- (k8 ()
- (LetCont
- ((k9 (v10)
- (LetCont
- ((k10 (v11)
- (LetPrim (v12 (Constant (Int 1)))
- (LetCont
- ((k11 (v13)
- (InvokeContinuation rec k5 (v13))))
- (InvokeMethod v7 + (v12) k11)))))
- (InvokeStatic print (v10) k10))))
- (InvokeMethod v2 toString () k9))))
- (LetPrim (v14 (Constant (Int 2)))
- (LetCont
- ((k12 (v15)
- (Branch (IsTrue v15) k8 k6)))
- (InvokeMethod v7 < (v14) k12))))))
- (InvokeContinuation k5 (v6))))))
- (LetPrim (v16 (Constant (Int 2)))
- (LetCont
- ((k13 (v17)
- (Branch (IsTrue v17) k4 k1)))
- (InvokeMethod v2 < (v16) k13))))))
- (InvokeContinuation k0 (v1))))))
-""";
-
-// There are no redundant phis in the 'basic loop' IR, and this test ensures
-// simply that the optimization does not alter the IR. It represents the
-// following program:
-//
-// void main() {
-// for (int i = 0; i < 2; i++) {
-// print(i.toString());
-// }
-// }
-
-String BASIC_LOOP_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v1)
- (LetCont
- ((k1 ()
- (LetPrim (v2 (Constant (Null)))
- (InvokeContinuation return (v2))))
- (k2 ()
- (LetCont
- ((k3 (v3)
- (LetCont
- ((k4 (v4)
- (LetPrim (v5 (Constant (Int 1)))
- (LetCont
- ((k5 (v6)
- (InvokeContinuation rec k0 (v6))))
- (InvokeMethod v1 + (v5) k5)))))
- (InvokeStatic print (v3) k4))))
- (InvokeMethod v1 toString () k3))))
- (LetPrim (v7 (Constant (Int 2)))
- (LetCont
- ((k6 (v8)
- (Branch (IsTrue v8) k2 k1)))
- (InvokeMethod v1 < (v7) k6))))))
- (InvokeContinuation k0 (v0)))))
-""";
-
-String BASIC_LOOP_OUT = BASIC_LOOP_IN;
-
-// Ensures that proper scoping is preserved, i.e. that the optimized
-// continuation body does reference out of scope primitives.
-// IR written by hand since this case is currently not being generated.
-
-String SCOPING_IN = """
-(FunctionDefinition main () () return
- (LetCont
- ((k0 (v1)
- (InvokeStatic print (v1) return)))
- (LetPrim (v0 (Constant (Int 0)))
- (LetPrim (v2 (Constant (Null)))
- (InvokeContinuation k0 (v0))))))
-""";
-
-String SCOPING_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont
- ((k0 ()
- (InvokeStatic print (v0) return)))
- (LetPrim (v1 (Constant (Null)))
- (InvokeContinuation k0 ())))))
-""";
-
-// Ensures that continuations which are never invoked are not optimized.
-// IR written by hand.
-
-String NEVER_INVOKED_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont
- ((k0 (v1)
- (InvokeStatic print (v1) return)))
- (InvokeContinuation return (v0)))))
-""";
-
-String NEVER_INVOKED_OUT = NEVER_INVOKED_IN;
-
-/// Normalizes whitespace by replacing all whitespace sequences by a single
-/// space and trimming leading and trailing whitespace.
-String normalizeSExpr(String input) {
- return input.replaceAll(new RegExp(r'[ \n\t]+'), ' ').trim();
-}
-
-/// Parses the given input IR, runs a redundant phi pass over it, and compares
-/// the stringification of the result against the expected output.
-void testRedundantPhi(String input, String expectedOutput) {
- final unstringifier = new SExpressionUnstringifier();
- final stringifier = new SExpressionStringifier();
- final optimizer = new RedundantPhiEliminator();
-
- FunctionDefinition f = unstringifier.unstringify(input);
- optimizer.rewrite(f);
-
- String expected = normalizeSExpr(expectedOutput);
- String actual = normalizeSExpr(stringifier.visit(f));
-
- Expect.equals(expected, actual, "Actual:\n$actual");
-}
-
-void main() {
- testRedundantPhi(READ_IN_LOOP_IN, READ_IN_LOOP_OUT);
- testRedundantPhi(INNER_LOOP_IN, INNER_LOOP_OUT);
- testRedundantPhi(BASIC_LOOP_IN, BASIC_LOOP_OUT);
- testRedundantPhi(SCOPING_IN, SCOPING_OUT);
- testRedundantPhi(NEVER_INVOKED_IN, NEVER_INVOKED_OUT);
-}
diff --git a/tests/compiler/dart2js/backend_dart/opt_shrinking_test.dart b/tests/compiler/dart2js/backend_dart/opt_shrinking_test.dart
deleted file mode 100644
index 906a6cf..0000000
--- a/tests/compiler/dart2js/backend_dart/opt_shrinking_test.dart
+++ /dev/null
@@ -1,331 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'sexpr_unstringifier.dart';
-import "package:expect/expect.dart";
-import 'package:compiler/src/cps_ir/cps_ir_nodes.dart';
-import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart';
-import 'package:compiler/src/cps_ir/optimizers.dart';
-
-// The tests in this file that ensure shrinking reductions work as expected.
-// Reductions and their corresponding names are taken from
-// 'Compiling with Continuations, Continued' by Andrew Kennedy.
-
-// Basic dead-val: letprim x = V in K -> K (x not free in K).
-//
-// int main() {
-// int i = 42;
-// return 0;
-// }
-
-String DEAD_VAL_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 42)))
- (LetPrim (v1 (Constant (Int 0)))
- (InvokeContinuation return (v1)))))
-""";
-String DEAD_VAL_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (InvokeContinuation return (v0))))
-""";
-
-// Iterative dead-val. No optimizations possible since the continuation to
-// InvokeMethod must have one argument, even if it is unused.
-//
-// int main() {
-// int i = 42;
-// int j = i + 1;
-// return 0;
-// }
-
-String ITERATIVE_DEAD_VAL1_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 42)))
- (LetPrim (v1 (Constant (Int 1)))
- (LetCont ((k0 (v2)
- (LetPrim (v3 (Constant (Int 0)))
- (InvokeContinuation return (v3)))))
- (InvokeMethod v0 + (v1) k0)))))
-""";
-String ITERATIVE_DEAD_VAL1_OUT = ITERATIVE_DEAD_VAL1_IN;
-
-// Iterative dead-val. IR written by hand.
-
-String ITERATIVE_DEAD_VAL2_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 42)))
- (LetPrim (v1
- (CreateFunction
- (FunctionDefinition f () (i) return
- (InvokeContinuation return (v0)))))
- (LetPrim (v2 (Constant (Int 0)))
- (InvokeContinuation return (v2))))))
-""";
-String ITERATIVE_DEAD_VAL2_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (InvokeContinuation return (v0))))
-""";
-
-// Basic dead-cont: letcont k x = L in K -> K (k not free in K).
-// IR written by hand.
-
-String DEAD_CONT_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v4 (Constant (Int 0)))
- (LetCont ((k0 (v0)
- (InvokeConstructor List () return)))
- (LetCont ((k1 (v1)
- (LetCont ((k2 (v2)
- (LetPrim (v3 (Constant (Int 0)))
- (InvokeContinuation return (v3)))))
- (InvokeStatic print (v4) k2))))
- (InvokeStatic print (v4) k1)))))
-""";
-String DEAD_CONT_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont ((k0 (v1)
- (LetCont ((k1 (v2)
- (LetPrim (v3 (Constant (Int 0)))
- (InvokeContinuation return (v3)))))
- (InvokeStatic print (v0) k1))))
- (InvokeStatic print (v0) k0))))
-""";
-
-// Iterative dead-cont. IR written by hand.
-
-String ITERATIVE_DEAD_CONT_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v4 (Constant (Int 0)))
- (LetCont ((k0 (v0)
- (InvokeConstructor List () return)))
- (LetCont ((k3 (v5)
- (InvokeContinuation k0 (v5))))
- (LetCont ((k1 (v1)
- (LetCont ((k2 (v2)
- (LetPrim (v3 (Constant (Int 0)))
- (InvokeContinuation return (v3)))))
- (InvokeStatic print (v4) k2))))
- (InvokeStatic print (v4) k1))))))
-""";
-String ITERATIVE_DEAD_CONT_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont ((k0 (v1)
- (LetCont ((k1 (v2)
- (LetPrim (v3 (Constant (Int 0)))
- (InvokeContinuation return (v3)))))
- (InvokeStatic print (v0) k1))))
- (InvokeStatic print (v0) k0))))
-""";
-
-// Beta-cont-lin: letcont k x = K in C[k y] -> C[K[y/x]] (k not free in C).
-// IR written by hand.
-
-String BETA_CONT_LIN_IN = """
-(FunctionDefinition main () () return
- (LetCont ((k0 (v0)
- (LetCont ((k1 (v1)
- (LetCont ((k2 (v2)
- (LetPrim (v3 (Constant (Int 0)))
- (InvokeContinuation return (v3)))))
- (InvokeStatic print (v0) k2))))
- (InvokeStatic print (v0) k1))))
- (LetPrim (v4 (Constant (Int 0)))
- (InvokeContinuation k0 (v4)))))
-""";
-String BETA_CONT_LIN_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont ((k0 (v1)
- (LetCont ((k1 (v2)
- (LetPrim (v3 (Constant (Int 0)))
- (InvokeContinuation return (v3)))))
- (InvokeStatic print (v0) k1))))
- (InvokeStatic print (v0) k0))))
-""";
-
-// Beta-cont-lin with recursive continuation. IR written by hand.
-
-String RECURSIVE_BETA_CONT_LIN_IN = """
-(FunctionDefinition main () () return
- (LetCont ((rec k0 (v0)
- (InvokeContinuation rec k0 (v0))))
- (LetPrim (v1 (Constant (Int 0)))
- (InvokeContinuation k0 (v1)))))
-""";
-String RECURSIVE_BETA_CONT_LIN_OUT = RECURSIVE_BETA_CONT_LIN_IN;
-
-// Beta-cont-lin used inside body. IR written by hand.
-
-String USED_BETA_CONT_LIN_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont ((k0 (v1)
- (LetCont ((k1 (v2)
- (LetCont ((k2 (v3)
- (LetPrim (v4 (Constant (Int 0)))
- (InvokeContinuation return (v4)))))
- (InvokeStatic print (v1) k2))))
- (InvokeStatic print (v1) k1))))
- (LetPrim (v5
- (CreateFunction
- (FunctionDefinition f () () return
- (InvokeContinuation return (v1)))))
- (InvokeContinuation k0 (v0))))))
-""";
-String USED_BETA_CONT_LIN_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont ((k0 (v1)
- (LetCont ((k1 (v2)
- (LetPrim (v3 (Constant (Int 0)))
- (InvokeContinuation return (v3)))))
- (InvokeStatic print (v0) k1))))
- (InvokeStatic print (v0) k0))))
-""";
-
-// Eta-cont: letcont k x = j x in K -> K[j/k].
-// IR written by hand.
-//
-// This test is incorrectly named: with the current implementation, there is no
-// eta reduction. Instead, dead-parameter, beta-cont-lin, and dead-val
-// reductions are performed, which in turn creates a second beta-cont-lin
-// reduction.
-//
-// TODO(kmillikin): To test continuation eta reduction, use eta redexes that are
-// not overlapping beta redexes.
-String ETA_CONT_IN = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (LetCont ((rec k0 (v1)
- (InvokeContinuation return (v0))))
- (LetCont ((k1 (v2)
- (InvokeContinuation k0 (v2))))
- (LetPrim (v3
- (CreateFunction
- (FunctionDefinition f () () return
- (InvokeContinuation k0 (v0)))))
- (InvokeContinuation k1 (v0)))))))
-""";
-String ETA_CONT_OUT = """
-(FunctionDefinition main () () return
- (LetPrim (v0 (Constant (Int 0)))
- (InvokeContinuation return (v0))))
-""";
-
-// Dead-parameter:
-// letcont k x = E0 in E1 -> letcont k () = E0 in E1,
-// if x does not occur free in E0.
-
-// Parameter v1 is unused in k0.
-String DEAD_PARAMETER_IN = """
-(FunctionDefinition main () (x) return
- (LetCont ((k0 (v0 v1 v2)
- (InvokeStatic foo (v0 v2) return)))
- (LetCont ((k1 ()
- (LetPrim (v3 (Constant (Int 0)))
- (LetPrim (v4 (Constant (Int 1)))
- (LetPrim (v5 (Constant (Int 2)))
- (InvokeContinuation k0 (v3 v4 v5))))))
- (k2 ()
- (LetPrim (v6 (Constant (Int 3)))
- (LetPrim (v7 (Constant (Int 4)))
- (LetPrim (v8 (Constant (Int 5)))
- (InvokeContinuation k0 (v6 v7 v8)))))))
- (Branch (IsTrue x) k1 k2))))
-""";
-String DEAD_PARAMETER_OUT = """
-(FunctionDefinition main () (x) return
- (LetCont ((k0 (v0 v1)
- (InvokeStatic foo (v0 v1) return)))
- (LetCont ((k1 ()
- (LetPrim (v2 (Constant (Int 0)))
- (LetPrim (v3 (Constant (Int 2)))
- (InvokeContinuation k0 (v2 v3)))))
- (k2 ()
- (LetPrim (v4 (Constant (Int 3)))
- (LetPrim (v5 (Constant (Int 5)))
- (InvokeContinuation k0 (v4 v5))))))
- (Branch (IsTrue x) k1 k2))))
-""";
-
-// Create an eta-cont redex:
-// Dead parameter reductions can create an eta-cont redex by removing unused
-// continuation parameters and thus creating the eta redex.
-String CREATE_ETA_CONT_IN = """
-(FunctionDefinition main () (x) return
- (LetCont ((rec loop (v0)
- (InvokeContinuation rec loop (v0))))
- (LetCont ((created (v1 v2 v3)
- (InvokeContinuation loop (v2))))
- (LetCont ((then ()
- (LetPrim (v4 (Constant (Int 0)))
- (LetPrim (v5 (Constant (Int 1)))
- (LetPrim (v6 (Constant (Int 2)))
- (InvokeContinuation created (v4 v5 v6))))))
- (else ()
- (LetPrim (v6 (Constant (Int 3)))
- (LetPrim (v7 (Constant (Int 4)))
- (LetPrim (v8 (Constant (Int 5)))
- (InvokeContinuation created (v6 v7 v8)))))))
- (Branch (IsTrue x) then else)))))
-""";
-String CREATE_ETA_CONT_OUT = """
-(FunctionDefinition main () (x) return
- (LetCont ((rec k0 (v0)
- (InvokeContinuation rec k0 (v0))))
- (LetCont ((k1 ()
- (LetPrim (v1 (Constant (Int 1)))
- (InvokeContinuation k0 (v1))))
- (k2 ()
- (LetPrim (v2 (Constant (Int 4)))
- (InvokeContinuation k0 (v2)))))
- (Branch (IsTrue x) k1 k2))))
-""";
-
-
-
-// Beta-fun-lin and eta-fun might not apply to us, since
-// a. in (InvokeMethod v0 call k0), v0 might carry state, and
-// b. there is no way to generate static nested functions that we could
-// use InvokeStatic on.
-
-/// Normalizes whitespace by replacing all whitespace sequences by a single
-/// space and trimming leading and trailing whitespace.
-String normalizeSExpr(String input) {
- return input.replaceAll(new RegExp(r'[ \n\t]+'), ' ').trim();
-}
-
-/// Parses the given input IR, runs an optimization pass over it, and compares
-/// the stringification of the result against the expected output.
-void testShrinkingReducer(String input, String expectedOutput) {
- final unstringifier = new SExpressionUnstringifier();
- final stringifier = new SExpressionStringifier();
- final optimizer = new ShrinkingReducer();
-
- FunctionDefinition f = unstringifier.unstringify(input);
- optimizer.rewrite(f);
-
- String expected = normalizeSExpr(expectedOutput);
- String actual = normalizeSExpr(stringifier.visit(f));
-
- Expect.equals(expected, actual);
-}
-
-void main() {
- testShrinkingReducer(DEAD_VAL_IN, DEAD_VAL_OUT);
- testShrinkingReducer(ITERATIVE_DEAD_VAL1_IN, ITERATIVE_DEAD_VAL1_OUT);
- testShrinkingReducer(ITERATIVE_DEAD_VAL2_IN, ITERATIVE_DEAD_VAL2_OUT);
- testShrinkingReducer(DEAD_CONT_IN, DEAD_CONT_OUT);
- testShrinkingReducer(ITERATIVE_DEAD_CONT_IN, ITERATIVE_DEAD_CONT_OUT);
- testShrinkingReducer(BETA_CONT_LIN_IN, BETA_CONT_LIN_OUT);
- testShrinkingReducer(RECURSIVE_BETA_CONT_LIN_IN, RECURSIVE_BETA_CONT_LIN_OUT);
- testShrinkingReducer(USED_BETA_CONT_LIN_IN, USED_BETA_CONT_LIN_OUT);
- testShrinkingReducer(ETA_CONT_IN, ETA_CONT_OUT);
- testShrinkingReducer(DEAD_PARAMETER_IN, DEAD_PARAMETER_OUT);
- testShrinkingReducer(CREATE_ETA_CONT_IN, CREATE_ETA_CONT_OUT);
-}
diff --git a/tests/compiler/dart2js/backend_dart/sexpr2_test.dart b/tests/compiler/dart2js/backend_dart/sexpr2_test.dart
deleted file mode 100644
index 03803bd..0000000
--- a/tests/compiler/dart2js/backend_dart/sexpr2_test.dart
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Unittest test of the CPS ir generated by the dart2dart compiler.
-library dart_backend.sexpr2_test;
-
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/cps_ir/cps_ir_nodes.dart';
-import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart';
-import 'package:compiler/src/elements/elements.dart';
-import 'package:expect/expect.dart';
-
-import '../../../../pkg/analyzer2dart/test/test_helper.dart';
-import '../../../../pkg/analyzer2dart/test/sexpr_data.dart';
-
-import 'test_helper.dart';
-
-main(List<String> args) {
- performTests(TEST_DATA, asyncTester, runTest, args);
-}
-
-runTest(TestSpec result) {
- return compilerFor(result.input).then((Compiler compiler) {
- void checkOutput(String elementName,
- Element element,
- String expectedOutput) {
- FunctionDefinition ir = compiler.irBuilder.getIr(element);
- if (expectedOutput == null) {
- Expect.isNull(ir, "\nInput:\n${result.input}\n"
- "No CPS IR expected for $element");
- } else {
- Expect.isNotNull(ir, "\nInput:\n${result.input}\n"
- "No CPS IR for $element");
- expectedOutput = expectedOutput.trim();
- String output = ir.accept(new SExpressionStringifier()).trim();
- Expect.equals(expectedOutput, output,
- "\nInput:\n${result.input}\n"
- "Expected for '$elementName':\n$expectedOutput\n"
- "Actual for '$elementName':\n$output\n");
- }
- }
-
- if (result.output is String) {
- checkOutput('main', compiler.mainFunction, result.output);
- } else {
- assert(result.output is Map<String, String>);
- result.output.forEach((String elementName, String output) {
- Element element;
- if (elementName.contains('.')) {
- ClassElement cls = compiler.mainApp.localLookup(
- elementName.substring(0, elementName.indexOf('.')));
- element = cls.localLookup(
- elementName.substring(elementName.indexOf('.') + 1));
- } else {
- element = compiler.mainApp.localLookup(elementName);
- }
- checkOutput(elementName, element, output);
- });
- }
- });
-}
\ No newline at end of file
diff --git a/tests/compiler/dart2js/backend_dart/sexpr_test.dart b/tests/compiler/dart2js/backend_dart/sexpr_test.dart
deleted file mode 100644
index 2293cdb..0000000
--- a/tests/compiler/dart2js/backend_dart/sexpr_test.dart
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart_backend.sexpr_test;
-
-import 'dart:async';
-
-import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/cps_ir/cps_ir_nodes.dart';
-import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart';
-import 'package:expect/expect.dart';
-
-import '../compiler_helper.dart' hide compilerFor;
-import 'sexpr_unstringifier.dart';
-import 'test_helper.dart';
-
-const String CODE = """
-class Foo {
- static int x = 1;
- foo() => 42;
-}
-
-class Bar extends Foo {
- int y = 2;
- Bar() {
- Foo.x = 2;
- }
- foo() => this.y + super.foo();
-}
-
-class FooBar<T> {
- bool foobar() => T is int;
-}
-
-main() {
- Foo foo;
- if (foo is Foo) {
- print("Surprise");
- }
-
- String inner() => "Inner function";
- print(inner());
-
- int j = 42;
- for (int i = 0; i < 2; i++) {
- print(i.toString());
- }
-
- print(Foo.x);
-
- String recursive(int h) {
- if (h < 1) {
- return j.toString();
- }
- j++;
- return "h\$\{recursive(h - 1)\}";
- }
- print(recursive(5));
-
- Bar bar = new Bar();
- print(bar.foo().toString());
-
- bar = foo as Bar;
- if (bar == null) {
- var list = [1, 2, 3, 4];
- var map = { 1: "one"
- , 2: "two"
- , 3: "three"
- };
- var double = 3.14;
- list.forEach((i) => print(i.toString()));
- print("\$list \$map \$double");
- }
-
- print(new FooBar<int>().foobar());
-}
-
-""";
-
-bool shouldOutput(Element element) {
- return (!element.library.isPlatformLibrary &&
- !element.isSynthesized &&
- element.kind == ElementKind.FUNCTION);
-}
-
-/// Compiles the given dart code (which must include a 'main' function) and
-/// returns a list of all generated CPS IR definitions.
-Future<List<FunctionDefinition>> compile(String code) {
- return compilerFor(code).then((Compiler compiler) {
- return compiler.enqueuer.resolution.resolvedElements
- .where(shouldOutput)
- .map(compiler.irBuilder.getIr)
- .toList();
- });
-}
-
-/// Returns an S-expression string for each compiled function.
-List<String> stringifyAll(Iterable<FunctionDefinition> functions) {
- final stringifier = new SExpressionStringifier();
- return functions.map((f) => stringifier.visitFunctionDefinition(f)).toList();
-}
-
-Future<List<String>> testStringifier(String code,
- Iterable<String> expectedTokens) {
- return compile(code)
- .then((List<FunctionDefinition> functions) {
- List<String> sexprs = stringifyAll(functions);
- String combined = sexprs.join();
- String withoutNullConstants = combined.replaceAll("Constant null", "");
- Expect.isFalse(withoutNullConstants.contains("null"));
- for (String token in expectedTokens) {
- Expect.isTrue(combined.contains(token),
- "'$combined' doesn't contain '$token' in test:\n$code");
- }
-
- return sexprs;
- });
-}
-
-/// Checks if the generated S-expressions can be processed by the unstringifier,
-/// returns the resulting definitions.
-List<FunctionDefinition> testUnstringifier(List<String> sexprs) {
- return sexprs.map((String sexpr) {
- try {
- final function = new SExpressionUnstringifier().unstringify(sexpr);
- Expect.isNotNull(function, "Unstringification failed:\n\n$sexpr");
- return function;
- } catch (e, s) {
- print('$e\n$s');
- Expect.fail('Error unstringifying "$sexpr": $e');
- }
- }).toList();
-}
-
-void main() {
- final tokens =
- [ "FunctionDefinition"
- , "IsTrue"
-
- // Expressions
- , "Branch"
- , "ConcatenateStrings"
- , "DeclareFunction"
- , "InvokeConstructor"
- , "InvokeContinuation"
- , "InvokeMethod"
- , "InvokeStatic"
- , "InvokeMethodDirectly"
- , "LetCont"
- , "LetPrim"
- , "SetMutableVariable"
- , "TypeOperator"
-
- // Primitives
- , "Constant"
- , "CreateFunction"
- , "GetMutableVariable"
- , "LiteralList"
- , "LiteralMap"
- // Parameters are encoded by name only and hence are not in this list.
- , "ReifyTypeVar"
-
- , "(this)" // 'this' Parameter declarations
- , "this" // 'this' Parameter uses
-
- ];
-
- asyncTest(() => testStringifier(CODE, tokens).then((List<String> sexprs) {
- final functions = testUnstringifier(sexprs);
-
- // Ensure that
- // stringified(CODE) == stringified(unstringified(stringified(CODE)))
- Expect.listEquals(sexprs, stringifyAll(functions));
- }));
-}
diff --git a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
deleted file mode 100644
index e0252e7..0000000
--- a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
+++ /dev/null
@@ -1,885 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// SExpressionUnstringifier implements the inverse operation to
-// [SExpressionStringifier].
-
-library sexpr_unstringifier;
-
-import 'package:compiler/src/constants/expressions.dart';
-import 'package:compiler/src/constants/values.dart';
-import 'package:compiler/src/dart_types.dart' as dart_types
- show DartType;
-import 'package:compiler/src/diagnostics/messages.dart'
- show MessageKind;
-import 'package:compiler/src/elements/elements.dart';
-import 'package:compiler/src/elements/modelx.dart'
- show ErroneousElementX, TypeVariableElementX;
-import 'package:compiler/src/tree/tree.dart' show LiteralDartString;
-import 'package:compiler/src/universe/call_structure.dart'
- show CallStructure;
-import 'package:compiler/src/universe/selector.dart'
- show Selector, SelectorKind;
-import 'package:compiler/src/cps_ir/cps_ir_nodes.dart';
-
-/// Used whenever a node constructed by [SExpressionUnstringifier] needs a
-/// named entity.
-class DummyEntity extends Entity {
- final String name;
- DummyEntity(this.name);
-}
-
-/// Used whenever a node constructed by [SExpressionUnstringifier] needs a
-/// local.
-class DummyLocal extends DummyEntity implements Local {
- DummyLocal(String name) : super(name);
-
- ExecutableElement get executableContext => null;
-}
-
-// TODO(karlklose): we should remove all references to [ErroneousElement] from
-// the CPS IR. Instead, the builder must construct appropriate terms for ASTs
-// that could not be resolved correctly. Perhaps the IR should not rely on
-// elements at all for naming.
-/// Used whenever a node constructed by [SExpressionUnstringifier] requires
-/// an [Element] or [FunctionElement]. Extends [ErroneousElementX] since there
-/// is currently a large amount of overhead when extending the base abstract
-/// classes, and erroneous elements conveniently also skip several assertion
-/// checks in CPS IR nodes that are irrelevant to us.
-class DummyElement extends ErroneousElementX
- implements TypeVariableElement, FieldElement {
- DummyElement(String name)
- : super(MessageKind.GENERIC, {}, name, null);
-
- final dart_types.DartType bound = null;
- final TypeDeclarationElement typeDeclaration = null;
-
- noSuchMethod(inv) => super.noSuchMethod(inv);
-}
-
-/// Used whenever a node constructed by [SExpressionUnstringifier] requires
-/// a named type.
-class DummyNamedType extends dart_types.DartType {
- final String name;
-
- final kind = null;
- final element = null;
-
- DummyNamedType(this.name);
-
- subst(arguments, parameters) => null;
- unalias(compiler) => null;
- accept(visitor, argument) => null;
-
- String toString() => name;
-}
-
-/// Represents a list of tokens, but is basically a partial view into a list
-/// with appropriate convenience methods.
-class Tokens {
- final List<String> _list;
- int _index; // Current index into the list.
-
- Tokens(List<String> this._list) : _index = 0;
-
- String get current => _list[_index];
- String get next => _list[_index + 1];
-
- String read([String expected]) {
- if (expected != null) {
- if (current != expected) {
- print('expected "$expected", found "$current"');
- int start = _index - 15;
- String dotdotdot = '... ';
- if (start < 0) {
- start = 0;
- dotdotdot = '';
- }
- print('${dotdotdot}${_list.sublist(start, _index + 1).join(' ')}');
- assert(current == expected);
- }
- }
- return _list[_index++];
- }
-
- /// Consumes the preamble to a new node, consisting of an opening parenthesis
- /// and a tag.
- void consumeStart([String tag]) {
- read("(");
- if (tag != null) {
- read(tag);
- }
- }
-
- void consumeEnd() {
- read(")");
- }
-
- bool get hasNext => _index < _list.length;
- String toString() => _list.sublist(_index).toString();
-}
-
-/// Constructs a minimal in-memory representation of the IR represented
-/// by the given string. Many fields are currently simply set to null.
-class SExpressionUnstringifier {
-
- // Expressions
- static const String BRANCH = "Branch";
- static const String CONCATENATE_STRINGS = "ConcatenateStrings";
- static const String DECLARE_FUNCTION = "DeclareFunction";
- static const String INVOKE_CONSTRUCTOR = "InvokeConstructor";
- static const String INVOKE_CONTINUATION = "InvokeContinuation";
- static const String INVOKE_STATIC = "InvokeStatic";
- static const String INVOKE_METHOD_DIRECTLY = "InvokeMethodDirectly";
- static const String INVOKE_METHOD = "InvokeMethod";
- static const String LET_PRIM = "LetPrim";
- static const String LET_CONT = "LetCont";
- static const String LET_MUTABLE = "LetMutable";
- static const String TYPE_CAST = "TypeCast";
- static const String GET_LAZY_STATIC = "GetLazyStatic";
- static const String UNREACHABLE = "Unreachable";
-
- // Primitives
- static const String CONSTANT = "Constant";
- static const String CREATE_FUNCTION = "CreateFunction";
- static const String GET_MUTABLE = "GetMutable";
- static const String SET_MUTABLE = "SetMutable";
- static const String LITERAL_LIST = "LiteralList";
- static const String LITERAL_MAP = "LiteralMap";
- static const String REIFY_TYPE_VAR = "ReifyTypeVar";
- static const String GET_STATIC = "GetStatic";
- static const String SET_STATIC = "SetStatic";
- static const String TYPE_TEST = "TypeTest";
- static const String APPLY_BUILTIN_OPERATOR = "ApplyBuiltinOperator";
- static const String GET_LENGTH = "GetLength";
- static const String GET_INDEX = "GetIndex";
- static const String SET_INDEX = "SetIndex";
- static const String GET_FIELD = "GetField";
- static const String SET_FIELD = "SetField";
-
- // Other
- static const String FUNCTION_DEFINITION = "FunctionDefinition";
- static const String IS_TRUE = "IsTrue";
-
- // Constants
- static const String BOOL = "Bool";
- static const String DOUBLE = "Double";
- static const String INT = "Int";
- static const String NULL = "Null";
- static const String STRING = "String";
-
- final Map<String, Definition> name2variable =
- <String, Definition>{ "return": new Continuation.retrn() };
-
- // Operator names used for canonicalization. In theory, we could simply use
- // Elements.isOperatorName() on the parsed tokens; however, comparisons are
- // done using identical() for performance reasons, which are reliable only for
- // compile-time literal strings.
- static Set<String> OPERATORS = new Set<String>.from(
- [ '~', '==', '[]', '*', '/', '%', '~/', '+', '<<', 'unary-'
- , '>>', '>=', '>', '<=', '<', '&', '^', '|', '[]=', '-'
- ]);
-
- // The tokens currently being parsed.
- Tokens tokens;
-
- FunctionDefinition unstringify(String s) {
- tokens = tokenize(s);
- FunctionDefinition def = parseFunctionDefinition();
- assert(!tokens.hasNext);
- return def;
- }
-
- /// Returns a new named dummy selector with a roughly appropriate kind.
- Selector dummySelector(String name, int argumentCount) {
- SelectorKind kind;
- if (name == "[]") {
- kind = SelectorKind.INDEX;
- } else if (Elements.isOperatorName(name)) {
- kind = SelectorKind.OPERATOR;
- } else {
- kind = SelectorKind.CALL;
- }
- return new Selector(kind, new PublicName(name),
- new CallStructure.unnamed(argumentCount));
- }
-
- /// Returns the tokens in s. Note that string literals are not necessarily
- /// preserved; for instance, "(literalString)" is transformed to
- /// " ( literalString ) ".
- Tokens tokenize(String s) =>
- new Tokens(
- s.replaceAll("(", " ( ")
- .replaceAll(")", " ) ")
- .replaceAll("{", " { ")
- .replaceAll("}", " } ")
- .replaceAll(new RegExp(r"[ \t\n]+"), " ")
- .trim()
- .split(" ")
- .map(canonicalizeOperators)
- .toList());
-
- /// Canonicalizes strings containing operator names.
- String canonicalizeOperators(String token) {
- String opname = OPERATORS.lookup(token);
- if (opname != null) {
- return opname;
- }
- return token;
- }
-
- Expression parseExpression() {
- assert(tokens.current == "(");
-
- switch (tokens.next) {
- case BRANCH:
- return parseBranch();
- case CONCATENATE_STRINGS:
- return parseConcatenateStrings();
- case DECLARE_FUNCTION:
- return parseDeclareFunction();
- case INVOKE_CONSTRUCTOR:
- return parseInvokeConstructor();
- case INVOKE_CONTINUATION:
- return parseInvokeContinuation();
- case INVOKE_METHOD:
- return parseInvokeMethod();
- case INVOKE_STATIC:
- return parseInvokeStatic();
- case INVOKE_METHOD_DIRECTLY:
- return parseInvokeMethodDirectly();
- case LET_PRIM:
- return parseLetPrim();
- case LET_CONT:
- return parseLetCont();
- case LET_MUTABLE:
- return parseLetMutable();
- case TYPE_CAST:
- return parseTypeCast();
- case GET_LAZY_STATIC:
- return parseGetLazyStatic();
- case UNREACHABLE:
- return parseUnreachable();
- default:
- assert(false);
- }
-
- return null;
- }
-
- /// (prim1 prim2 ... primn)
- List<Primitive> parsePrimitiveList() {
- tokens.consumeStart();
- List<Primitive> prims = <Primitive>[];
- while (tokens.current != ")") {
- Primitive prim = name2variable[tokens.read()];
- assert(prim != null);
- prims.add(prim);
- }
- tokens.consumeEnd();
- return prims;
- }
-
- /// (FunctionDefinition name (parameters) continuation body)
- FunctionDefinition parseFunctionDefinition() {
- tokens.consumeStart(FUNCTION_DEFINITION);
-
- // name
- Element element = new DummyElement("");
- if (tokens.current != '(') {
- // This is a named function.
- element = new DummyElement(tokens.read());
- }
-
- // (this) or ()
- Definition thisParameter = null;
- tokens.consumeStart();
- if (tokens.current != ')') {
- String thisName = tokens.read();
- if (name2variable.containsKey(thisName)) {
- thisParameter = name2variable[thisName];
- } else {
- thisParameter = new Parameter(new DummyElement(thisName));
- name2variable[thisName] = thisParameter;
- }
- }
- tokens.consumeEnd();
-
- // (parameters)
- List<Definition> parameters = <Definition>[];
- tokens.consumeStart();
- while (tokens.current != ")") {
- String paramName = tokens.read();
- if (name2variable.containsKey(paramName)) {
- parameters.add(name2variable[paramName]);
- } else {
- Parameter param = new Parameter(new DummyElement(paramName));
- name2variable[paramName] = param;
- parameters.add(param);
- }
- }
- tokens.consumeEnd();
-
- // continuation
- String contName = tokens.read("return");
- Continuation cont = name2variable[contName];
- assert(cont != null);
-
- // body
- Expression body = parseExpression();
-
- tokens.consumeEnd();
- return new FunctionDefinition(element, thisParameter, parameters,
- new Body(body, cont), null, null);
- }
-
- /// (IsTrue arg)
- Condition parseCondition() {
- // Handles IsTrue only for now.
- tokens.consumeStart(IS_TRUE);
-
- Definition value = name2variable[tokens.read()];
- assert(value != null);
-
- tokens.consumeEnd();
- return new IsTrue(value);
- }
-
- /// (Branch condition cont cont)
- Branch parseBranch() {
- tokens.consumeStart(BRANCH);
-
- Condition cond = parseCondition();
- Continuation trueCont = name2variable[tokens.read()];
- Continuation falseCont = name2variable[tokens.read()];
- assert(trueCont != null && falseCont != null);
-
- tokens.consumeEnd();
- return new Branch(cond, trueCont, falseCont);
- }
-
- /// (ConcatenateStrings (args) cont)
- ConcatenateStrings parseConcatenateStrings() {
- tokens.consumeStart(CONCATENATE_STRINGS);
-
- List<Primitive> args = parsePrimitiveList();
-
- Continuation cont = name2variable[tokens.read()];
- assert(cont != null);
-
- tokens.consumeEnd();
- return new ConcatenateStrings(args, cont);
- }
-
- /// (DeclareFunction name = function in body)
- DeclareFunction parseDeclareFunction() {
- tokens.consumeStart(DECLARE_FUNCTION);
-
- // name =
- MutableVariable local = addMutableVariable(tokens.read());
- tokens.read("=");
-
- // function in
- FunctionDefinition def = parseFunctionDefinition();
- tokens.read("in");
-
- // body
- Expression body = parseExpression();
-
- tokens.consumeEnd();
- return new DeclareFunction(local, def)..plug(body);
- }
-
- /// (InvokeConstructor name (args) cont)
- InvokeConstructor parseInvokeConstructor() {
- tokens.consumeStart(INVOKE_CONSTRUCTOR);
-
- String constructorName = tokens.read();
- List<String> split = constructorName.split(".");
- assert(split.length < 3);
-
- dart_types.DartType type = new DummyNamedType(split[0]);
- Element element = new DummyElement((split.length == 1) ? "" : split[1]);
-
- List<Primitive> args = parsePrimitiveList();
-
- Continuation cont = name2variable[tokens.read()];
- assert(cont != null);
-
- tokens.consumeEnd();
- Selector selector = dummySelector(constructorName, args.length);
- return new InvokeConstructor(type, element, selector, args, cont);
- }
-
- /// (InvokeContinuation rec? name (args))
- InvokeContinuation parseInvokeContinuation() {
- tokens.consumeStart(INVOKE_CONTINUATION);
- String name = tokens.read();
- bool isRecursive = name == "rec";
- if (isRecursive) name = tokens.read();
-
- Continuation cont = name2variable[name];
- assert(cont != null);
-
- List<Primitive> args = parsePrimitiveList();
-
- tokens.consumeEnd();
- return new InvokeContinuation(cont, args, isRecursive: isRecursive);
- }
-
- /// (InvokeMethod receiver method (args) cont)
- InvokeMethod parseInvokeMethod() {
- tokens.consumeStart(INVOKE_METHOD);
-
- Definition receiver = name2variable[tokens.read()];
- assert(receiver != null);
-
- String methodName = tokens.read();
-
- List<Primitive> args = parsePrimitiveList();
-
- Continuation cont = name2variable[tokens.read()];
- assert(cont != null);
-
- tokens.consumeEnd();
- Selector selector = dummySelector(methodName, args.length);
- return new InvokeMethod(receiver, selector, args, cont);
- }
-
- /// (InvokeStatic method (args) cont)
- InvokeStatic parseInvokeStatic() {
- tokens.consumeStart(INVOKE_STATIC);
-
- String methodName = tokens.read();
-
- List<Primitive> args = parsePrimitiveList();
-
- Continuation cont = name2variable[tokens.read()];
- assert(cont != null);
-
- Entity entity = new DummyEntity(methodName);
- Selector selector = dummySelector(methodName, args.length);
-
- tokens.consumeEnd();
- return new InvokeStatic(entity, selector, args, cont, null);
- }
-
- /// (InvokeMethodDirectly receiver method (args) cont)
- InvokeMethodDirectly parseInvokeMethodDirectly() {
- tokens.consumeStart(INVOKE_METHOD_DIRECTLY);
-
- Definition receiver = name2variable[tokens.read()];
- assert(receiver != null);
-
- String methodName = tokens.read();
-
- List<Primitive> args = parsePrimitiveList();
-
- Continuation cont = name2variable[tokens.read()];
- assert(cont != null);
-
- tokens.consumeEnd();
- Element element = new DummyElement(methodName);
- Selector selector = dummySelector(methodName, args.length);
- return new InvokeMethodDirectly(receiver, element, selector, args, cont);
- }
-
- // (rec? name (args) body)
- Continuation parseContinuation() {
- // (rec? name
- tokens.consumeStart();
- String name = tokens.read();
- bool isRecursive = name == "rec";
- if (isRecursive) name = tokens.read();
-
- // (args)
- tokens.consumeStart();
- List<Parameter> params = <Parameter>[];
- while (tokens.current != ")") {
- String paramName = tokens.read();
- Parameter param = new Parameter(new DummyElement(paramName));
- name2variable[paramName] = param;
- params.add(param);
- }
- tokens.consumeEnd();
-
- Continuation cont = new Continuation(params);
- name2variable[name] = cont;
-
- cont.isRecursive = isRecursive;
- // cont_body
- cont.body = parseExpression();
- tokens.consumeEnd();
- return cont;
- }
-
- /// (LetCont (continuations) body)
- LetCont parseLetCont() {
- tokens.consumeStart(LET_CONT);
- tokens.consumeStart();
- List<Continuation> continuations = <Continuation>[];
- while (tokens.current != ")") {
- continuations.add(parseContinuation());
- }
- tokens.consumeEnd();
-
- // body)
- Expression body = parseExpression();
- tokens.consumeEnd();
-
- return new LetCont.many(continuations, body);
- }
-
- /// (LetMutable (name value) body)
- LetMutable parseLetMutable() {
- tokens.consumeStart(LET_MUTABLE);
-
- tokens.consumeStart();
- String name = tokens.read();
- MutableVariable local = addMutableVariable(name);
- Primitive value = name2variable[tokens.read()];
- tokens.consumeEnd();
-
- Expression body = parseExpression();
- tokens.consumeEnd();
- return new LetMutable(local, value)..plug(body);
- }
-
- /// (SetMutable name value)
- SetMutable parseSetMutable() {
- tokens.consumeStart(SET_MUTABLE);
-
- MutableVariable local = name2variable[tokens.read()];
- Primitive value = name2variable[tokens.read()];
- assert(value != null);
-
- tokens.consumeEnd();
- return new SetMutable(local, value);
- }
-
- /// (TypeCast value type args cont)
- TypeCast parseTypeCast() {
- tokens.consumeStart(TYPE_CAST);
-
- Primitive value = name2variable[tokens.read()];
- assert(value != null);
-
- dart_types.DartType type = new DummyNamedType(tokens.read());
-
- List<ir.Primitive> typeArguments = parsePrimitiveList();
-
- Continuation cont = name2variable[tokens.read()];
- assert(cont != null);
-
- tokens.consumeEnd();
- return new TypeCast(value, type, typeArguments, cont);
- }
-
- /// (TypeTest value type args)
- TypeTest parseTypeTest() {
- tokens.consumeStart(TYPE_TEST);
-
- Primitive value = name2variable[tokens.read()];
- assert(value != null);
-
- dart_types.DartType type = new DummyNamedType(tokens.read());
-
- List<ir.Primitive> typeArguments = parsePrimitiveList();
-
- tokens.consumeEnd();
- return new TypeTest(value, type, typeArguments);
- }
-
- /// (ApplyBuiltinOperator operator args)
- ApplyBuiltinOperator parseApplyBuiltinOperator() {
- tokens.consumeStart(APPLY_BUILTIN_OPERATOR);
-
- String operatorName = tokens.read();
- BuiltinOperator operator;
- for (BuiltinOperator op in BuiltinOperator.values) {
- if (op.toString() == operatorName) {
- operator = op;
- break;
- }
- }
- assert(operator != null);
- List<ir.Primitive> arguments = parsePrimitiveList();
-
- tokens.consumeEnd();
- return new ApplyBuiltinOperator(operator, arguments);
- }
-
- /// (GetLength object)
- GetLength parseGetLength() {
- tokens.consumeStart(GET_LENGTH);
- Primitive object = name2variable[tokens.read()];
- tokens.consumeEnd();
- return new GetLength(object);
- }
-
- /// (GetIndex object index)
- GetIndex parseGetIndex() {
- tokens.consumeStart(GET_INDEX);
- Primitive object = name2variable[tokens.read()];
- Primitive index = name2variable[tokens.read()];
- tokens.consumeEnd();
- return new GetIndex(object, index);
- }
-
- /// (SetIndex object index value)
- SetIndex parseSetIndex() {
- tokens.consumeStart(SET_INDEX);
- Primitive object = name2variable[tokens.read()];
- Primitive index = name2variable[tokens.read()];
- Primitive value = name2variable[tokens.read()];
- tokens.consumeEnd();
- return new SetIndex(object, index, value);
- }
-
- /// (SetStatic field value)
- SetStatic parseSetStatic() {
- tokens.consumeStart(SET_STATIC);
-
- Element fieldElement = new DummyElement(tokens.read());
- Primitive value = name2variable[tokens.read()];
- assert(value != null);
-
- tokens.consumeEnd();
- return new SetStatic(fieldElement, value, null);
- }
-
- /// (GetLazyStatic field cont)
- GetLazyStatic parseGetLazyStatic() {
- tokens.consumeStart(GET_LAZY_STATIC);
-
- Element fieldElement = new DummyElement(tokens.read());
- Continuation cont = name2variable[tokens.read()];
- assert(cont != null);
-
- tokens.consumeEnd();
- return new GetLazyStatic(fieldElement, cont, null);
- }
-
- /// (Unreachable)
- Unreachable parseUnreachable() {
- tokens.consumeStart(UNREACHABLE);
- tokens.consumeEnd();
- return new Unreachable();
- }
-
- /// (LetPrim (name primitive) body)
- LetPrim parseLetPrim() {
- tokens.consumeStart(LET_PRIM);
-
- // (name
- tokens.consumeStart();
- String name = tokens.read();
-
- // primitive)
- Primitive primitive = parsePrimitive();
- name2variable[name] = primitive;
- tokens.consumeEnd();
-
- // body)
- Expression body = parseExpression();
- tokens.consumeEnd();
-
- return new LetPrim(primitive)..plug(body);
- }
-
- Primitive parsePrimitive() {
- assert(tokens.current == "(");
-
- switch (tokens.next) {
- case CONSTANT:
- return parseConstant();
- case CREATE_FUNCTION:
- return parseCreateFunction();
- case GET_MUTABLE:
- return parseGetMutable();
- case SET_MUTABLE:
- return parseSetMutable();
- case LITERAL_LIST:
- return parseLiteralList();
- case LITERAL_MAP:
- return parseLiteralMap();
- case REIFY_TYPE_VAR:
- return parseReifyTypeVar();
- case GET_STATIC:
- return parseGetStatic();
- case SET_STATIC:
- return parseSetStatic();
- case TYPE_TEST:
- return parseTypeTest();
- case APPLY_BUILTIN_OPERATOR:
- return parseApplyBuiltinOperator();
- case GET_LENGTH:
- return parseGetLength();
- case GET_INDEX:
- return parseGetIndex();
- case SET_INDEX:
- return parseSetIndex();
- case GET_FIELD:
- return parseGetField();
- case SET_FIELD:
- return parseSetField();
- default:
- assert(false);
- }
-
- return null;
- }
-
- /// (Constant (constant))
- Constant parseConstant() {
- tokens.consumeStart(CONSTANT);
- tokens.consumeStart();
- Constant result;
- String tag = tokens.read();
- switch (tag) {
- case NULL:
- result = new Constant(
- new NullConstantExpression(new NullConstantValue()));
- break;
- case BOOL:
- String value = tokens.read();
- if (value == "true") {
- result = new Constant(
- new BoolConstantExpression(true, new TrueConstantValue()));
- } else if (value == "false") {
- result = new Constant(
- new BoolConstantExpression(false, new FalseConstantValue()));
- } else {
- throw "Invalid Boolean value '$value'.";
- }
- break;
- case STRING:
- List<String> strings = <String>[];
- do {
- strings.add(tokens.read());
- } while (tokens.current != ")");
- String string = strings.join(" ");
- assert(string.startsWith('"') && string.endsWith('"'));
- String text = string.substring(1, string.length - 1);
- StringConstantValue value = new StringConstantValue(
- new LiteralDartString(text));
- result = new Constant(new StringConstantExpression(text, value));
- break;
- case INT:
- String value = tokens.read();
- int intValue = int.parse(value, onError: (_) => null);
- if (intValue == null) {
- throw "Invalid int value 'value'.";
- }
- result = new Constant(new IntConstantExpression(
- intValue, new IntConstantValue(intValue)));
- break;
- case DOUBLE:
- String value = tokens.read();
- double doubleValue = double.parse(value, (_) => null);
- if (doubleValue == null) {
- throw "Invalid double value '$value'.";
- }
- result = new Constant(new DoubleConstantExpression(
- doubleValue, new DoubleConstantValue(doubleValue)));
- break;
- default:
- throw "Unexpected constant tag '$tag'.";
- }
- tokens.consumeEnd();
- tokens.consumeEnd();
- return result;
- }
-
- /// (CreateFunction (definition))
- CreateFunction parseCreateFunction() {
- tokens.consumeStart(CREATE_FUNCTION);
- FunctionDefinition def = parseFunctionDefinition();
- tokens.consumeEnd();
- return new CreateFunction(def);
- }
-
- MutableVariable addMutableVariable(String name) {
- assert(!name2variable.containsKey(name));
- MutableVariable variable = new MutableVariable(new DummyElement(name));
- name2variable[name] = variable;
- return variable;
- }
-
- /// (GetMutable name)
- GetMutable parseGetMutable() {
- tokens.consumeStart(GET_MUTABLE);
- MutableVariable local = name2variable[tokens.read()];
- tokens.consumeEnd();
-
- return new GetMutable(local);
- }
-
- /// (LiteralList (values))
- LiteralList parseLiteralList() {
- tokens.consumeStart(LITERAL_LIST);
- List<Primitive> values = parsePrimitiveList();
- tokens.consumeEnd();
- return new LiteralList(null, values);
- }
-
- /// (LiteralMap (keys) (values))
- LiteralMap parseLiteralMap() {
- tokens.consumeStart(LITERAL_MAP);
-
- List<Primitive> keys = parsePrimitiveList();
- List<Primitive> values = parsePrimitiveList();
-
- List<LiteralMapEntry> entries = <LiteralMapEntry>[];
- for (int i = 0; i < keys.length; i++) {
- entries.add(new LiteralMapEntry(keys[i], values[i]));
- }
-
- tokens.consumeEnd();
- return new LiteralMap(null, entries);
- }
-
- /// (ReifyTypeVar type)
- ReifyTypeVar parseReifyTypeVar() {
- tokens.consumeStart(REIFY_TYPE_VAR);
-
- TypeVariableElement type = new DummyElement(tokens.read());
-
- tokens.consumeEnd();
- return new ReifyTypeVar(type);
- }
-
- /// (GetStatic field)
- GetStatic parseGetStatic() {
- tokens.consumeStart(GET_STATIC);
-
- Element field = new DummyElement(tokens.read());
-
- tokens.consumeEnd();
- return new GetStatic(field, null);
- }
-
- /// (GetField object field)
- GetField parseGetField() {
- tokens.consumeStart(GET_FIELD);
-
- Primitive object = name2variable[tokens.read()];
- Element field = new DummyElement(tokens.read());
-
- tokens.consumeEnd();
- return new GetField(object, field);
- }
-
- /// (SetField object field value)
- SetField parseSetField() {
- tokens.consumeStart(SET_FIELD);
-
- Primitive object = name2variable[tokens.read()];
- Element field = new DummyElement(tokens.read());
- Primitive value = name2variable[tokens.read()];
-
- tokens.consumeEnd();
- return new SetField(object, field, value);
- }
-}
diff --git a/tests/compiler/dart2js/backend_dart/test_helper.dart b/tests/compiler/dart2js/backend_dart/test_helper.dart
deleted file mode 100644
index 0eeb656..0000000
--- a/tests/compiler/dart2js/backend_dart/test_helper.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart_backend.test_helper;
-
-import 'dart:async';
-import 'package:async_helper/async_helper.dart';
-import 'package:compiler/compiler.dart' as api;
-import 'package:compiler/src/compiler.dart';
-import '../../../../pkg/analyzer2dart/test/test_helper.dart';
-import '../compiler_helper.dart';
-
-/// Compiles the given dart code (which must include a 'main' function) and
-/// returns the compiler.
-Future<Compiler> compilerFor(String code,
- {api.CompilerOutputProvider outputProvider}) {
- MockCompiler compiler = new MockCompiler.internal(
- emitJavaScript: false,
- enableMinification: false,
- outputProvider: outputProvider);
- compiler.diagnosticHandler = createHandler(compiler, code);
- return compiler.init().then((_) {
- compiler.parseScript(code);
-
- Element element = compiler.mainApp.find('main');
- if (element == null) return null;
-
- compiler.mainFunction = element;
- compiler.phase = Compiler.PHASE_RESOLVING;
- compiler.backend.enqueueHelpers(compiler.enqueuer.resolution,
- compiler.globalDependencies);
- compiler.processQueue(compiler.enqueuer.resolution, element);
- compiler.world.populate();
- compiler.backend.onResolutionComplete();
-
- compiler.irBuilder.buildNodes();
-
- return compiler;
- });
-}
-
-/// Test group using async_helper.
-asyncTester(Group group, RunTest runTest) {
- asyncTest(() => Future.forEach(group.results, runTest));
-}
diff --git a/tests/compiler/dart2js/generate_code_with_compile_time_errors_test.dart b/tests/compiler/dart2js/generate_code_with_compile_time_errors_test.dart
index d2b29b0..92910dc 100644
--- a/tests/compiler/dart2js/generate_code_with_compile_time_errors_test.dart
+++ b/tests/compiler/dart2js/generate_code_with_compile_time_errors_test.dart
@@ -10,7 +10,6 @@
import 'package:expect/expect.dart';
import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/dart_backend/dart_backend.dart';
import 'package:compiler/src/js_backend/js_backend.dart';
import 'memory_compiler.dart';
import 'output_collector.dart';
@@ -53,14 +52,8 @@
collector.hints.isNotEmpty,
"Unexpected hints: ${collector.warnings}");
- bool isCodeGenerated;
- if (options.contains('--output-type=dart')) {
- DartBackend backend = compiler.backend;
- isCodeGenerated = backend.outputter.libraryInfo != null;
- } else {
- JavaScriptBackend backend = compiler.backend;
- isCodeGenerated = backend.generatedCode.isNotEmpty;
- }
+ JavaScriptBackend backend = compiler.backend;
+ bool isCodeGenerated = backend.generatedCode.isNotEmpty;
Expect.equals(
expectedCodeGenerated,
isCodeGenerated,
@@ -114,26 +107,5 @@
expectedCodeGenerated: false,
expectedOutput: false,
expectHint: true);
-
- await test(
- ['--output-type=dart'],
- expectedCodeGenerated: false,
- expectedOutput: false);
- await test(
- ['--output-type=dart', '--test-mode'],
- expectedCodeGenerated: false,
- expectedOutput: false);
- await test(
- ['--output-type=dart', '--generate-code-with-compile-time-errors'],
- expectedCodeGenerated: false,
- expectedOutput: false,
- expectHint: true);
- await test(
- ['--output-type=dart',
- '--generate-code-with-compile-time-errors',
- '--test-mode'],
- expectedCodeGenerated: false,
- expectedOutput: false,
- expectHint: true);
});
}
diff --git a/tests/compiler/dart2js/message_kind_helper.dart b/tests/compiler/dart2js/message_kind_helper.dart
index 34e7efe..31094e4 100644
--- a/tests/compiler/dart2js/message_kind_helper.dart
+++ b/tests/compiler/dart2js/message_kind_helper.dart
@@ -10,8 +10,6 @@
import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/compiler.dart' show
Compiler;
-import 'package:compiler/src/dart_backend/dart_backend.dart' show
- DartBackend;
import 'package:compiler/src/diagnostics/messages.dart' show
MessageKind,
MessageTemplate;
@@ -71,21 +69,12 @@
}
DiagnosticCollector collector = new DiagnosticCollector();
- bool oldBackendIsDart;
- if (cachedCompiler != null) {
- oldBackendIsDart = cachedCompiler.backend is DartBackend;
- }
- bool newBackendIsDart = template.options.contains('--output-type=dart');
-
Compiler compiler = compilerFor(
memorySourceFiles: example,
diagnosticHandler: collector,
options: [Flags.analyzeOnly,
Flags.enableExperimentalMirrors]..addAll(template.options),
- cachedCompiler:
- // TODO(johnniwinther): Remove this restriction when constant
- // values can be computed directly from the expressions.
- oldBackendIsDart == newBackendIsDart ? cachedCompiler : null);
+ cachedCompiler: cachedCompiler);
return compiler.run(Uri.parse('memory:main.dart')).then((_) {
Iterable<CollectedMessage> messages = collector.filterMessagesByKinds(
diff --git a/tests/compiler/dart2js/mirror_helper_rename_test.dart b/tests/compiler/dart2js/mirror_helper_rename_test.dart
deleted file mode 100644
index 80edc15..0000000
--- a/tests/compiler/dart2js/mirror_helper_rename_test.dart
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/expect.dart";
-import 'dart:async';
-import "package:async_helper/async_helper.dart";
-import 'memory_compiler.dart' show runCompiler, OutputCollector;
-import 'package:compiler/src/apiimpl.dart' show
- CompilerImpl;
-import 'package:compiler/src/tree/tree.dart' show
- Node;
-import 'package:compiler/src/dart_backend/dart_backend.dart';
-import 'package:compiler/src/mirror_renamer/mirror_renamer.dart';
-
-main() {
- asyncTest(() async {
- await testWithMirrorHelperLibrary(minify: true);
- await testWithMirrorHelperLibrary(minify: false);
- await testWithoutMirrorHelperLibrary(minify: true);
- await testWithoutMirrorHelperLibrary(minify: false);
- });
-}
-
-Future<CompilerImpl> run({OutputCollector outputCollector,
- bool useMirrorHelperLibrary: false,
- bool minify: false}) async {
- List<String> options = ['--output-type=dart'];
- if (minify) {
- options.add('--minify');
- }
- var result = await runCompiler(
- memorySourceFiles: MEMORY_SOURCE_FILES,
- outputProvider: outputCollector,
- options: options,
- beforeRun: (CompilerImpl compiler) {
- DartBackend backend = compiler.backend;
- backend.useMirrorHelperLibrary = useMirrorHelperLibrary;
- });
- return result.compiler;
-}
-
-Future testWithMirrorHelperLibrary({bool minify}) async {
- OutputCollector outputCollector = new OutputCollector();
- CompilerImpl compiler = await run(
- outputCollector: outputCollector,
- useMirrorHelperLibrary: true,
- minify: minify);
- DartBackend backend = compiler.backend;
- MirrorRenamerImpl mirrorRenamer = backend.mirrorRenamer;
- Map<Node, String> renames = backend.placeholderRenamer.renames;
- Map<String, String> symbols = mirrorRenamer.symbols;
-
- Expect.isFalse(null == mirrorRenamer.helperLibrary);
- Expect.isFalse(null == mirrorRenamer.getNameFunction);
-
- for (Node n in renames.keys) {
- if (symbols.containsKey(renames[n])) {
- if(n.toString() == 'getName') {
- Expect.equals(
- MirrorRenamerImpl.MIRROR_HELPER_GET_NAME_FUNCTION,
- symbols[renames[n]]);
- } else {
- Expect.equals(n.toString(), symbols[renames[n]]);
- }
- }
- }
-
- String output = outputCollector.getOutput('', 'dart');
- String getNameMatch = MirrorRenamerImpl.MIRROR_HELPER_GET_NAME_FUNCTION;
- Iterable i = getNameMatch.allMatches(output);
- print(output);
- if (minify) {
- Expect.equals(0, i.length);
- } else {
- // Appears twice in code (defined & called).
- Expect.equals(2, i.length);
- }
-
- RegExp mapMatch = new RegExp('const<String,( )?String>');
- i = mapMatch.allMatches(output);
- Expect.equals(1, i.length);
-}
-
-Future testWithoutMirrorHelperLibrary({bool minify}) async {
- CompilerImpl compiler =
- await run(useMirrorHelperLibrary: false, minify: minify);
- DartBackend backend = compiler.backend;
- MirrorRenamer mirrorRenamer = backend.mirrorRenamer;
-
- Expect.equals(null, mirrorRenamer.helperLibrary);
- Expect.equals(null, mirrorRenamer.getNameFunction);
-}
-
-const MEMORY_SOURCE_FILES = const <String, String> {
- 'main.dart': """
-import 'dart:mirrors';
-
-class Foo {
- noSuchMethod(Invocation invocation) {
- MirrorSystem.getName(invocation.memberName);
- }
-}
-
-void main() {
- new Foo().fisk();
-}
-"""};
\ No newline at end of file
diff --git a/tests/compiler/dart2js/mirror_helper_test.dart b/tests/compiler/dart2js/mirror_helper_test.dart
deleted file mode 100644
index ce257c7..0000000
--- a/tests/compiler/dart2js/mirror_helper_test.dart
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/expect.dart";
-import 'dart:async';
-import "package:async_helper/async_helper.dart";
-import 'memory_compiler.dart' show runCompiler;
-import 'package:compiler/src/apiimpl.dart' show
- CompilerImpl;
-import 'package:compiler/src/elements/elements.dart' show
- Element, LibraryElement, ClassElement;
-import 'package:compiler/src/tree/tree.dart' show
- Block, ExpressionStatement, FunctionExpression, Node, Send;
-import 'package:compiler/src/dart_backend/dart_backend.dart' show
- DartBackend, ElementAst;
-import 'package:compiler/src/mirror_renamer/mirror_renamer.dart' show
- MirrorRenamerImpl;
-
-main() {
- asyncTest(() async {
- await testWithMirrorRenaming(minify: true);
- await testWithMirrorRenaming(minify: false);
- await testWithoutMirrorRenaming(minify: true);
- await testWithoutMirrorRenaming(minify: false);
- });
-}
-
-Future<CompilerImpl> run({useMirrorHelperLibrary: false, minify: false}) async {
- List<String> options = ['--output-type=dart'];
- if (minify) {
- options.add('--minify');
- }
- var result = await runCompiler(
- memorySourceFiles: MEMORY_SOURCE_FILES,
- options: options,
- beforeRun: (CompilerImpl compiler) {
- DartBackend backend = compiler.backend;
- backend.useMirrorHelperLibrary = useMirrorHelperLibrary;
- });
- return result.compiler;
-}
-
-Future testWithMirrorRenaming({bool minify}) async {
- CompilerImpl compiler =
- await run(useMirrorHelperLibrary: true, minify: minify);
- DartBackend backend = compiler.backend;
- MirrorRenamerImpl mirrorRenamer = backend.mirrorRenamer;
- Map<Node, String> renames = backend.placeholderRenamer.renames;
- Iterable<LibraryElement> imports =
- backend.placeholderRenamer.platformImports.keys;
-
- FunctionExpression node = backend.memberNodes.values.first.first;
- Block block = node.body;
- ExpressionStatement getNameFunctionNode = block.statements.nodes.head;
- Send send = getNameFunctionNode.expression;
-
- Expect.equals(renames[mirrorRenamer.getNameFunctionNode.name],
- renames[send.selector]);
- Expect.equals("",
- renames[send.receiver]);
- Expect.equals(1, imports.length);
-}
-
-Future testWithoutMirrorRenaming({bool minify}) async {
- CompilerImpl compiler =
- await run(useMirrorHelperLibrary: false, minify: minify);
- DartBackend backend = compiler.backend;
- Map<Node, String> renames = backend.placeholderRenamer.renames;
- Iterable<LibraryElement> imports =
- backend.placeholderRenamer.platformImports.keys;
- FunctionExpression node = backend.memberNodes.values.first.first;
- Block block = node.body;
- ExpressionStatement getNameFunctionNode = block.statements.nodes.head;
- Send send = getNameFunctionNode.expression;
-
- Expect.isFalse(renames.containsKey(send.selector));
- Expect.equals(1, imports.length);
-}
-
-const MEMORY_SOURCE_FILES = const <String, String> {
- 'main.dart': """
-import 'dart:mirrors';
-
-class Foo {
- noSuchMethod(Invocation invocation) {
- MirrorSystem.getName(invocation.memberName);
- }
-}
-
-void main() {
- new Foo().fisk();
-}
-"""};
diff --git a/tests/compiler/dart2js/mirror_helper_unique_minification_test.dart b/tests/compiler/dart2js/mirror_helper_unique_minification_test.dart
deleted file mode 100644
index bec8f9f..0000000
--- a/tests/compiler/dart2js/mirror_helper_unique_minification_test.dart
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/expect.dart";
-import 'dart:async';
-import "package:async_helper/async_helper.dart";
-import 'memory_compiler.dart' show runCompiler;
-import 'package:compiler/src/apiimpl.dart' show
- CompilerImpl;
-import 'package:compiler/src/dart_backend/dart_backend.dart' show
- DartBackend;
-import 'package:compiler/src/tree/tree.dart' show
- Identifier, Node, Send;
-import 'package:compiler/src/mirror_renamer/mirror_renamer.dart' show
- MirrorRenamerImpl;
-
-main() {
- asyncTest(() async {
- await testUniqueMinification();
- await testNoUniqueMinification();
- });
-}
-
-Future<CompilerImpl> run({useMirrorHelperLibrary: false, minify: false}) async {
- List<String> options = ['--output-type=dart'];
- if (minify) {
- options.add('--minify');
- }
- var result = await runCompiler(
- memorySourceFiles: MEMORY_SOURCE_FILES,
- options: options,
- beforeRun: (CompilerImpl compiler) {
- DartBackend backend = compiler.backend;
- backend.useMirrorHelperLibrary = useMirrorHelperLibrary;
- });
- return result.compiler;
-}
-
-Future testUniqueMinification() async {
- CompilerImpl compiler = await run(useMirrorHelperLibrary: true, minify: true);
- DartBackend backend = compiler.backend;
- MirrorRenamerImpl mirrorRenamer = backend.mirrorRenamer;
- Map<Node, String> renames = backend.placeholderRenamer.renames;
- Map<String, String> symbols = mirrorRenamer.symbols;
-
- // Check that no two different source code names get the same mangled name,
- // with the exception of MirrorSystem.getName that gets renamed to the same
- // mangled name as the getNameHelper from _mirror_helper.dart.
- for (Node node in renames.keys) {
- Identifier identifier = node.asIdentifier();
- if (identifier != null) {
- String source = identifier.source;
- Send send = mirrorRenamer.mirrorSystemGetNameNodes.first;
- if (send.selector == node)
- continue;
- if (symbols.containsKey(renames[node])) {
- print(node);
- Expect.equals(source, symbols[renames[node]]);
- }
- }
- }
-}
-
-Future testNoUniqueMinification() async {
- CompilerImpl compiler =
- await run(useMirrorHelperLibrary: false, minify: true);
- DartBackend backend = compiler.backend;
- Map<Node, String> renames = backend.placeholderRenamer.renames;
-
- // 'Foo' appears twice and 'invocation' and 'hest' get the same mangled
- // name.
- Expect.equals(renames.values.toSet().length, renames.values.length - 2);
-}
-
-const MEMORY_SOURCE_FILES = const <String, String> {
- 'main.dart': """
-import 'dart:mirrors';
-
-class Foo {
- noSuchMethod(invocation) {
- MirrorSystem.getName(null);
- }
-}
-
-main(hest) {
- new Foo().fisk();
-}
-"""};
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index cf612bf..5d83c5d 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -80,7 +80,6 @@
bool disableTypeInference: false,
bool analyzeAll: false,
bool analyzeOnly: false,
- bool emitJavaScript: true,
bool preserveComments: false,
// Our unit tests check code generation output that is
// affected by inlining support.
@@ -106,7 +105,6 @@
disableTypeInference: disableTypeInference,
analyzeAll: analyzeAll,
analyzeOnly: analyzeOnly,
- emitJavaScript: emitJavaScript,
preserveComments: preserveComments,
trustTypeAnnotations: trustTypeAnnotations,
trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations,
diff --git a/tests/compiler/dart2js/platform_consistency_test.dart b/tests/compiler/dart2js/platform_consistency_test.dart
index e946c16..fa50b29 100644
--- a/tests/compiler/dart2js/platform_consistency_test.dart
+++ b/tests/compiler/dart2js/platform_consistency_test.dart
@@ -20,12 +20,8 @@
Map<String, Uri> shared = await load(
Uri.base.resolve("sdk/lib/dart_shared.platform"),
input);
- Map<String, Uri> dart2dart = await load(
- Uri.base.resolve("sdk/lib/dart2dart.platform"),
- input);
Expect.setEquals(new Set.from(shared.keys), new Set.from(client.keys));
Expect.setEquals(new Set.from(shared.keys), new Set.from(server.keys));
- Expect.setEquals(new Set.from(shared.keys), new Set.from(dart2dart.keys));
for (String libraryName in shared.keys) {
test(Map<String, Uri> m) {
@@ -36,6 +32,5 @@
}
test(client);
test(server);
- test(dart2dart);
}
}
diff --git a/tests/html/html.status b/tests/html/html.status
index ed15788..2612dd1 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -50,7 +50,6 @@
custom/entered_left_view_test/viewless_document: Fail # Polyfill does not handle this
fontface_test: Fail # Fontface not supported on these.
custom/attribute_changed_callback_test/unsupported_on_polyfill: Fail # Polyfill does not support
-element_animate_test: Fail # Element.animate not supported on these browsers.
[ $compiler == none && $runtime == dartium && $system == macos]
canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Pass,Fail # Issue 11834
@@ -115,6 +114,9 @@
transition_event_test/functional: Skip # Times out. Issue 22167
request_animation_frame_test: Skip # Times out. Issue 22167
custom/*: Pass, Timeout # Issue 26789
+custom_elements_test: Pass, Timeout # Issue 26789
+custom_element_method_clash_test: Pass, Timeout # Issue 26789
+custom_element_name_clash_test: Pass, Timeout # Issue 26789
[$runtime == drt || $runtime == dartium || $runtime == chrome || $runtime == chromeOnAndroid ]
webgl_1_test: Pass, Fail # Issue 8219
@@ -148,6 +150,7 @@
transition_event_test/functional: Skip # Times out. Issue 22167
request_animation_frame_test: Skip # Times out. Issue 22167
js_util_test/callConstructor: RuntimeError # Issue 26978
+element_animate_test: Fail # Element.animate not supported on these browsers.
[$runtime == ie10 ]
# IE10 Feature support statuses-
@@ -266,6 +269,7 @@
canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Fail # Safari does not support drawImage w/ video element
element_test: Pass, Fail # Issue 21434
mediasource_test: Pass, Fail # MediaSource only available on Safari 8 desktop, we can't express that.
+element_animate_test: Fail # Element.animate not supported on these browsers.
# Safari Feature support statuses-
# All changes should be accompanied by platform support annotation changes.
diff --git a/tests/language/dangling_else_test.dart b/tests/language/dangling_else_test.dart
index 84bdec8..cad2fc7 100644
--- a/tests/language/dangling_else_test.dart
+++ b/tests/language/dangling_else_test.dart
@@ -1,8 +1,8 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Tests dangling else. The VM should not have any problems, but dart2js or
-// dart2dart could get this wrong.
+// Tests dangling else. The VM should not have any problems, but dart2js could
+// get this wrong.
import "package:expect/expect.dart";
diff --git a/tests/language/initializing_formal_access_test.dart b/tests/language/initializing_formal_access_test.dart
index 3d3ceed..71f445e 100644
--- a/tests/language/initializing_formal_access_test.dart
+++ b/tests/language/initializing_formal_access_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
//
// DartOptions=--initializing-formal-access
+// VMOptions=--initializing-formal-access
import "package:expect/expect.dart";
diff --git a/tests/language/initializing_formal_capture_test.dart b/tests/language/initializing_formal_capture_test.dart
index 7ad3f08..8257d4f 100644
--- a/tests/language/initializing_formal_capture_test.dart
+++ b/tests/language/initializing_formal_capture_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
//
// DartOptions=--initializing-formal-access
+// VMOptions=--initializing-formal-access
import "package:expect/expect.dart";
diff --git a/tests/language/initializing_formal_final_test.dart b/tests/language/initializing_formal_final_test.dart
index 0832ce0..3df4ba5 100644
--- a/tests/language/initializing_formal_final_test.dart
+++ b/tests/language/initializing_formal_final_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
//
// DartOptions=--initializing-formal-access
+// VMOptions=--initializing-formal-access
import "package:expect/expect.dart";
diff --git a/tests/language/initializing_formal_promotion_test.dart b/tests/language/initializing_formal_promotion_test.dart
index b0314e8..5f0a3b6 100644
--- a/tests/language/initializing_formal_promotion_test.dart
+++ b/tests/language/initializing_formal_promotion_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
//
// DartOptions=--initializing-formal-access
+// VMOptions=--initializing-formal-access
import "package:expect/expect.dart";
diff --git a/tests/language/initializing_formal_scope_test.dart b/tests/language/initializing_formal_scope_test.dart
index dd85fad..5544a8e 100644
--- a/tests/language/initializing_formal_scope_test.dart
+++ b/tests/language/initializing_formal_scope_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
//
// DartOptions=--initializing-formal-access
+// VMOptions=--initializing-formal-access
import "package:expect/expect.dart";
diff --git a/tests/language/initializing_formal_type_test.dart b/tests/language/initializing_formal_type_test.dart
index 352eecf..7544f9d 100644
--- a/tests/language/initializing_formal_type_test.dart
+++ b/tests/language/initializing_formal_type_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
//
// DartOptions=--initializing-formal-access
+// VMOptions=--initializing-formal-access
import "package:expect/expect.dart";
diff --git a/tests/language/language.status b/tests/language/language.status
index 64c1c4a..bd95b58 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -53,12 +53,6 @@
generic_methods_function_type_test: CompiletimeError # Issue 25869
generic_methods_type_expression_test: CompiletimeError # Issue 25869
-# Experimental feature: Use initializing formals in initializers and constructor body.
-initializing_formal_access_test: CompiletimeError # Issue 26656
-initializing_formal_capture_test: CompiletimeError # Issue 26656
-initializing_formal_final_test: CompiletimeError # Issue 26656
-initializing_formal_type_test: CompiletimeError # Issue 26656
-
[ ($compiler == none || $compiler == precompiler || $compiler == dart2app || $compiler == dart2appjit) && ($runtime == vm || $runtime == dart_precompiled || $runtime == dart_app) ]
class_keyword_test/02: MissingCompileTimeError # Issue 13627
@@ -99,6 +93,12 @@
mirror_in_static_init_test: Fail # Issue 22071
vm/debug_break_enabled_vm_test/*: Skip # Issue 14651.
+# These tests need the flag --initializing-formal-access to pass:
+initializing_formal_access_test: Skip
+initializing_formal_capture_test: Skip
+initializing_formal_final_test: Skip
+initializing_formal_type_test: Skip
+
# Experimental feature: Syntactic support for generic methods.
generic_methods_test: RuntimeError # Issue 25869
generic_functions_test: RuntimeError # Issue 25869
@@ -108,12 +108,6 @@
generic_methods_function_type_test: RuntimeError # Issue 25869
generic_methods_type_expression_test: RuntimeError # Issue 25869
-# Experimental feature: Use initializing formals in initializers and constructor body.
-initializing_formal_access_test: RuntimeError # Issue 26656
-initializing_formal_capture_test: RuntimeError # Issue 26656
-initializing_formal_final_test: RuntimeError # Issue 26656
-initializing_formal_type_test: RuntimeError # Issue 26656
-
config_import_test: Skip # Issue 26250
[ $compiler == none && $runtime == dartium && $system == linux && $arch != x64 ]
diff --git a/tests/standalone/fixed_precision_double_test.dart b/tests/standalone/fixed_precision_double_test.dart
new file mode 100644
index 0000000..350bbc3
--- /dev/null
+++ b/tests/standalone/fixed_precision_double_test.dart
@@ -0,0 +1,82 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+bool testAssociativity(Function f) {
+ // Example from https://en.wikipedia.org/wiki/Floating_point
+ // Test that (a + b) + c == a + (b + c).
+ double a = f(1234.567); // Chop literals.
+ double b = f(45.67834);
+ double c = f(0.0004);
+ double x = (a + b) + c; // Chop result of multiplication or division only.
+ double y = a + (b + c);
+ print("x: $x");
+ print("y: $y");
+ return x == y;
+}
+
+bool testDistributivity(Function f) {
+ // Example from https://en.wikipedia.org/wiki/Floating_point
+ // Test that (a + b)*c == a*c + b*c.
+ double a = f(1234.567); // Chop literals.
+ double b = f(1.234567);
+ double c = f(3.333333);
+ double x = f((a + b)*c); // Chop result of multiplication.
+ double y = f(a*c) + f(b*c);
+ print("x: $x");
+ print("y: $y");
+ return x == y;
+}
+
+// Simulate precision checking with assert.
+assertP(double d) {
+ assert(d == d.p);
+}
+
+bool assertionsEnabled() {
+ try {
+ assert(false);
+ return false;
+ } on AssertionError catch (e) {
+ return true;
+ }
+ return false;
+}
+
+main() {
+ // The getter p keeps only 20 (by default) bits after the decimal point.
+ Expect.equals(0.0, 0.0.p); // 0.0 has no 1-bit after the decimal point.
+ Expect.equals(1.5, 1.5.p); // 1.5 has a single 1-bit after the decimal point.
+ Expect.notEquals(1.1, 1.1.p); // 1.1 has many 1-bits after the decimal point.
+ Expect.notEquals(1/3, (1/3).p); // 0.33333333... ditto.
+
+ Expect.equals(1.1 + 1/3, 1/3 + 1.1); // Test addition commutativity.
+ Expect.equals(1.1.p + (1/3).p, (1/3).p + 1.1.p);
+ Expect.equals(1.1 * 1/3, 1/3 * 1.1); // Test multiplication commutativity.
+ Expect.equals(1.1.p * (1/3).p, (1/3).p * 1.1.p);
+
+ print("Without chopping fractional bits:");
+ Expect.isFalse(testAssociativity((x) => x));
+ Expect.isFalse(testDistributivity((x) => x));
+ print("With chopping fractional bits:");
+ Expect.isTrue(testAssociativity((x) => x.p));
+ Expect.isTrue(testDistributivity((x) => x.p));
+
+ // Check that p works with NaN and Infinity.
+ Expect.isTrue(double.NAN.p.isNaN);
+ Expect.isTrue(double.INFINITY.p.isInfinite);
+ Expect.isFalse(double.INFINITY.p.isNegative);
+ Expect.isTrue(double.NEGATIVE_INFINITY.p.isInfinite);
+ Expect.isTrue(double.NEGATIVE_INFINITY.p.isNegative);
+
+ // Check use of assert to verify precision.
+ if (assertionsEnabled()) {
+ assertP(1.5);
+ assertP(1.1.p);
+ Expect.throws(() => assertP(1.1), (e) => e is AssertionError);
+ assertP(1.23456789.p);
+ Expect.throws(() => assertP(1.23456789), (e) => e is AssertionError);
+ }
+}
diff --git a/tests/standalone/io/socket_source_address_test.dart b/tests/standalone/io/socket_source_address_test.dart
index 4b95433..64dc490 100644
--- a/tests/standalone/io/socket_source_address_test.dart
+++ b/tests/standalone/io/socket_source_address_test.dart
@@ -43,7 +43,8 @@
await throws(() => connectFunction('127.0.0.1',
server.port,
sourceAddress: sourceAddress),
- (e) => e is SocketException);
+ (e) => e is SocketException &&
+ e.address == new InternetAddress('8.8.8.8'));
}
// Address family mismatch.
for (sourceAddress in ['::1', InternetAddress.LOOPBACK_IP_V6]) {
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index 3476560..8163f89 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -78,6 +78,7 @@
[ $compiler == dartanalyzer || $compiler == dart2analyzer ]
issue14236_test: Skip # Analyzer can't handle Script snapshots.
+fixed_precision_double_test: Skip # double p getter only implemented in VM.
# test issue https://code.google.com/p/dart/issues/detail?id=11518
io/file_constructor_test: fail
@@ -114,6 +115,7 @@
pair_location_remapping_test: Skip
regress_25335_test: Skip # Int64List not supported.
deferred_transitive_import_error_test: Skip # Contains intentional errors.
+fixed_precision_double_test: Skip # double p getter only implemented in VM.
[ $compiler == dart2js && $cps_ir && $checked ]
*: Skip # `assert` not implemented
diff --git a/third_party/boringssl/BUILD.generated.gni b/third_party/boringssl/BUILD.generated.gni
new file mode 100644
index 0000000..d1ac9be
--- /dev/null
+++ b/third_party/boringssl/BUILD.generated.gni
@@ -0,0 +1,458 @@
+# Copyright (c) 2016 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.
+
+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/f_enum.c",
+ "src/crypto/asn1/f_int.c",
+ "src/crypto/asn1/f_string.c",
+ "src/crypto/asn1/t_bitst.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_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/asn1_compat.c",
+ "src/crypto/bytestring/ber.c",
+ "src/crypto/bytestring/cbb.c",
+ "src/crypto/bytestring/cbs.c",
+ "src/crypto/chacha/chacha.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-aarch64-linux.c",
+ "src/crypto/cpu-arm-linux.c",
+ "src/crypto/cpu-arm.c",
+ "src/crypto/cpu-intel.c",
+ "src/crypto/crypto.c",
+ "src/crypto/curve25519/curve25519.c",
+ "src/crypto/curve25519/spake25519.c",
+ "src/crypto/curve25519/x25519-x86_64.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/params.c",
+ "src/crypto/digest/digest.c",
+ "src/crypto/digest/digests.c",
+ "src/crypto/dsa/dsa.c",
+ "src/crypto/dsa/dsa_asn1.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/p224-64.c",
+ "src/crypto/ec/p256-64.c",
+ "src/crypto/ec/p256-x86_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/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/print.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/newhope/error_correction.c",
+ "src/crypto/newhope/newhope.c",
+ "src/crypto/newhope/ntt.c",
+ "src/crypto/newhope/poly.c",
+ "src/crypto/newhope/precomp.c",
+ "src/crypto/newhope/reduce.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/deterministic.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/algorithm.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/rsa_pss.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",
+]
+
+ssl_sources = [
+ "src/ssl/custom_extensions.c",
+ "src/ssl/d1_both.c",
+ "src/ssl/d1_lib.c",
+ "src/ssl/d1_pkt.c",
+ "src/ssl/d1_srtp.c",
+ "src/ssl/dtls_method.c",
+ "src/ssl/dtls_record.c",
+ "src/ssl/handshake_client.c",
+ "src/ssl/handshake_server.c",
+ "src/ssl/s3_both.c",
+ "src/ssl/s3_enc.c",
+ "src/ssl/s3_lib.c",
+ "src/ssl/s3_pkt.c",
+ "src/ssl/ssl_aead_ctx.c",
+ "src/ssl/ssl_asn1.c",
+ "src/ssl/ssl_buffer.c",
+ "src/ssl/ssl_cert.c",
+ "src/ssl/ssl_cipher.c",
+ "src/ssl/ssl_ecdh.c",
+ "src/ssl/ssl_file.c",
+ "src/ssl/ssl_lib.c",
+ "src/ssl/ssl_rsa.c",
+ "src/ssl/ssl_session.c",
+ "src/ssl/ssl_stat.c",
+ "src/ssl/t1_enc.c",
+ "src/ssl/t1_lib.c",
+ "src/ssl/tls_method.c",
+ "src/ssl/tls_record.c",
+]
+
+crypto_sources_linux_aarch64 = [
+ "linux-aarch64/crypto/aes/aesv8-armx64.S",
+ "linux-aarch64/crypto/bn/armv8-mont.S",
+ "linux-aarch64/crypto/chacha/chacha-armv8.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",
+]
+
+crypto_sources_linux_arm = [
+ "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/chacha/chacha-armv4.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/curve25519/asm/x25519-asm-arm.S",
+ "src/crypto/poly1305/poly1305_arm_asm.S",
+]
+
+crypto_sources_linux_x86 = [
+ "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/chacha/chacha-x86.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",
+]
+
+crypto_sources_linux_x86_64 = [
+ "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/chacha/chacha-x86_64.S",
+ "linux-x86_64/crypto/ec/p256-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-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",
+ "src/crypto/curve25519/asm/x25519-asm-x86_64.S",
+]
+
+crypto_sources_mac_x86 = [
+ "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/chacha/chacha-x86.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",
+]
+
+crypto_sources_mac_x86_64 = [
+ "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/chacha/chacha-x86_64.S",
+ "mac-x86_64/crypto/ec/p256-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-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",
+ "src/crypto/curve25519/asm/x25519-asm-x86_64.S",
+]
+
+crypto_sources_win_x86 = [
+ "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/chacha/chacha-x86.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",
+]
+
+crypto_sources_win_x86_64 = [
+ "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/chacha/chacha-x86_64.asm",
+ "win-x86_64/crypto/ec/p256-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-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",
+]
+
+fuzzers = [
+ "cert",
+ "client",
+ "pkcs8",
+ "privkey",
+ "read_pem",
+ "server",
+ "spki",
+]
diff --git a/third_party/boringssl/BUILD.generated_tests.gni b/third_party/boringssl/BUILD.generated_tests.gni
new file mode 100644
index 0000000..16bddff
--- /dev/null
+++ b/third_party/boringssl/BUILD.generated_tests.gni
@@ -0,0 +1,584 @@
+# Copyright (c) 2016 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.
+
+_test_support_sources = [
+ "src/crypto/test/file_test.cc",
+ "src/crypto/test/file_test.h",
+ "src/crypto/test/malloc.cc",
+ "src/crypto/test/scoped_types.h",
+ "src/crypto/test/test_util.cc",
+ "src/crypto/test/test_util.h",
+ "src/ssl/test/async_bio.h",
+ "src/ssl/test/packeted_bio.h",
+ "src/ssl/test/scoped_types.h",
+ "src/ssl/test/test_config.h",
+]
+
+template("create_tests") {
+ executable("boringssl_aes_test") {
+ sources = [
+ "src/crypto/aes/aes_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_asn1_test") {
+ sources = [
+ "src/crypto/asn1/asn1_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_base64_test") {
+ sources = [
+ "src/crypto/base64/base64_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_bio_test") {
+ sources = [
+ "src/crypto/bio/bio_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_bn_test") {
+ sources = [
+ "src/crypto/bn/bn_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_bytestring_test") {
+ sources = [
+ "src/crypto/bytestring/bytestring_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_chacha_test") {
+ sources = [
+ "src/crypto/chacha/chacha_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_aead_test") {
+ sources = [
+ "src/crypto/cipher/aead_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_cipher_test") {
+ sources = [
+ "src/crypto/cipher/cipher_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_cmac_test") {
+ sources = [
+ "src/crypto/cmac/cmac_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_constant_time_test") {
+ sources = [
+ "src/crypto/constant_time_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_ed25519_test") {
+ sources = [
+ "src/crypto/curve25519/ed25519_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_spake25519_test") {
+ sources = [
+ "src/crypto/curve25519/spake25519_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_x25519_test") {
+ sources = [
+ "src/crypto/curve25519/x25519_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_dh_test") {
+ sources = [
+ "src/crypto/dh/dh_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_digest_test") {
+ sources = [
+ "src/crypto/digest/digest_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_dsa_test") {
+ sources = [
+ "src/crypto/dsa/dsa_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_ec_test") {
+ sources = [
+ "src/crypto/ec/ec_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_example_mul") {
+ sources = [
+ "src/crypto/ec/example_mul.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_ecdsa_test") {
+ sources = [
+ "src/crypto/ecdsa/ecdsa_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_err_test") {
+ sources = [
+ "src/crypto/err/err_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_evp_extra_test") {
+ sources = [
+ "src/crypto/evp/evp_extra_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_evp_test") {
+ sources = [
+ "src/crypto/evp/evp_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_pbkdf_test") {
+ sources = [
+ "src/crypto/evp/pbkdf_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_hkdf_test") {
+ sources = [
+ "src/crypto/hkdf/hkdf_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_hmac_test") {
+ sources = [
+ "src/crypto/hmac/hmac_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_lhash_test") {
+ sources = [
+ "src/crypto/lhash/lhash_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_gcm_test") {
+ sources = [
+ "src/crypto/modes/gcm_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_newhope_statistical_test") {
+ sources = [
+ "src/crypto/newhope/newhope_statistical_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_newhope_test") {
+ sources = [
+ "src/crypto/newhope/newhope_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_newhope_vectors_test") {
+ sources = [
+ "src/crypto/newhope/newhope_vectors_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_obj_test") {
+ sources = [
+ "src/crypto/obj/obj_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_pkcs12_test") {
+ sources = [
+ "src/crypto/pkcs8/pkcs12_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_pkcs8_test") {
+ sources = [
+ "src/crypto/pkcs8/pkcs8_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_poly1305_test") {
+ sources = [
+ "src/crypto/poly1305/poly1305_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_refcount_test") {
+ sources = [
+ "src/crypto/refcount_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_rsa_test") {
+ sources = [
+ "src/crypto/rsa/rsa_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_thread_test") {
+ sources = [
+ "src/crypto/thread_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_pkcs7_test") {
+ sources = [
+ "src/crypto/x509/pkcs7_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_x509_test") {
+ sources = [
+ "src/crypto/x509/x509_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_tab_test") {
+ sources = [
+ "src/crypto/x509v3/tab_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_v3name_test") {
+ sources = [
+ "src/crypto/x509v3/v3name_test.c",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ executable("boringssl_ssl_test") {
+ sources = [
+ "src/ssl/ssl_test.cc",
+ ]
+ sources += _test_support_sources
+ if (defined(invoker.configs_exclude)) {
+ configs -= invoker.configs_exclude
+ }
+ configs += invoker.configs
+ deps = invoker.deps
+ }
+
+ group(target_name) {
+ deps = [
+ ":boringssl_aead_test",
+ ":boringssl_aes_test",
+ ":boringssl_asn1_test",
+ ":boringssl_base64_test",
+ ":boringssl_bio_test",
+ ":boringssl_bn_test",
+ ":boringssl_bytestring_test",
+ ":boringssl_chacha_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_ed25519_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_newhope_statistical_test",
+ ":boringssl_newhope_test",
+ ":boringssl_newhope_vectors_test",
+ ":boringssl_obj_test",
+ ":boringssl_pbkdf_test",
+ ":boringssl_pkcs12_test",
+ ":boringssl_pkcs7_test",
+ ":boringssl_pkcs8_test",
+ ":boringssl_poly1305_test",
+ ":boringssl_refcount_test",
+ ":boringssl_rsa_test",
+ ":boringssl_spake25519_test",
+ ":boringssl_ssl_test",
+ ":boringssl_tab_test",
+ ":boringssl_thread_test",
+ ":boringssl_v3name_test",
+ ":boringssl_x25519_test",
+ ":boringssl_x509_test",
+ ]
+ }
+}
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index dc26330..a71a735 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/android/config.gni")
import("//build/config/sanitizers/sanitizers.gni")
+import("BUILD.generated.gni")
# Config for us and everybody else depending on BoringSSL.
config("external_config") {
@@ -13,83 +14,107 @@
}
}
-
# Config internal to this build file, shared by boringssl and boringssl_fuzzer.
config("internal_config") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
defines = [
"BORINGSSL_IMPLEMENTATION",
"BORINGSSL_NO_STATIC_INITIALIZER",
- "OPENSSL_SMALL_FOOTPRINT",
+ "OPENSSL_SMALL",
]
+ # configs = [
+ # # TODO(davidben): Fix size_t truncations in BoringSSL.
+ # # https://crbug.com/429039
+ # "//build/config/compiler:no_size_t_to_int_warning",
+ # ]
+ if (is_posix) {
+ cflags_c = [ "-std=c99" ]
+ defines += [ "_XOPEN_SOURCE=700" ]
+ }
}
-
config("no_asm_config") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
defines = [ "OPENSSL_NO_ASM" ]
}
+all_sources = crypto_sources + ssl_sources
-# The list of BoringSSL files is kept in boringssl.gypi.
-gypi_values =
- exec_script("../../tools/gypi_to_gn.py",
- [ rebase_path("boringssl.gypi") ],
- "scope",
- [ "boringssl.gypi" ])
-boringssl_sources =
- gypi_values.boringssl_crypto_sources + gypi_values.boringssl_ssl_sources
+# 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 = crypto_sources_win_x86_64
+ } else if (current_cpu == "x86") {
+ sources = crypto_sources_win_x86
+ }
+ }
+} else {
+ # This has no sources on some platforms so must be a source_set.
+ source_set("boringssl_asm") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
+ defines = []
+ sources = []
+ include_dirs = [ "src/include" ]
-source_set("boringssl_asm") {
- visibility = [ ":*" ] # Only targets in this file can depend on this.
- sources = []
- #asmflags = []
- 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 ((current_cpu == "arm" || current_cpu == "arm64") && is_clang) {
+ if (current_cpu == "arm") {
+ # TODO(hans) Enable integrated-as (crbug.com/124610).
+ asmflags += [ "-fno-integrated-as" ]
+ }
+ if (is_android) {
+ rebased_android_toolchain_root =
+ rebase_path(android_toolchain_root, root_build_dir)
- if (current_cpu == "x64") {
- if (is_ios) {
- defines += [ "OPENSSL_NO_ASM" ]
- } else if (is_mac) {
- sources += gypi_values.boringssl_mac_x86_64_sources
- } else if (is_linux || is_android) {
- sources += gypi_values.boringssl_linux_x86_64_sources
+ # Else /usr/bin/as gets picked up.
+ asmflags += [ "-B${rebased_android_toolchain_root}/bin" ]
+ }
+ }
+
+ if (is_msan) {
+ public_configs = [ ":no_asm_config" ]
+ } else if (current_cpu == "x64") {
+ if (is_mac) {
+ sources += crypto_sources_mac_x86_64
+ } else if (is_linux || is_android) {
+ sources += crypto_sources_linux_x86_64
+ } else {
+ public_configs = [ ":no_asm_config" ]
+ }
+ } else if (current_cpu == "x86") {
+ if (is_mac) {
+ sources += crypto_sources_mac_x86
+ } else if (is_linux || is_android) {
+ sources += crypto_sources_linux_x86
+ } else {
+ public_configs = [ ":no_asm_config" ]
+ }
+ } else if (current_cpu == "arm" && (is_linux || is_android)) {
+ sources += crypto_sources_linux_arm
+ } else if (current_cpu == "arm64" && (is_linux || is_android)) {
+ sources += crypto_sources_linux_aarch64
+
+ # TODO(davidben): Remove explicit arch flag once https://crbug.com/576858
+ # is fixed.
+ asmflags += [ "-march=armv8-a+crypto" ]
} else {
public_configs = [ ":no_asm_config" ]
}
- } else if (current_cpu == "x86") {
- if (is_ios) {
- defines += [ "OPENSSL_NO_ASM" ]
- } else if (is_mac) {
- sources += gypi_values.boringssl_mac_x86_sources
- } else if (is_linux || is_android) {
- sources += gypi_values.boringssl_linux_x86_sources
- } else {
- public_configs = [ ":no_asm_config" ]
- }
- } 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 {
- public_configs = [ ":no_asm_config" ]
}
}
-
component("boringssl") {
- sources = boringssl_sources
+ sources = all_sources
deps = [
":boringssl_asm",
]
+
public_configs = [ ":external_config" ]
configs += [ ":internal_config" ]
+
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
diff --git a/third_party/boringssl/boringssl.gypi b/third_party/boringssl/boringssl.gypi
index fb8e643..2c7e7c7 100644
--- a/third_party/boringssl/boringssl.gypi
+++ b/third_party/boringssl/boringssl.gypi
@@ -1,4 +1,4 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Copyright (c) 2016 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.
@@ -7,34 +7,34 @@
{
'variables': {
'boringssl_ssl_sources': [
+ 'src/ssl/custom_extensions.c',
'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/dtls_method.c',
+ 'src/ssl/dtls_record.c',
+ 'src/ssl/handshake_client.c',
+ 'src/ssl/handshake_server.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_buffer.c',
'src/ssl/ssl_cert.c',
'src/ssl/ssl_cipher.c',
+ 'src/ssl/ssl_ecdh.c',
+ 'src/ssl/ssl_file.c',
'src/ssl/ssl_lib.c',
'src/ssl/ssl_rsa.c',
- 'src/ssl/ssl_sess.c',
+ 'src/ssl/ssl_session.c',
'src/ssl/ssl_stat.c',
- 'src/ssl/ssl_txt.c',
'src/ssl/t1_enc.c',
'src/ssl/t1_lib.c',
- 'src/ssl/t1_reneg.c',
+ 'src/ssl/tls_method.c',
+ 'src/ssl/tls_record.c',
],
'boringssl_crypto_sources': [
'err_data.c',
@@ -61,18 +61,14 @@
'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',
@@ -92,6 +88,7 @@
'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',
@@ -108,11 +105,11 @@
'src/crypto/bn/shift.c',
'src/crypto/bn/sqrt.c',
'src/crypto/buf/buf.c',
+ 'src/crypto/bytestring/asn1_compat.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/chacha/chacha.c',
'src/crypto/cipher/aead.c',
'src/crypto/cipher/cipher.c',
'src/crypto/cipher/derive_key.c',
@@ -127,28 +124,31 @@
'src/crypto/cipher/tls_cbc.c',
'src/crypto/cmac/cmac.c',
'src/crypto/conf/conf.c',
+ 'src/crypto/cpu-aarch64-linux.c',
+ 'src/crypto/cpu-arm-linux.c',
'src/crypto/cpu-arm.c',
'src/crypto/cpu-intel.c',
'src/crypto/crypto.c',
+ 'src/crypto/curve25519/curve25519.c',
+ 'src/crypto/curve25519/spake25519.c',
+ 'src/crypto/curve25519/x25519-x86_64.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/p224-64.c',
'src/crypto/ec/p256-64.c',
+ 'src/crypto/ec/p256-x86_64.c',
'src/crypto/ec/simple.c',
'src/crypto/ec/util-64.c',
'src/crypto/ec/wnaf.c',
@@ -157,10 +157,9 @@
'src/crypto/ecdsa/ecdsa_asn1.c',
'src/crypto/engine/engine.c',
'src/crypto/err/err.c',
- 'src/crypto/evp/algorithm.c',
- 'src/crypto/evp/asn1.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',
@@ -168,6 +167,7 @@
'src/crypto/evp/p_rsa.c',
'src/crypto/evp/p_rsa_asn1.c',
'src/crypto/evp/pbkdf.c',
+ 'src/crypto/evp/print.c',
'src/crypto/evp/sign.c',
'src/crypto/ex_data.c',
'src/crypto/hkdf/hkdf.c',
@@ -181,6 +181,12 @@
'src/crypto/modes/ctr.c',
'src/crypto/modes/gcm.c',
'src/crypto/modes/ofb.c',
+ 'src/crypto/newhope/error_correction.c',
+ 'src/crypto/newhope/newhope.c',
+ 'src/crypto/newhope/ntt.c',
+ 'src/crypto/newhope/poly.c',
+ 'src/crypto/newhope/precomp.c',
+ 'src/crypto/newhope/reduce.c',
'src/crypto/obj/obj.c',
'src/crypto/obj/obj_xref.c',
'src/crypto/pem/pem_all.c',
@@ -198,7 +204,7 @@
'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/deterministic.c',
'src/crypto/rand/rand.c',
'src/crypto/rand/urandom.c',
'src/crypto/rand/windows.c',
@@ -223,11 +229,13 @@
'src/crypto/x509/a_sign.c',
'src/crypto/x509/a_strex.c',
'src/crypto/x509/a_verify.c',
+ 'src/crypto/x509/algorithm.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/rsa_pss.c',
'src/crypto/x509/t_crl.c',
'src/crypto/x509/t_req.c',
'src/crypto/x509/t_x509.c',
@@ -303,6 +311,8 @@
],
'boringssl_linux_aarch64_sources': [
'linux-aarch64/crypto/aes/aesv8-armx64.S',
+ 'linux-aarch64/crypto/bn/armv8-mont.S',
+ 'linux-aarch64/crypto/chacha/chacha-armv8.S',
'linux-aarch64/crypto/modes/ghashv8-armx64.S',
'linux-aarch64/crypto/sha/sha1-armv8.S',
'linux-aarch64/crypto/sha/sha256-armv8.S',
@@ -313,13 +323,13 @@
'linux-arm/crypto/aes/aesv8-armx32.S',
'linux-arm/crypto/aes/bsaes-armv7.S',
'linux-arm/crypto/bn/armv4-mont.S',
+ 'linux-arm/crypto/chacha/chacha-armv4.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/curve25519/asm/x25519-asm-arm.S',
'src/crypto/poly1305/poly1305_arm_asm.S',
],
'boringssl_linux_x86_sources': [
@@ -329,7 +339,7 @@
'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/chacha/chacha-x86.S',
'linux-x86/crypto/md5/md5-586.S',
'linux-x86/crypto/modes/ghash-x86.S',
'linux-x86/crypto/rc4/rc4-586.S',
@@ -346,16 +356,17 @@
'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/chacha/chacha-x86_64.S',
+ 'linux-x86_64/crypto/ec/p256-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',
+ 'src/crypto/curve25519/asm/x25519-asm-x86_64.S',
],
'boringssl_mac_x86_sources': [
'mac-x86/crypto/aes/aes-586.S',
@@ -364,7 +375,7 @@
'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/chacha/chacha-x86.S',
'mac-x86/crypto/md5/md5-586.S',
'mac-x86/crypto/modes/ghash-x86.S',
'mac-x86/crypto/rc4/rc4-586.S',
@@ -381,16 +392,17 @@
'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/chacha/chacha-x86_64.S',
+ 'mac-x86_64/crypto/ec/p256-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',
+ 'src/crypto/curve25519/asm/x25519-asm-x86_64.S',
],
'boringssl_win_x86_sources': [
'win-x86/crypto/aes/aes-586.asm',
@@ -399,7 +411,7 @@
'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/chacha/chacha-x86.asm',
'win-x86/crypto/md5/md5-586.asm',
'win-x86/crypto/modes/ghash-x86.asm',
'win-x86/crypto/rc4/rc4-586.asm',
@@ -416,12 +428,12 @@
'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/chacha/chacha-x86_64.asm',
+ 'win-x86_64/crypto/ec/p256-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',
diff --git a/third_party/boringssl/boringssl_configurations.gypi b/third_party/boringssl/boringssl_configurations.gypi
index b963505..3162d79 100644
--- a/third_party/boringssl/boringssl_configurations.gypi
+++ b/third_party/boringssl/boringssl_configurations.gypi
@@ -4,29 +4,20 @@
# This file is included to modify the configurations to build third-party
# code from BoringSSL.
-# This code is C code, not C++, and is not warning-free, so we need to remove
-# C++-specific flags, and add flags to supress the warnings in the code.
{
- 'variables': {
- # Used by third_party/nss, which is from Chromium.
- # Include the built-in set of root certificate authorities.
- 'exclude_nss_root_certs': 0,
- 'os_posix%': 1,
- 'os_bsd%': 0,
- 'chromeos%': 0,
- 'clang%': 0,
- },
'target_defaults': {
- 'cflags': [
- '-w',
- '-UHAVE_CVAR_BUILT_ON_SEM',
+ 'conditions': [
+ ['OS == "linux" or OS == "android"', {
+ 'cflags_c': [
+ '-std=c99',
+ ],
+ 'defines': [
+ '_XOPEN_SOURCE=700',
+ ],
+ }],
],
# Removes these flags from the list cflags.
'cflags!': [
- # NSS code from upstream mozilla builds with warnings,
- # so we must allow warnings without failing.
- '-Werror',
- '-Wall',
'-ansi',
# Not supported for C, only for C++.
'-Wnon-virtual-dtor',
@@ -35,93 +26,5 @@
'-fvisibility-inlines-hidden',
'-Woverloaded-virtual',
],
- 'configurations': {
- 'Dart_Base': {
- 'xcode_settings': {
- 'WARNING_CFLAGS': [
- '-w',
- ],
- 'WARNING_CFLAGS!': [
- '-Wall',
- '-Wextra',
- ],
- },
- },
- # Dart_Macos_Debug and Dart_Macos_Release are merged after
- # Dart_Macos_Base, so we can override the 'ansi' and '-Werror' flags set
- # at the global level in tools/gyp/configurations_xcode.gypi.
- 'Dart_Macos_Debug': {
- 'abstract': 1,
- 'xcode_settings': {
- # Remove 'ansi' setting.
- 'GCC_C_LANGUAGE_STANDARD': 'c99',
- 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
- },
- },
- 'Dart_Macos_Release': {
- 'abstract': 1,
- 'xcode_settings': {
- # Remove 'ansi' setting.
- 'GCC_C_LANGUAGE_STANDARD': 'c99',
- 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
- },
- },
- # Disable hand-coded assembly routines on ARMv6 and ARMv5TE.
- 'Dart_armv6_Base': {
- 'abstract': 1,
- 'defines': [
- 'OPENSSL_NO_ASM',
- ],
- },
- 'Dart_armv5te_Base': {
- 'abstract': 1,
- 'defines': [
- 'OPENSSL_NO_ASM',
- ],
- },
- # TODO(24321): Also disable temporarily on arm64. Reenable after the next
- # roll.
- 'Dart_arm64_Base': {
- 'abstract': 1,
- 'defines': [
- 'OPENSSL_NO_ASM',
- ],
- },
- # Android 64-bit dbc build is for arm64, disable temporarily as well.
- 'Dart_Android_arm64_Base': {
- 'abstract': 1,
- 'defines': [
- 'OPENSSL_NO_ASM',
- ],
- },
- # When being built for Android nss expects __linux__ to be defined.
- 'Dart_Android_Base': {
- 'target_conditions': [
- ['_toolset=="host"', {
- 'defines!': [
- 'ANDROID',
- ],
- # Define __linux__ on Android build for NSS.
- 'defines': [
- '__linux__',
- ],
- 'cflags!': [
- '-U__linux__',
- ],
- }],
- ['_toolset=="target"', {
- 'defines': [
- '__linux__',
- 'CHECK_FORK_GETPID', # Android does not provide pthread_atfork.
- '__USE_LARGEFILE64',
- ],
- # Define __linux__ on Android build for NSS.
- 'cflags!': [
- '-U__linux__',
- ],
- }]
- ],
- },
- },
},
}
diff --git a/third_party/boringssl/boringssl_dart.gyp b/third_party/boringssl/boringssl_dart.gyp
index 30270fa..1dc460f 100644
--- a/third_party/boringssl/boringssl_dart.gyp
+++ b/third_party/boringssl/boringssl_dart.gyp
@@ -22,6 +22,7 @@
'defines': [
'BORINGSSL_IMPLEMENTATION',
'BORINGSSL_NO_STATIC_INITIALIZER',
+ 'OPENSSL_SMALL'
],
# TODO(davidben): Fix size_t truncations in BoringSSL.
# https://crbug.com/429039
@@ -47,10 +48,6 @@
],
'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': [
diff --git a/third_party/boringssl/boringssl_tests.gypi b/third_party/boringssl/boringssl_tests.gypi
index 9413d8c..1076214 100644
--- a/third_party/boringssl/boringssl_tests.gypi
+++ b/third_party/boringssl/boringssl_tests.gypi
@@ -1,4 +1,4 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Copyright (c) 2016 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.
@@ -7,6 +7,34 @@
{
'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_asn1_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/asn1/asn1_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': [
@@ -63,6 +91,20 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
+ 'target_name': 'boringssl_chacha_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/chacha/chacha_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': [
@@ -119,6 +161,48 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
+ 'target_name': 'boringssl_ed25519_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/curve25519/ed25519_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_spake25519_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/curve25519/spake25519_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_x25519_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/curve25519/x25519_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_dh_test',
'type': 'executable',
'dependencies': [
@@ -315,6 +399,62 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
+ 'target_name': 'boringssl_newhope_statistical_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/newhope/newhope_statistical_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_newhope_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/newhope/newhope_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_newhope_vectors_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/newhope/newhope_vectors_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_obj_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/obj/obj_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_pkcs12_test',
'type': 'executable',
'dependencies': [
@@ -329,6 +469,34 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
+ 'target_name': 'boringssl_pkcs8_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/pkcs8/pkcs8_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': [
@@ -385,6 +553,20 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
+ 'target_name': 'boringssl_x509_test',
+ 'type': 'executable',
+ 'dependencies': [
+ 'boringssl.gyp:boringssl',
+ ],
+ 'sources': [
+ 'src/crypto/x509/x509_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_tab_test',
'type': 'executable',
'dependencies': [
@@ -413,20 +595,6 @@
'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': [
@@ -444,14 +612,25 @@
'variables': {
'boringssl_test_support_sources': [
'src/crypto/test/file_test.cc',
+ 'src/crypto/test/file_test.h',
'src/crypto/test/malloc.cc',
+ 'src/crypto/test/scoped_types.h',
+ 'src/crypto/test/test_util.cc',
+ 'src/crypto/test/test_util.h',
+ 'src/ssl/test/async_bio.h',
+ 'src/ssl/test/packeted_bio.h',
+ 'src/ssl/test/scoped_types.h',
+ 'src/ssl/test/test_config.h',
],
'boringssl_test_targets': [
'boringssl_aead_test',
+ 'boringssl_aes_test',
+ 'boringssl_asn1_test',
'boringssl_base64_test',
'boringssl_bio_test',
'boringssl_bn_test',
'boringssl_bytestring_test',
+ 'boringssl_chacha_test',
'boringssl_cipher_test',
'boringssl_cmac_test',
'boringssl_constant_time_test',
@@ -460,6 +639,7 @@
'boringssl_dsa_test',
'boringssl_ec_test',
'boringssl_ecdsa_test',
+ 'boringssl_ed25519_test',
'boringssl_err_test',
'boringssl_evp_extra_test',
'boringssl_evp_test',
@@ -468,16 +648,24 @@
'boringssl_hkdf_test',
'boringssl_hmac_test',
'boringssl_lhash_test',
+ 'boringssl_newhope_statistical_test',
+ 'boringssl_newhope_test',
+ 'boringssl_newhope_vectors_test',
+ 'boringssl_obj_test',
'boringssl_pbkdf_test',
'boringssl_pkcs12_test',
'boringssl_pkcs7_test',
- 'boringssl_pqueue_test',
+ 'boringssl_pkcs8_test',
+ 'boringssl_poly1305_test',
'boringssl_refcount_test',
'boringssl_rsa_test',
+ 'boringssl_spake25519_test',
'boringssl_ssl_test',
'boringssl_tab_test',
'boringssl_thread_test',
'boringssl_v3name_test',
+ 'boringssl_x25519_test',
+ 'boringssl_x509_test',
],
}
}
diff --git a/third_party/boringssl/err_data.c b/third_party/boringssl/err_data.c
index 27acc89..d685679 100644
--- a/third_party/boringssl/err_data.c
+++ b/third_party/boringssl/err_data.c
@@ -49,1554 +49,171 @@
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_LIB_HKDF == 31, library_values_changed_31);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_USER == 32, library_values_changed_32);
OPENSSL_COMPILE_ASSERT(ERR_NUM_LIBS == 33, library_values_changed_num);
-const uint32_t kOpenSSLFunctionValues[] = {
- 0xc32054b,
- 0xc328556,
- 0xc330561,
- 0xc33856e,
- 0xc340578,
- 0xc348582,
- 0xc350589,
- 0xc358595,
- 0xc36059c,
- 0xc3685b2,
- 0xc3705d1,
- 0xc3785e2,
- 0xc3805f2,
- 0xc38860c,
- 0xc390621,
- 0xc398630,
- 0xc3a0649,
- 0xc3a865d,
- 0xc3b0669,
- 0xc3b8670,
- 0xc3c0678,
- 0xc3c8690,
- 0xc3d0698,
- 0xc3d86a0,
- 0xc3e06ab,
- 0xc3e85c7,
- 0xc3f0686,
- 0x1032193d,
- 0x10329954,
- 0x1033196d,
- 0x10339983,
- 0x10341993,
- 0x103499bb,
- 0x103519c9,
- 0x103599d8,
- 0x103619f8,
- 0x10369a17,
- 0x10371a34,
- 0x10379a51,
- 0x10381a66,
- 0x10389a88,
- 0x10391aa7,
- 0x10399ac6,
- 0x103a1add,
- 0x103a9af4,
- 0x103b1afd,
- 0x103b9b08,
- 0x103c1b22,
- 0x103c9b2a,
- 0x103d1b32,
- 0x103d99a6,
- 0x103e1b4b,
- 0x103e9b5d,
- 0x103f1b70,
- 0x103f9b79,
- 0x10401b39,
- 0x14320a4e,
- 0x14328a5c,
- 0x14330a68,
- 0x14338a75,
- 0x18361224,
- 0x18371252,
- 0x18379263,
- 0x18381279,
- 0x1839129c,
- 0x183992b1,
- 0x183a12c3,
- 0x183c1307,
- 0x183c9315,
- 0x183d1328,
- 0x183d9338,
- 0x183e935e,
- 0x183f1371,
- 0x183f9380,
- 0x184093aa,
- 0x18411416,
- 0x18419427,
- 0x1842143a,
- 0x1842944c,
- 0x1843145e,
- 0x1843946f,
- 0x18441480,
- 0x18449491,
- 0x184514a2,
- 0x184594af,
- 0x184614d1,
- 0x184694e4,
- 0x184714f8,
- 0x18479505,
- 0x18481514,
- 0x18489523,
- 0x18491534,
- 0x18499550,
- 0x184a155e,
- 0x184a956f,
- 0x184b1580,
- 0x184b958e,
- 0x184c159e,
- 0x184c95c4,
- 0x184d15d3,
- 0x184d95e3,
- 0x184e15f3,
- 0x184e9602,
- 0x184f1541,
- 0x184f91b3,
- 0x18501156,
- 0x1850916e,
- 0x18511190,
- 0x185191a2,
- 0x185211d4,
- 0x185291ed,
- 0x185311fe,
- 0x18539214,
- 0x18541239,
- 0x1854928a,
- 0x185512d3,
- 0x185592e8,
- 0x185612f5,
- 0x1856934d,
- 0x18571390,
- 0x1857939d,
- 0x185813b9,
- 0x185893ca,
- 0x185913da,
- 0x185993ea,
- 0x185a13f9,
- 0x185a9408,
- 0x185b14bd,
- 0x1c3206b8,
- 0x1c3286c4,
- 0x1c3306cf,
- 0x1c3386db,
- 0x20321616,
- 0x20329621,
- 0x20331629,
- 0x20339635,
- 0x24321641,
- 0x2432964f,
- 0x24331661,
- 0x24339670,
- 0x24341683,
- 0x24349696,
- 0x243516ad,
- 0x243596c5,
- 0x243616d3,
- 0x243696eb,
- 0x243716f4,
- 0x24379706,
- 0x2438171a,
- 0x24389727,
- 0x2439173d,
- 0x24399755,
- 0x243a176d,
- 0x243a9777,
- 0x243b178c,
- 0x243b979a,
- 0x243c17b2,
- 0x243c97c9,
- 0x243d17d4,
- 0x243d97e2,
- 0x28320aae,
- 0x28328abd,
- 0x28330ac8,
- 0x28338acd,
- 0x28340ad8,
- 0x2c322b99,
- 0x2c32aba5,
- 0x2c332bb8,
- 0x2c33abc9,
- 0x2c342be2,
- 0x2c34ac0a,
- 0x2c352c21,
- 0x2c35ac3e,
- 0x2c362c5b,
- 0x2c36ac78,
- 0x2c372c91,
- 0x2c37acaa,
- 0x2c382cc0,
- 0x2c38acce,
- 0x2c392ce0,
- 0x2c39acfd,
- 0x2c3a2d1a,
- 0x2c3aad28,
- 0x2c3b2d46,
- 0x2c3bad64,
- 0x2c3c2d7f,
- 0x2c3cad93,
- 0x2c3d2da5,
- 0x2c3dadb5,
- 0x2c3e2dc3,
- 0x2c3eadd3,
- 0x2c3f2de3,
- 0x2c3fae22,
- 0x2c402e33,
- 0x2c40ae4e,
- 0x2c412e62,
- 0x2c41ae75,
- 0x2c422e94,
- 0x2c42aea8,
- 0x2c432ebb,
- 0x2c43aeca,
- 0x2c442ed9,
- 0x2c44aef0,
- 0x2c452f0b,
- 0x2c45af23,
- 0x2c462f37,
- 0x2c46af4a,
- 0x2c472f5b,
- 0x2c47af6c,
- 0x2c482f7d,
- 0x2c48af8e,
- 0x2c492f9d,
- 0x2c49afaa,
- 0x2c4a2fb7,
- 0x2c4aafc4,
- 0x2c4b2fcd,
- 0x2c4bafe1,
- 0x2c4c2ff0,
- 0x2c4caffe,
- 0x2c4d3020,
- 0x2c4db031,
- 0x2c4e3042,
- 0x2c4eb00d,
- 0x2c4f2bfb,
- 0x2c4fadfe,
- 0x2c502e10,
- 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,
- 0x343209d6,
- 0x343289e6,
- 0x343309f1,
- 0x343389fe,
- 0x38320a07,
- 0x38328a1f,
- 0x38330a32,
- 0x38338a3c,
- 0x3c320aeb,
- 0x3c328af9,
- 0x3c330b10,
- 0x3c338b24,
- 0x3c340b56,
- 0x3c348b67,
- 0x3c350b73,
- 0x3c358ba0,
- 0x3c360bb2,
- 0x3c368bdb,
- 0x3c370be8,
- 0x3c378bf5,
- 0x3c380c03,
- 0x3c388c10,
- 0x3c390c1d,
- 0x3c398c41,
- 0x3c3a0c51,
- 0x3c3a8c69,
- 0x3c3b0c7e,
- 0x3c3b8c93,
- 0x3c3c0ca0,
- 0x3c3c8cb3,
- 0x3c3d0cc6,
- 0x3c3d8cea,
- 0x3c3e0d12,
- 0x3c3e8d2b,
- 0x3c3f0d41,
- 0x3c3f8d4e,
- 0x3c400d61,
- 0x3c408d72,
- 0x3c410d83,
- 0x3c418d9c,
- 0x3c420db5,
- 0x3c428dcb,
- 0x3c430de8,
- 0x3c438dfe,
- 0x3c440e82,
- 0x3c448ea9,
- 0x3c450ec7,
- 0x3c458ee1,
- 0x3c460ef9,
- 0x3c468f11,
- 0x3c470f3c,
- 0x3c478f67,
- 0x3c480f88,
- 0x3c488fb1,
- 0x3c490fcc,
- 0x3c498ff5,
- 0x3c4a1002,
- 0x3c4a9019,
- 0x3c4b1030,
- 0x3c4b9059,
- 0x3c4c1069,
- 0x3c4c9075,
- 0x3c4d108d,
- 0x3c4d90a0,
- 0x3c4e10b1,
- 0x3c4e90c2,
- 0x3c4f10e8,
- 0x3c4f8adf,
- 0x3c500e1a,
- 0x3c508e3a,
- 0x3c510e67,
- 0x3c518fe7,
- 0x3c5210d2,
- 0x3c528b87,
- 0x3c530b3f,
- 0x40321bb9,
- 0x40329bf2,
- 0x40331c1a,
- 0x40339c32,
- 0x40341c50,
- 0x40349cb6,
- 0x40351ccd,
- 0x40359ce9,
- 0x40361d05,
- 0x40369d1f,
- 0x40371d3e,
- 0x40379d5d,
- 0x40381d75,
- 0x40389d92,
- 0x40391db5,
- 0x40399dd2,
- 0x403a1e07,
- 0x403a9e61,
- 0x403b1e76,
- 0x403b9e92,
- 0x403c1eac,
- 0x403c9eb7,
- 0x403d1eda,
- 0x403d9efe,
- 0x403e1f14,
- 0x403e9f1e,
- 0x403f1f2a,
- 0x403f9f3b,
- 0x40401f53,
- 0x40409f5b,
- 0x40411f64,
- 0x40419f6d,
- 0x40421f95,
- 0x40429fa9,
- 0x40431fb4,
- 0x40439fc0,
- 0x40442014,
- 0x4044a020,
- 0x4045202d,
- 0x4045a040,
- 0x40462058,
- 0x4046a070,
- 0x40472086,
- 0x4047a0a1,
- 0x404820bc,
- 0x4048a0d0,
- 0x404920e9,
- 0x4049a102,
- 0x404a211c,
- 0x404aa126,
- 0x404b1e29,
- 0x404b9e48,
- 0x404c2136,
- 0x404ca144,
- 0x404d2151,
- 0x404da165,
- 0x404e217d,
- 0x404ea18b,
- 0x404f21b5,
- 0x404fa1cc,
- 0x405021de,
- 0x4050a20f,
- 0x40512240,
- 0x4051a255,
- 0x40522278,
- 0x4052a298,
- 0x405322ad,
- 0x4053a2bd,
- 0x4054a2c9,
- 0x405522df,
- 0x4055a31f,
- 0x4056232c,
- 0x4056a336,
- 0x40572344,
- 0x4057a35f,
- 0x4058237a,
- 0x4058a399,
- 0x405923ae,
- 0x4059a3c3,
- 0x405a23e0,
- 0x405aa3f4,
- 0x405b2410,
- 0x405ba426,
- 0x405c2443,
- 0x405ca455,
- 0x405d246c,
- 0x405da47d,
- 0x405e2499,
- 0x405ea4ad,
- 0x405f24bd,
- 0x405fa4d9,
- 0x406024ee,
- 0x4060a504,
- 0x40612521,
- 0x4061a53a,
- 0x40622564,
- 0x4062a56d,
- 0x4063257d,
- 0x4063a5b6,
- 0x406425cc,
- 0x4064a5ea,
- 0x406525ff,
- 0x4065a61c,
- 0x40662633,
- 0x4066a651,
- 0x4067266e,
- 0x4067a685,
- 0x406826a3,
- 0x4068a6ba,
- 0x406926d2,
- 0x4069a6e3,
- 0x406a26f6,
- 0x406aa709,
- 0x406b271d,
- 0x406ba741,
- 0x406c275c,
- 0x406ca77d,
- 0x406d27a1,
- 0x406da7bc,
- 0x406e27dd,
- 0x406ea7f2,
- 0x406f280b,
- 0x406fa818,
- 0x40702826,
- 0x4070a833,
- 0x40712850,
- 0x4071a870,
- 0x4072288b,
- 0x4072a8a4,
- 0x407328bb,
- 0x4073a8d5,
- 0x407428f9,
- 0x4074a90f,
- 0x40752923,
- 0x4075a938,
- 0x40762952,
- 0x4076a964,
- 0x40772979,
- 0x4077a99f,
- 0x407829bc,
- 0x4078a9df,
- 0x40792a05,
- 0x4079aa22,
- 0x407a2a45,
- 0x407aaa61,
- 0x407b2a7d,
- 0x407baa8f,
- 0x407c2a9c,
- 0x407e2aa9,
- 0x407eaabf,
- 0x407f2ad7,
- 0x407faaea,
- 0x40802aff,
- 0x4080ab18,
- 0x40812b36,
- 0x4081ab56,
- 0x40822b5f,
- 0x4082ab7b,
- 0x40832b84,
- 0x4083a19a,
- 0x40842229,
- 0x4084a1f9,
- 0x408525a5,
- 0x4085a589,
- 0x40861c8e,
- 0x40869ca1,
- 0x40871ff4,
- 0x4087a003,
- 0x40881bfe,
- 0x40889f7d,
- 0x40891fdb,
- 0x4089a54d,
- 0x408a1b84,
- 0x408a9b95,
- 0x408b1ba7,
- 0x408ba266,
- 0x408c1df0,
- 0x408c9e17,
- 0x408d22fd,
- 0x408d9bd3,
- 0x408e1c6f,
- 0x4432042a,
- 0x4432843c,
- 0x44330445,
- 0x4433844d,
- 0x4434045a,
- 0x44348475,
- 0x44350490,
- 0x443584b0,
- 0x443604cc,
- 0x443684ed,
- 0x443704f4,
- 0x44378502,
- 0x4438050c,
- 0x44388518,
- 0x44390522,
- 0x4439852d,
- 0x443a0537,
- 0x443a8541,
- 0x443b046a,
- 0x4c3217ea,
- 0x4c3297f9,
- 0x4c331808,
- 0x4c339821,
- 0x4c34183c,
- 0x4c349858,
- 0x4c35186a,
- 0x4c359878,
- 0x4c36188d,
- 0x4c36989e,
- 0x4c3718ac,
- 0x4c3798ba,
- 0x4c3818cc,
- 0x4c3898dc,
- 0x4c3918e6,
- 0x4c3998fe,
- 0x4c3a1916,
- 0x4c3a9929,
- 0x50323053,
- 0x5032b068,
- 0x50333079,
- 0x5033b08c,
- 0x5034309d,
- 0x5034b0b0,
- 0x503530bf,
- 0x5035b0d4,
- 0x503630e4,
- 0x5036b0f3,
- 0x50373104,
- 0x5037b114,
- 0x50383125,
- 0x5038b138,
- 0x5039314a,
- 0x5039b160,
- 0x503a3172,
- 0x503ab183,
- 0x503b3194,
- 0x503bb1a5,
- 0x503c31b0,
- 0x503cb1bc,
- 0x503d31c7,
- 0x503db1d2,
- 0x503e31df,
- 0x503eb1f4,
- 0x503f3202,
- 0x503fb216,
- 0x50403229,
- 0x5040b23a,
- 0x50413254,
- 0x5041b263,
- 0x5042326c,
- 0x5042b27b,
- 0x5043328d,
- 0x5043b299,
- 0x504432a1,
- 0x5044b2b4,
- 0x504532c5,
- 0x5045b2db,
- 0x504632e7,
- 0x5046b2fb,
- 0x50473309,
- 0x5047b31d,
- 0x50483337,
- 0x5048b34b,
- 0x50493361,
- 0x5049b378,
- 0x504a338a,
- 0x504ab39e,
- 0x504b33b3,
- 0x504bb3ca,
- 0x504c33de,
- 0x504cb3e7,
- 0x504d33ef,
- 0x504db3fe,
- 0x504e340e,
- 0x68321109,
- 0x6832911a,
- 0x6833112a,
- 0x68339138,
- 0x68341145,
- 0x6c3210f8,
- 0x74320a89,
- 0x74328a9b,
- 0x783206e8,
- 0x7832871b,
- 0x7833072d,
- 0x7833873f,
- 0x78340753,
- 0x78348767,
- 0x78350785,
- 0x78358797,
- 0x783607ab,
- 0x78368819,
- 0x7837082b,
- 0x7837883d,
- 0x7838084f,
- 0x78388866,
- 0x7839087d,
- 0x78398894,
- 0x783a08b0,
- 0x783a88cc,
- 0x783b08e8,
- 0x783b88fe,
- 0x783c0914,
- 0x783c892a,
- 0x783d0947,
- 0x783d8956,
- 0x783e0965,
- 0x783e8974,
- 0x783f0990,
- 0x783f899e,
- 0x784009ac,
- 0x784089ba,
- 0x784109c7,
- 0x784186fa,
- 0x784207bf,
- 0x784287dd,
- 0x784307fb,
- 0x80321611,
-};
-
-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_bn2dec\0"
- "BN_bn2hex\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_do_sign_ex\0"
- "ECDSA_do_verify\0"
- "ECDSA_sign_ex\0"
- "digest_to_bn\0"
- "ecdsa_sign_setup\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_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_recover_crt_params\0"
- "RSA_sign\0"
- "RSA_verify\0"
- "RSA_verify_PKCS1_PSS_mgf1\0"
- "decrypt\0"
- "encrypt\0"
- "keygen\0"
- "keygen_multiprime\0"
- "private_transform\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"
- "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,
- 0xc3287c7,
- 0xc3307d6,
- 0xc3387e6,
- 0xc3407f5,
- 0xc34880e,
- 0xc35081a,
- 0xc358837,
- 0xc360849,
- 0xc368857,
- 0xc370867,
- 0xc378874,
- 0xc380884,
- 0xc38888f,
- 0xc3908a5,
- 0xc3988b4,
- 0xc3a08c8,
- 0x1032146b,
- 0x10329477,
- 0x10331490,
- 0x103394a3,
- 0x10340dd4,
- 0x103494b6,
- 0x103514cb,
- 0x103594fd,
- 0x10361516,
- 0x1036952b,
- 0x10371549,
- 0x10379558,
- 0x10381574,
- 0x1038958f,
- 0x1039159e,
- 0x103995ba,
- 0x103a15d5,
- 0x103a95ec,
- 0x103b15fd,
- 0x103b9611,
- 0x103c1630,
- 0x103c963f,
- 0x103d1656,
- 0x103d9669,
- 0x103e0b5f,
- 0x103e969a,
- 0x103f16ad,
- 0x103f96c7,
- 0x104016d7,
- 0x104096eb,
- 0x10411701,
- 0x10419719,
- 0x1042172e,
- 0x10429742,
- 0x10431754,
- 0x104385d0,
- 0x104408b4,
- 0x10449769,
- 0x10451780,
- 0x10459795,
- 0x104617a3,
- 0x1046967c,
- 0x104714de,
- 0x14320b42,
- 0x14328b50,
- 0x14330b5f,
- 0x14338b71,
+ 0xc320838,
+ 0xc328852,
+ 0xc330861,
+ 0xc338871,
+ 0xc340880,
+ 0xc348899,
+ 0xc3508a5,
+ 0xc3588c2,
+ 0xc3608d4,
+ 0xc3688e2,
+ 0xc3708f2,
+ 0xc3788ff,
+ 0xc38090f,
+ 0xc38891a,
+ 0xc390930,
+ 0xc39893f,
+ 0xc3a0953,
+ 0xc3a8845,
+ 0xc3b00ea,
+ 0x10320845,
+ 0x103293ab,
+ 0x103313b7,
+ 0x103393d0,
+ 0x103413e3,
+ 0x10348e8b,
+ 0x10350c19,
+ 0x103593f6,
+ 0x1036140b,
+ 0x1036941e,
+ 0x1037143d,
+ 0x10379456,
+ 0x1038146b,
+ 0x10389489,
+ 0x10391498,
+ 0x103994b4,
+ 0x103a14cf,
+ 0x103a94de,
+ 0x103b14fa,
+ 0x103b9515,
+ 0x103c152c,
+ 0x103c80ea,
+ 0x103d153d,
+ 0x103d9551,
+ 0x103e1570,
+ 0x103e957f,
+ 0x103f1596,
+ 0x103f95a9,
+ 0x10400bea,
+ 0x104095bc,
+ 0x104115da,
+ 0x104195ed,
+ 0x10421607,
+ 0x10429617,
+ 0x1043162b,
+ 0x10439641,
+ 0x10441659,
+ 0x1044966e,
+ 0x10451682,
+ 0x10459694,
+ 0x104605fb,
+ 0x1046893f,
+ 0x104716a9,
+ 0x104796c0,
+ 0x104816d5,
+ 0x104896e3,
+ 0x14320bcd,
+ 0x14328bdb,
+ 0x14330bea,
+ 0x14338bfc,
+ 0x143400ac,
+ 0x143480ea,
0x18320083,
- 0x18328e3a,
- 0x18340e68,
- 0x18348e7c,
- 0x18358eb3,
- 0x18368ee0,
- 0x18370ef3,
- 0x18378f07,
- 0x18380f2b,
- 0x18388f39,
- 0x18390f4f,
- 0x18398f63,
- 0x183a0f73,
- 0x183b0f83,
- 0x183b8f98,
- 0x183c8fc3,
- 0x183d0fd7,
- 0x183d8fe7,
- 0x183e0b8e,
- 0x183e8ff4,
- 0x183f1006,
- 0x183f9011,
- 0x18401021,
- 0x18409032,
- 0x18411043,
- 0x18419055,
- 0x1842107e,
- 0x184290b0,
- 0x184310bf,
- 0x18451128,
- 0x1845913e,
- 0x18461159,
- 0x18468ecb,
- 0x184709cc,
- 0x18478094,
- 0x18480faf,
- 0x184890f4,
- 0x18490e50,
- 0x18498e91,
- 0x184a118f,
- 0x184a910c,
- 0x184b10d3,
- 0x184b8e2a,
- 0x184c1097,
- 0x184c866b,
- 0x184d1174,
- 0x203211b6,
- 0x243211c2,
- 0x243288fa,
- 0x243311d4,
- 0x243391e1,
- 0x243411ee,
- 0x24349200,
- 0x2435120f,
- 0x2435922c,
- 0x24361239,
- 0x24369247,
- 0x24371255,
- 0x24379263,
- 0x2438126c,
- 0x24389279,
- 0x2439128c,
- 0x28320b82,
- 0x28328b8e,
- 0x28330b5f,
- 0x28338ba1,
- 0x2c322b08,
- 0x2c32ab16,
- 0x2c332b28,
- 0x2c33ab3a,
- 0x2c342b4e,
- 0x2c34ab60,
- 0x2c352b7b,
- 0x2c35ab8d,
- 0x2c362ba0,
- 0x2c3682f3,
- 0x2c372bad,
- 0x2c37abbf,
- 0x2c382bd2,
- 0x2c38abe0,
- 0x2c392bf0,
- 0x2c39ac02,
- 0x2c3a2c16,
- 0x2c3aac27,
- 0x2c3b134c,
- 0x2c3bac38,
- 0x2c3c2c4c,
- 0x2c3cac62,
- 0x2c3d2c7b,
- 0x2c3daca9,
- 0x2c3e2cb7,
- 0x2c3eaccf,
- 0x2c3f2ce7,
- 0x2c3facf4,
- 0x2c402d17,
- 0x2c40ad36,
- 0x2c4111b6,
- 0x2c41ad47,
- 0x2c422d5a,
- 0x2c429128,
- 0x2c432d6b,
- 0x2c4386a2,
- 0x2c442c98,
+ 0x18328ee1,
+ 0x183300ac,
+ 0x18338ef7,
+ 0x18340f0b,
+ 0x183480ea,
+ 0x18350f20,
+ 0x18358f38,
+ 0x18360f4d,
+ 0x18368f61,
+ 0x18370f85,
+ 0x18378f9b,
+ 0x18380faf,
+ 0x18388fbf,
+ 0x18390a57,
+ 0x18398fcf,
+ 0x183a0fe4,
+ 0x183a8ff8,
+ 0x183b0c25,
+ 0x183b9005,
+ 0x183c1017,
+ 0x183c9022,
+ 0x183d1032,
+ 0x183d9043,
+ 0x183e1054,
+ 0x183e9066,
+ 0x183f108f,
+ 0x183f90a8,
+ 0x184010c0,
+ 0x184086d3,
+ 0x203210e7,
+ 0x243210f3,
+ 0x24328985,
+ 0x24331105,
+ 0x24339112,
+ 0x2434111f,
+ 0x24349131,
+ 0x24351140,
+ 0x2435915d,
+ 0x2436116a,
+ 0x24369178,
+ 0x24371186,
+ 0x24379194,
+ 0x2438119d,
+ 0x243891aa,
+ 0x243911bd,
+ 0x28320c0d,
+ 0x28328c25,
+ 0x28330bea,
+ 0x28338c38,
+ 0x28340c19,
+ 0x283480ac,
+ 0x283500ea,
+ 0x2c3227cb,
+ 0x2c32a7d9,
+ 0x2c3327eb,
+ 0x2c33a7fd,
+ 0x2c342811,
+ 0x2c34a823,
+ 0x2c35283e,
+ 0x2c35a850,
+ 0x2c362863,
+ 0x2c36832d,
+ 0x2c372870,
+ 0x2c37a882,
+ 0x2c382895,
+ 0x2c38a8ac,
+ 0x2c3928ba,
+ 0x2c39a8ca,
+ 0x2c3a28dc,
+ 0x2c3aa8f0,
+ 0x2c3b2901,
+ 0x2c3ba920,
+ 0x2c3c2934,
+ 0x2c3ca94a,
+ 0x2c3d2963,
+ 0x2c3da980,
+ 0x2c3e2991,
+ 0x2c3ea99f,
+ 0x2c3f29b7,
+ 0x2c3fa9cf,
+ 0x2c4029dc,
+ 0x2c4090e7,
+ 0x2c4129ed,
+ 0x2c41aa00,
+ 0x2c4210c0,
+ 0x2c42aa11,
+ 0x2c430720,
+ 0x2c43a912,
0x30320000,
0x30328015,
0x3033001f,
@@ -1606,469 +223,454 @@
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,
- 0x34320abc,
- 0x34328ad0,
- 0x34330aed,
- 0x34338b00,
- 0x34340b0f,
- 0x34348b2c,
+ 0x303680ac,
+ 0x303700b9,
+ 0x303780c8,
+ 0x303800ea,
+ 0x303880f7,
+ 0x3039010a,
+ 0x30398125,
+ 0x303a013a,
+ 0x303a814e,
+ 0x303b0162,
+ 0x303b8173,
+ 0x303c018c,
+ 0x303c81a9,
+ 0x303d01b7,
+ 0x303d81cb,
+ 0x303e01db,
+ 0x303e81f4,
+ 0x303f0204,
+ 0x303f8217,
+ 0x30400226,
+ 0x30408232,
+ 0x30410247,
+ 0x30418257,
+ 0x3042026e,
+ 0x3042827b,
+ 0x3043028e,
+ 0x3043829d,
+ 0x304402b2,
+ 0x304482d3,
+ 0x304502e6,
+ 0x304582f9,
+ 0x30460312,
+ 0x3046832d,
+ 0x3047034a,
+ 0x30478363,
+ 0x30480371,
+ 0x30488382,
+ 0x30490391,
+ 0x304983a9,
+ 0x304a03bb,
+ 0x304a83cf,
+ 0x304b03ee,
+ 0x304b8401,
+ 0x304c040c,
+ 0x304c841d,
+ 0x304d0429,
+ 0x304d843f,
+ 0x304e044d,
+ 0x304e8463,
+ 0x304f0475,
+ 0x304f8487,
+ 0x3050049a,
+ 0x305084ad,
+ 0x305104be,
+ 0x305184ce,
+ 0x305204e6,
+ 0x305284fb,
+ 0x30530513,
+ 0x30538527,
+ 0x3054053f,
+ 0x30548558,
+ 0x30550571,
+ 0x3055858e,
+ 0x30560599,
+ 0x305685b1,
+ 0x305705c1,
+ 0x305785d2,
+ 0x305805e5,
+ 0x305885fb,
+ 0x30590604,
+ 0x30598619,
+ 0x305a062c,
+ 0x305a863b,
+ 0x305b065b,
+ 0x305b866a,
+ 0x305c068b,
+ 0x305c86a7,
+ 0x305d06b3,
+ 0x305d86d3,
+ 0x305e06ef,
+ 0x305e8700,
+ 0x305f0716,
+ 0x305f8720,
+ 0x34320b47,
+ 0x34328b5b,
+ 0x34330b78,
+ 0x34338b8b,
+ 0x34340b9a,
+ 0x34348bb7,
0x3c320083,
- 0x3c328bcb,
- 0x3c330be4,
- 0x3c338bff,
- 0x3c340c1c,
- 0x3c348c37,
- 0x3c350c52,
- 0x3c358c67,
- 0x3c360c80,
- 0x3c368c98,
- 0x3c370ca9,
- 0x3c378cb7,
- 0x3c380cc4,
- 0x3c388cd8,
- 0x3c390b8e,
- 0x3c398cec,
- 0x3c3a0d00,
- 0x3c3a8874,
- 0x3c3b0d10,
- 0x3c3b8d2b,
- 0x3c3c0d3d,
- 0x3c3c8d53,
- 0x3c3d0d5d,
- 0x3c3d8d71,
- 0x3c3e0d7f,
- 0x3c3e8da4,
- 0x3c3f0bb7,
- 0x3c3f8d8d,
- 0x403217ba,
- 0x403297d0,
- 0x403317fe,
- 0x40339808,
- 0x4034181f,
- 0x4034983d,
- 0x4035184d,
- 0x4035985f,
- 0x4036186c,
- 0x40369878,
- 0x4037188d,
- 0x403798a2,
- 0x403818b4,
- 0x403898bf,
- 0x403918d1,
- 0x40398dd4,
- 0x403a18e1,
- 0x403a98f4,
- 0x403b1915,
- 0x403b9926,
- 0x403c1936,
- 0x403c8064,
- 0x403d1942,
- 0x403d995e,
- 0x403e1974,
- 0x403e9983,
- 0x403f1996,
- 0x403f99b0,
- 0x404019be,
- 0x404099d3,
- 0x404119e7,
- 0x40419a04,
- 0x40421a1d,
- 0x40429a38,
- 0x40431a51,
- 0x40439a64,
- 0x40441a78,
- 0x40449a90,
- 0x40451aa0,
- 0x40459aae,
- 0x40461acc,
- 0x40468094,
- 0x40471ae1,
- 0x40479af3,
- 0x40481b17,
- 0x40489b37,
- 0x40491b4b,
- 0x40499b60,
- 0x404a1b79,
- 0x404a9bb3,
- 0x404b1bcd,
- 0x404b9beb,
- 0x404c1c06,
- 0x404c9c20,
- 0x404d1c37,
- 0x404d9c5f,
- 0x404e1c76,
- 0x404e9c92,
- 0x404f1cae,
- 0x404f9ccf,
- 0x40501cf1,
- 0x40509d0d,
- 0x40511d21,
- 0x40519d2e,
- 0x40521d45,
- 0x40529d55,
- 0x40531d65,
- 0x40539d79,
- 0x40541d94,
- 0x40549da4,
- 0x40551dbb,
- 0x40559dca,
- 0x40561de5,
- 0x40569dfd,
- 0x40571e19,
- 0x40579e32,
- 0x40581e45,
- 0x40589e5a,
- 0x40591e7d,
- 0x40599e8b,
- 0x405a1e98,
- 0x405a9eb1,
- 0x405b1ec9,
- 0x405b9edc,
- 0x405c1ef1,
- 0x405c9f03,
- 0x405d1f18,
- 0x405d9f28,
- 0x405e1f41,
- 0x405e9f55,
- 0x405f1f65,
- 0x405f9f7d,
- 0x40601f8e,
- 0x40609fa1,
- 0x40611fb2,
- 0x40619fd0,
- 0x40621fe1,
- 0x40629fee,
- 0x40632005,
- 0x4063a046,
- 0x4064205d,
- 0x4064a06a,
- 0x40652078,
- 0x4065a09a,
- 0x406620c2,
- 0x4066a0d7,
- 0x406720ee,
- 0x4067a0ff,
- 0x40682110,
- 0x4068a121,
- 0x40692136,
- 0x4069a14d,
- 0x406a215e,
- 0x406aa177,
- 0x406b2192,
- 0x406ba1a9,
- 0x406c2216,
- 0x406ca237,
- 0x406d224a,
- 0x406da26b,
- 0x406e2286,
- 0x406ea2a1,
- 0x406f22c2,
- 0x406fa2e8,
- 0x40702308,
- 0x4070a324,
- 0x407124b1,
- 0x4071a4d4,
- 0x407224ea,
- 0x4072a509,
- 0x40732521,
- 0x4073a541,
- 0x4074276b,
- 0x4074a790,
- 0x407527ab,
- 0x4075a7ca,
- 0x407627f9,
- 0x4076a821,
- 0x40772852,
- 0x4077a871,
- 0x40782896,
- 0x4078a8ad,
- 0x407928c0,
- 0x4079a8dd,
- 0x407a0782,
- 0x407aa8ef,
- 0x407b2902,
- 0x407ba91b,
- 0x407c2933,
- 0x407c90b0,
- 0x407d2947,
- 0x407da961,
- 0x407e2972,
- 0x407ea986,
- 0x407f2994,
- 0x407fa9af,
- 0x40801279,
- 0x4080a9d4,
- 0x408129f6,
- 0x4081aa11,
- 0x40822a26,
- 0x4082aa3e,
- 0x40832a56,
- 0x4083aa6d,
- 0x40842a83,
- 0x4084aa8f,
- 0x40852aa2,
- 0x4085aab7,
- 0x40862ac9,
- 0x4086aade,
- 0x40872ae7,
- 0x40879c4d,
- 0x40880083,
- 0x4088a025,
- 0x40890a0a,
- 0x4089a1c1,
- 0x408a1b9c,
- 0x408aa1eb,
- 0x408b283a,
- 0x41f423dc,
- 0x41f9246e,
- 0x41fe2361,
- 0x41fea592,
- 0x41ff2683,
- 0x420323f5,
- 0x42082417,
- 0x4208a453,
- 0x42092345,
- 0x4209a48d,
- 0x420a239c,
- 0x420aa37c,
- 0x420b23bc,
- 0x420ba435,
- 0x420c269f,
- 0x420ca55f,
- 0x420d2579,
- 0x420da5b0,
- 0x421225ca,
- 0x42172666,
- 0x4217a60c,
- 0x421c262e,
- 0x421f25e9,
- 0x422126b6,
- 0x42262649,
- 0x422b274f,
- 0x422ba718,
- 0x422c2737,
- 0x422ca6f2,
- 0x422d26d1,
- 0x443206ad,
- 0x443286bc,
- 0x443306c8,
- 0x443386d6,
- 0x443406e9,
- 0x443486fa,
- 0x44350701,
- 0x4435870b,
- 0x4436071e,
- 0x44368734,
- 0x44370746,
- 0x44378753,
- 0x44380762,
- 0x4438876a,
- 0x44390782,
- 0x44398790,
- 0x443a07a3,
- 0x4c3212a3,
- 0x4c3292b3,
- 0x4c3312c6,
- 0x4c3392e6,
- 0x4c340094,
- 0x4c3480b0,
- 0x4c3512f2,
- 0x4c359300,
- 0x4c36131c,
- 0x4c36932f,
- 0x4c37133e,
- 0x4c37934c,
- 0x4c381361,
- 0x4c38936d,
- 0x4c39138d,
- 0x4c3993b7,
- 0x4c3a13d0,
- 0x4c3a93e9,
- 0x4c3b05d0,
- 0x4c3b9402,
- 0x4c3c1414,
- 0x4c3c9423,
- 0x4c3d10b0,
- 0x4c3d943c,
- 0x4c3e1449,
- 0x50322d7d,
- 0x5032ad8c,
- 0x50332d97,
- 0x5033ada7,
- 0x50342dc0,
- 0x5034adda,
- 0x50352de8,
- 0x5035adfe,
- 0x50362e10,
- 0x5036ae26,
- 0x50372e3f,
- 0x5037ae52,
- 0x50382e6a,
- 0x5038ae7b,
- 0x50392e90,
- 0x5039aea4,
- 0x503a2ec4,
- 0x503aaeda,
- 0x503b2ef2,
- 0x503baf04,
- 0x503c2f20,
- 0x503caf37,
- 0x503d2f50,
- 0x503daf66,
- 0x503e2f73,
- 0x503eaf89,
- 0x503f2f9b,
- 0x503f8348,
- 0x50402fae,
- 0x5040afbe,
- 0x50412fd8,
- 0x5041afe7,
- 0x50423001,
- 0x5042b01e,
- 0x5043302e,
- 0x5043b03e,
- 0x5044304d,
- 0x50448414,
- 0x50453061,
- 0x5045b07f,
- 0x50463092,
- 0x5046b0a8,
- 0x504730ba,
- 0x5047b0cf,
- 0x504830f5,
- 0x5048b103,
- 0x50493116,
- 0x5049b12b,
- 0x504a3141,
- 0x504ab151,
- 0x504b3171,
- 0x504bb184,
- 0x504c31a7,
- 0x504cb1d5,
- 0x504d31e7,
- 0x504db204,
- 0x504e321f,
- 0x504eb23b,
- 0x504f324d,
- 0x504fb264,
- 0x50503273,
- 0x50508687,
- 0x50513286,
- 0x58320e12,
- 0x68320dd4,
- 0x68328b8e,
- 0x68330ba1,
- 0x68338de2,
- 0x68340df2,
- 0x6c320db0,
- 0x6c328b71,
- 0x6c330dbb,
- 0x74320980,
- 0x783208e5,
- 0x783288fa,
- 0x78330906,
+ 0x3c328c62,
+ 0x3c330c7b,
+ 0x3c338c96,
+ 0x3c340cb3,
+ 0x3c348cdd,
+ 0x3c350cf8,
+ 0x3c358d1e,
+ 0x3c360d37,
+ 0x3c368d4f,
+ 0x3c370d60,
+ 0x3c378d6e,
+ 0x3c380d7b,
+ 0x3c388d8f,
+ 0x3c390c25,
+ 0x3c398da3,
+ 0x3c3a0db7,
+ 0x3c3a88ff,
+ 0x3c3b0dc7,
+ 0x3c3b8de2,
+ 0x3c3c0df4,
+ 0x3c3c8e0a,
+ 0x3c3d0e14,
+ 0x3c3d8e28,
+ 0x3c3e0e36,
+ 0x3c3e8e5b,
+ 0x3c3f0c4e,
+ 0x3c3f8e44,
+ 0x3c4000ac,
+ 0x3c4080ea,
+ 0x3c410cce,
+ 0x3c418d0d,
+ 0x403216fa,
+ 0x40329710,
+ 0x4033173e,
+ 0x40339748,
+ 0x4034175f,
+ 0x4034977d,
+ 0x4035178d,
+ 0x4035979f,
+ 0x403617ac,
+ 0x403697b8,
+ 0x403717cd,
+ 0x403797df,
+ 0x403817ea,
+ 0x403897fc,
+ 0x40390e8b,
+ 0x4039980c,
+ 0x403a181f,
+ 0x403a9840,
+ 0x403b1851,
+ 0x403b9861,
+ 0x403c0064,
+ 0x403c8083,
+ 0x403d186d,
+ 0x403d9883,
+ 0x403e1892,
+ 0x403e98a5,
+ 0x403f18bf,
+ 0x403f98cd,
+ 0x404018e2,
+ 0x404098f6,
+ 0x40411913,
+ 0x4041992e,
+ 0x40421947,
+ 0x4042995a,
+ 0x4043196e,
+ 0x40439986,
+ 0x4044199d,
+ 0x404480ac,
+ 0x404519b2,
+ 0x404599c4,
+ 0x404619e8,
+ 0x40469a08,
+ 0x40471a16,
+ 0x40479a3d,
+ 0x40481a52,
+ 0x40489a6b,
+ 0x40491a82,
+ 0x40499a9c,
+ 0x404a1ab3,
+ 0x404a9ad1,
+ 0x404b1ae9,
+ 0x404b9b00,
+ 0x404c1b16,
+ 0x404c9b28,
+ 0x404d1b49,
+ 0x404d9b6b,
+ 0x404e1b7f,
+ 0x404e9b8c,
+ 0x404f1ba3,
+ 0x404f9bb3,
+ 0x40501bdd,
+ 0x40509bf1,
+ 0x40511c0c,
+ 0x40519c1c,
+ 0x40521c33,
+ 0x40529c45,
+ 0x40531c5d,
+ 0x40539c70,
+ 0x40541c85,
+ 0x40549ca8,
+ 0x40551cb6,
+ 0x40559cd3,
+ 0x40561ce0,
+ 0x40569cf9,
+ 0x40571d11,
+ 0x40579d24,
+ 0x40581d39,
+ 0x40589d4b,
+ 0x40591d7a,
+ 0x40599d93,
+ 0x405a1da7,
+ 0x405a9db7,
+ 0x405b1dcf,
+ 0x405b9de0,
+ 0x405c1df3,
+ 0x405c9e04,
+ 0x405d1e11,
+ 0x405d9e28,
+ 0x405e1e48,
+ 0x405e8a95,
+ 0x405f1e69,
+ 0x405f9e76,
+ 0x40601e84,
+ 0x40609ea6,
+ 0x40611ece,
+ 0x40619ee3,
+ 0x40621efa,
+ 0x40629f0b,
+ 0x40631f1c,
+ 0x40639f31,
+ 0x40641f48,
+ 0x40649f59,
+ 0x40651f74,
+ 0x40659f8b,
+ 0x40661fa3,
+ 0x40669fcd,
+ 0x40671ff8,
+ 0x4067a019,
+ 0x4068202c,
+ 0x4068a04d,
+ 0x4069207f,
+ 0x4069a0ad,
+ 0x406a20ce,
+ 0x406aa0ee,
+ 0x406b2276,
+ 0x406ba299,
+ 0x406c22af,
+ 0x406ca4db,
+ 0x406d250a,
+ 0x406da532,
+ 0x406e254b,
+ 0x406ea563,
+ 0x406f2582,
+ 0x406fa597,
+ 0x407025aa,
+ 0x4070a5c7,
+ 0x40710800,
+ 0x4071a5d9,
+ 0x407225ec,
+ 0x4072a605,
+ 0x4073261d,
+ 0x4073936d,
+ 0x40742631,
+ 0x4074a64b,
+ 0x4075265c,
+ 0x4075a670,
+ 0x4076267e,
+ 0x407691aa,
+ 0x407726a3,
+ 0x4077a6c5,
+ 0x407826e0,
+ 0x4078a719,
+ 0x40792730,
+ 0x4079a746,
+ 0x407a2752,
+ 0x407aa765,
+ 0x407b277a,
+ 0x407ba78c,
+ 0x407c27a1,
+ 0x407ca7aa,
+ 0x407d2068,
+ 0x407d9bc3,
+ 0x407e26f5,
+ 0x407e9d5b,
+ 0x407f1a2a,
+ 0x41f421a1,
+ 0x41f92233,
+ 0x41fe2126,
+ 0x41fea302,
+ 0x41ff23f3,
+ 0x420321ba,
+ 0x420821dc,
+ 0x4208a218,
+ 0x4209210a,
+ 0x4209a252,
+ 0x420a2161,
+ 0x420aa141,
+ 0x420b2181,
+ 0x420ba1fa,
+ 0x420c240f,
+ 0x420ca2cf,
+ 0x420d22e9,
+ 0x420da320,
+ 0x4212233a,
+ 0x421723d6,
+ 0x4217a37c,
+ 0x421c239e,
+ 0x421f2359,
+ 0x42212426,
+ 0x422623b9,
+ 0x422b24bf,
+ 0x422ba488,
+ 0x422c24a7,
+ 0x422ca462,
+ 0x422d2441,
+ 0x4432072b,
+ 0x4432873a,
+ 0x44330746,
+ 0x44338754,
+ 0x44340767,
+ 0x44348778,
+ 0x4435077f,
+ 0x44358789,
+ 0x4436079c,
+ 0x443687b2,
+ 0x443707c4,
+ 0x443787d1,
+ 0x443807e0,
+ 0x443887e8,
+ 0x44390800,
+ 0x4439880e,
+ 0x443a0821,
+ 0x4c3211d4,
+ 0x4c3291e4,
+ 0x4c3311f7,
+ 0x4c339217,
+ 0x4c3400ac,
+ 0x4c3480ea,
+ 0x4c351223,
+ 0x4c359231,
+ 0x4c36124d,
+ 0x4c369260,
+ 0x4c37126f,
+ 0x4c37927d,
+ 0x4c381292,
+ 0x4c38929e,
+ 0x4c3912be,
+ 0x4c3992e8,
+ 0x4c3a1301,
+ 0x4c3a931a,
+ 0x4c3b05fb,
+ 0x4c3b9333,
+ 0x4c3c1345,
+ 0x4c3c9354,
+ 0x4c3d136d,
+ 0x4c3d937c,
+ 0x4c3e1389,
+ 0x50322a23,
+ 0x5032aa32,
+ 0x50332a3d,
+ 0x5033aa4d,
+ 0x50342a66,
+ 0x5034aa80,
+ 0x50352a8e,
+ 0x5035aaa4,
+ 0x50362ab6,
+ 0x5036aacc,
+ 0x50372ae5,
+ 0x5037aaf8,
+ 0x50382b10,
+ 0x5038ab21,
+ 0x50392b36,
+ 0x5039ab4a,
+ 0x503a2b6a,
+ 0x503aab80,
+ 0x503b2b98,
+ 0x503babaa,
+ 0x503c2bc6,
+ 0x503cabdd,
+ 0x503d2bf6,
+ 0x503dac0c,
+ 0x503e2c19,
+ 0x503eac2f,
+ 0x503f2c41,
+ 0x503f8382,
+ 0x50402c54,
+ 0x5040ac64,
+ 0x50412c7e,
+ 0x5041ac8d,
+ 0x50422ca7,
+ 0x5042acc4,
+ 0x50432cd4,
+ 0x5043ace4,
+ 0x50442cf3,
+ 0x5044843f,
+ 0x50452d07,
+ 0x5045ad25,
+ 0x50462d38,
+ 0x5046ad4e,
+ 0x50472d60,
+ 0x5047ad75,
+ 0x50482d9b,
+ 0x5048ada9,
+ 0x50492dbc,
+ 0x5049add1,
+ 0x504a2de7,
+ 0x504aadf7,
+ 0x504b2e17,
+ 0x504bae2a,
+ 0x504c2e4d,
+ 0x504cae7b,
+ 0x504d2e8d,
+ 0x504daeaa,
+ 0x504e2ec5,
+ 0x504eaee1,
+ 0x504f2ef3,
+ 0x504faf0a,
+ 0x50502f19,
+ 0x505086ef,
+ 0x50512f2c,
+ 0x58320ec9,
+ 0x68320e8b,
+ 0x68328c25,
+ 0x68330c38,
+ 0x68338e99,
+ 0x68340ea9,
+ 0x683480ea,
+ 0x6c320e67,
+ 0x6c328bfc,
+ 0x6c330e72,
+ 0x74320a0b,
+ 0x78320970,
+ 0x78328985,
+ 0x78330991,
0x78338083,
- 0x78340915,
- 0x7834892a,
- 0x78350949,
- 0x7835896b,
- 0x78360980,
- 0x78368996,
- 0x783709a6,
- 0x783789b9,
- 0x783809cc,
- 0x783889de,
- 0x783909eb,
- 0x78398a0a,
- 0x783a0a1f,
- 0x783a8a2d,
- 0x783b0a37,
- 0x783b8a4b,
- 0x783c0a62,
- 0x783c8a77,
- 0x783d0a8e,
- 0x783d8aa3,
- 0x783e09f9,
- 0x803211a5,
+ 0x783409a0,
+ 0x783489b5,
+ 0x783509d4,
+ 0x783589f6,
+ 0x78360a0b,
+ 0x78368a21,
+ 0x78370a31,
+ 0x78378a44,
+ 0x78380a57,
+ 0x78388a69,
+ 0x78390a76,
+ 0x78398a95,
+ 0x783a0aaa,
+ 0x783a8ab8,
+ 0x783b0ac2,
+ 0x783b8ad6,
+ 0x783c0aed,
+ 0x783c8b02,
+ 0x783d0b19,
+ 0x783d8b2e,
+ 0x783e0a84,
+ 0x7c3210d6,
};
const size_t kOpenSSLReasonValuesLen = sizeof(kOpenSSLReasonValues) / sizeof(kOpenSSLReasonValues[0]);
@@ -2082,8 +684,10 @@
"BN_LIB\0"
"BOOLEAN_IS_WRONG_LENGTH\0"
"BUFFER_TOO_SMALL\0"
+ "CONTEXT_NOT_INITIALISED\0"
"DECODE_ERROR\0"
"DEPTH_EXCEEDED\0"
+ "DIGEST_AND_KEY_TYPE_NOT_SUPPORTED\0"
"ENCODE_ERROR\0"
"ERROR_GETTING_TIME\0"
"EXPECTING_AN_ASN1_SEQUENCE\0"
@@ -2124,7 +728,6 @@
"INVALID_UNIVERSALSTRING_LENGTH\0"
"INVALID_UTF8STRING\0"
"LIST_ERROR\0"
- "MALLOC_FAILURE\0"
"MISSING_ASN1_EOS\0"
"MISSING_EOC\0"
"MISSING_SECOND_NUMBER\0"
@@ -2156,10 +759,13 @@
"UNEXPECTED_EOC\0"
"UNIVERSALSTRING_IS_WRONG_LENGTH\0"
"UNKNOWN_FORMAT\0"
+ "UNKNOWN_MESSAGE_DIGEST_ALGORITHM\0"
+ "UNKNOWN_SIGNATURE_ALGORITHM\0"
"UNKNOWN_TAG\0"
"UNSUPPORTED_ANY_DEFINED_BY_TYPE\0"
"UNSUPPORTED_PUBLIC_KEY_TYPE\0"
"UNSUPPORTED_TYPE\0"
+ "WRONG_PUBLIC_KEY_TYPE\0"
"WRONG_TAG\0"
"WRONG_TYPE\0"
"BAD_FOPEN_MODE\0"
@@ -2180,6 +786,7 @@
"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"
@@ -2231,6 +838,7 @@
"MODULUS_TOO_LARGE\0"
"NO_PRIVATE_VALUE\0"
"BAD_Q_VALUE\0"
+ "BAD_VERSION\0"
"MISSING_PARAMETERS\0"
"NEED_NEW_SETUP_VALUES\0"
"BIGNUM_OUT_OF_RANGE\0"
@@ -2238,8 +846,10 @@
"D2I_ECPKPARAMETERS_FAILURE\0"
"EC_GROUP_NEW_BY_NAME_FAILURE\0"
"GROUP2PKPARAMETERS_FAILURE\0"
+ "GROUP_MISMATCH\0"
"I2D_ECPKPARAMETERS_FAILURE\0"
"INCOMPATIBLE_OBJECTS\0"
+ "INVALID_COFACTOR\0"
"INVALID_COMPRESSED_POINT\0"
"INVALID_COMPRESSION_BIT\0"
"INVALID_ENCODING\0"
@@ -2264,27 +874,19 @@
"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"
@@ -2294,17 +896,8 @@
"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"
@@ -2340,6 +933,7 @@
"UNKNOWN_ALGORITHM\0"
"UNKNOWN_CIPHER\0"
"UNKNOWN_CIPHER_ALGORITHM\0"
+ "UNKNOWN_DIGEST\0"
"UNKNOWN_HASH\0"
"UNSUPPORTED_PRIVATE_KEY_ALGORITHM\0"
"BAD_E_VALUE\0"
@@ -2390,7 +984,6 @@
"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"
@@ -2401,7 +994,6 @@
"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"
@@ -2410,63 +1002,56 @@
"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"
+ "CUSTOM_EXTENSION_ERROR\0"
"DATA_LENGTH_TOO_LONG\0"
"DECRYPTION_FAILED\0"
"DECRYPTION_FAILED_OR_BAD_RECORD_MAC\0"
"DH_PUBLIC_VALUE_LENGTH_IS_WRONG\0"
+ "DH_P_TOO_LONG\0"
"DIGEST_CHECK_FAILED\0"
+ "DOWNGRADE_DETECTED\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_ADDING_EXTENSION\0"
"ERROR_IN_RECEIVED_CIPHER_LIST\0"
- "EVP_DIGESTSIGNFINAL_FAILED\0"
- "EVP_DIGESTSIGNINIT_FAILED\0"
+ "ERROR_PARSING_EXTENSION\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_OUTER_RECORD_TYPE\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_EXTENSION\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"
+ "NEGOTIATED_BOTH_NPN_AND_ALPN\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_COMMON_SIGNATURE_ALGORITHMS\0"
"NO_COMPRESSION_SPECIFIED\0"
"NO_METHOD_SPECIFIED\0"
"NO_P256_SUPPORT\0"
@@ -2474,13 +1059,10 @@
"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"
@@ -2489,11 +1071,9 @@
"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"
@@ -2503,12 +1083,11 @@
"SERVERHELLO_TLSEXT\0"
"SESSION_ID_CONTEXT_UNINITIALIZED\0"
"SESSION_MAY_NOT_BE_CREATED\0"
- "SIGNATURE_ALGORITHMS_ERROR\0"
+ "SHUTDOWN_WHILE_IN_INIT\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"
@@ -2523,10 +1102,7 @@
"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"
@@ -2545,16 +1121,12 @@
"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_GROUP_CLOSE\0"
+ "UNEXPECTED_EXTENSION\0"
"UNEXPECTED_MESSAGE\0"
"UNEXPECTED_OPERATOR_IN_GROUP\0"
"UNEXPECTED_RECORD\0"
@@ -2566,13 +1138,11 @@
"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"
+ "UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY\0"
"WRONG_CERTIFICATE_TYPE\0"
"WRONG_CIPHER_RETURNED\0"
"WRONG_CURVE\0"
@@ -2593,12 +1163,14 @@
"IDP_MISMATCH\0"
"INVALID_DIRECTORY\0"
"INVALID_FIELD_NAME\0"
+ "INVALID_PSS_PARAMETERS\0"
"INVALID_TRUST\0"
"ISSUER_MISMATCH\0"
"KEY_TYPE_MISMATCH\0"
"KEY_VALUES_MISMATCH\0"
"LOADING_CERT_DIR\0"
"LOADING_DEFAULTS\0"
+ "NAME_TOO_LONG\0"
"NEWER_CRL_NOT_NEWER\0"
"NOT_PKCS7_SIGNED_DATA\0"
"NO_CERTIFICATES_INCLUDED\0"
@@ -2608,8 +1180,6 @@
"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"
diff --git a/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S b/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S
index c414476..3e8cb16 100644
--- a/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S
+++ b/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S
@@ -1,5 +1,5 @@
#if defined(__aarch64__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
#if __ARM_MAX_ARCH__>=7
.text
@@ -13,6 +13,7 @@
.long 0x1b,0x1b,0x1b,0x1b
.globl aes_v8_set_encrypt_key
+.hidden aes_v8_set_encrypt_key
.type aes_v8_set_encrypt_key,%function
.align 5
aes_v8_set_encrypt_key:
@@ -180,6 +181,7 @@
.size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key
.globl aes_v8_set_decrypt_key
+.hidden aes_v8_set_decrypt_key
.type aes_v8_set_decrypt_key,%function
.align 5
aes_v8_set_decrypt_key:
@@ -219,6 +221,7 @@
ret
.size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key
.globl aes_v8_encrypt
+.hidden aes_v8_encrypt
.type aes_v8_encrypt,%function
.align 5
aes_v8_encrypt:
@@ -248,6 +251,7 @@
ret
.size aes_v8_encrypt,.-aes_v8_encrypt
.globl aes_v8_decrypt
+.hidden aes_v8_decrypt
.type aes_v8_decrypt,%function
.align 5
aes_v8_decrypt:
@@ -277,6 +281,7 @@
ret
.size aes_v8_decrypt,.-aes_v8_decrypt
.globl aes_v8_cbc_encrypt
+.hidden aes_v8_cbc_encrypt
.type aes_v8_cbc_encrypt,%function
.align 5
aes_v8_cbc_encrypt:
@@ -567,6 +572,7 @@
ret
.size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt
.globl aes_v8_ctr32_encrypt_blocks
+.hidden aes_v8_ctr32_encrypt_blocks
.type aes_v8_ctr32_encrypt_blocks,%function
.align 5
aes_v8_ctr32_encrypt_blocks:
@@ -748,4 +754,4 @@
ret
.size aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-aarch64/crypto/bn/armv8-mont.S b/third_party/boringssl/linux-aarch64/crypto/bn/armv8-mont.S
new file mode 100644
index 0000000..74702db
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/bn/armv8-mont.S
@@ -0,0 +1,1407 @@
+#if defined(__aarch64__)
+.text
+
+.globl bn_mul_mont
+.hidden bn_mul_mont
+.type bn_mul_mont,%function
+.align 5
+bn_mul_mont:
+ tst x5,#7
+ b.eq __bn_sqr8x_mont
+ tst x5,#3
+ b.eq __bn_mul4x_mont
+.Lmul_mont:
+ stp x29,x30,[sp,#-64]!
+ add x29,sp,#0
+ stp x19,x20,[sp,#16]
+ stp x21,x22,[sp,#32]
+ stp x23,x24,[sp,#48]
+
+ ldr x9,[x2],#8 // bp[0]
+ sub x22,sp,x5,lsl#3
+ ldp x7,x8,[x1],#16 // ap[0..1]
+ lsl x5,x5,#3
+ ldr x4,[x4] // *n0
+ and x22,x22,#-16 // ABI says so
+ ldp x13,x14,[x3],#16 // np[0..1]
+
+ mul x6,x7,x9 // ap[0]*bp[0]
+ sub x21,x5,#16 // j=num-2
+ umulh x7,x7,x9
+ mul x10,x8,x9 // ap[1]*bp[0]
+ umulh x11,x8,x9
+
+ mul x15,x6,x4 // "tp[0]"*n0
+ mov sp,x22 // alloca
+
+ // (*) mul x12,x13,x15 // np[0]*m1
+ umulh x13,x13,x15
+ mul x16,x14,x15 // np[1]*m1
+ // (*) adds x12,x12,x6 // discarded
+ // (*) As for removal of first multiplication and addition
+ // instructions. The outcome of first addition is
+ // guaranteed to be zero, which leaves two computationally
+ // significant outcomes: it either carries or not. Then
+ // question is when does it carry? Is there alternative
+ // way to deduce it? If you follow operations, you can
+ // observe that condition for carry is quite simple:
+ // x6 being non-zero. So that carry can be calculated
+ // by adding -1 to x6. That's what next instruction does.
+ subs xzr,x6,#1 // (*)
+ umulh x17,x14,x15
+ adc x13,x13,xzr
+ cbz x21,.L1st_skip
+
+.L1st:
+ ldr x8,[x1],#8
+ adds x6,x10,x7
+ sub x21,x21,#8 // j--
+ adc x7,x11,xzr
+
+ ldr x14,[x3],#8
+ adds x12,x16,x13
+ mul x10,x8,x9 // ap[j]*bp[0]
+ adc x13,x17,xzr
+ umulh x11,x8,x9
+
+ adds x12,x12,x6
+ mul x16,x14,x15 // np[j]*m1
+ adc x13,x13,xzr
+ umulh x17,x14,x15
+ str x12,[x22],#8 // tp[j-1]
+ cbnz x21,.L1st
+
+.L1st_skip:
+ adds x6,x10,x7
+ sub x1,x1,x5 // rewind x1
+ adc x7,x11,xzr
+
+ adds x12,x16,x13
+ sub x3,x3,x5 // rewind x3
+ adc x13,x17,xzr
+
+ adds x12,x12,x6
+ sub x20,x5,#8 // i=num-1
+ adcs x13,x13,x7
+
+ adc x19,xzr,xzr // upmost overflow bit
+ stp x12,x13,[x22]
+
+.Louter:
+ ldr x9,[x2],#8 // bp[i]
+ ldp x7,x8,[x1],#16
+ ldr x23,[sp] // tp[0]
+ add x22,sp,#8
+
+ mul x6,x7,x9 // ap[0]*bp[i]
+ sub x21,x5,#16 // j=num-2
+ umulh x7,x7,x9
+ ldp x13,x14,[x3],#16
+ mul x10,x8,x9 // ap[1]*bp[i]
+ adds x6,x6,x23
+ umulh x11,x8,x9
+ adc x7,x7,xzr
+
+ mul x15,x6,x4
+ sub x20,x20,#8 // i--
+
+ // (*) mul x12,x13,x15 // np[0]*m1
+ umulh x13,x13,x15
+ mul x16,x14,x15 // np[1]*m1
+ // (*) adds x12,x12,x6
+ subs xzr,x6,#1 // (*)
+ umulh x17,x14,x15
+ cbz x21,.Linner_skip
+
+.Linner:
+ ldr x8,[x1],#8
+ adc x13,x13,xzr
+ ldr x23,[x22],#8 // tp[j]
+ adds x6,x10,x7
+ sub x21,x21,#8 // j--
+ adc x7,x11,xzr
+
+ adds x12,x16,x13
+ ldr x14,[x3],#8
+ adc x13,x17,xzr
+
+ mul x10,x8,x9 // ap[j]*bp[i]
+ adds x6,x6,x23
+ umulh x11,x8,x9
+ adc x7,x7,xzr
+
+ mul x16,x14,x15 // np[j]*m1
+ adds x12,x12,x6
+ umulh x17,x14,x15
+ str x12,[x22,#-16] // tp[j-1]
+ cbnz x21,.Linner
+
+.Linner_skip:
+ ldr x23,[x22],#8 // tp[j]
+ adc x13,x13,xzr
+ adds x6,x10,x7
+ sub x1,x1,x5 // rewind x1
+ adc x7,x11,xzr
+
+ adds x12,x16,x13
+ sub x3,x3,x5 // rewind x3
+ adcs x13,x17,x19
+ adc x19,xzr,xzr
+
+ adds x6,x6,x23
+ adc x7,x7,xzr
+
+ adds x12,x12,x6
+ adcs x13,x13,x7
+ adc x19,x19,xzr // upmost overflow bit
+ stp x12,x13,[x22,#-16]
+
+ cbnz x20,.Louter
+
+ // Final step. We see if result is larger than modulus, and
+ // if it is, subtract the modulus. But comparison implies
+ // subtraction. So we subtract modulus, see if it borrowed,
+ // and conditionally copy original value.
+ ldr x23,[sp] // tp[0]
+ add x22,sp,#8
+ ldr x14,[x3],#8 // np[0]
+ subs x21,x5,#8 // j=num-1 and clear borrow
+ mov x1,x0
+.Lsub:
+ sbcs x8,x23,x14 // tp[j]-np[j]
+ ldr x23,[x22],#8
+ sub x21,x21,#8 // j--
+ ldr x14,[x3],#8
+ str x8,[x1],#8 // rp[j]=tp[j]-np[j]
+ cbnz x21,.Lsub
+
+ sbcs x8,x23,x14
+ sbcs x19,x19,xzr // did it borrow?
+ str x8,[x1],#8 // rp[num-1]
+
+ ldr x23,[sp] // tp[0]
+ add x22,sp,#8
+ ldr x8,[x0],#8 // rp[0]
+ sub x5,x5,#8 // num--
+ nop
+.Lcond_copy:
+ sub x5,x5,#8 // num--
+ csel x14,x23,x8,lo // did it borrow?
+ ldr x23,[x22],#8
+ ldr x8,[x0],#8
+ str xzr,[x22,#-16] // wipe tp
+ str x14,[x0,#-16]
+ cbnz x5,.Lcond_copy
+
+ csel x14,x23,x8,lo
+ str xzr,[x22,#-8] // wipe tp
+ str x14,[x0,#-8]
+
+ ldp x19,x20,[x29,#16]
+ mov sp,x29
+ ldp x21,x22,[x29,#32]
+ mov x0,#1
+ ldp x23,x24,[x29,#48]
+ ldr x29,[sp],#64
+ ret
+.size bn_mul_mont,.-bn_mul_mont
+.type __bn_sqr8x_mont,%function
+.align 5
+__bn_sqr8x_mont:
+ cmp x1,x2
+ b.ne __bn_mul4x_mont
+.Lsqr8x_mont:
+ 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]
+ stp x0,x3,[sp,#96] // offload rp and np
+
+ ldp x6,x7,[x1,#8*0]
+ ldp x8,x9,[x1,#8*2]
+ ldp x10,x11,[x1,#8*4]
+ ldp x12,x13,[x1,#8*6]
+
+ sub x2,sp,x5,lsl#4
+ lsl x5,x5,#3
+ ldr x4,[x4] // *n0
+ mov sp,x2 // alloca
+ sub x27,x5,#8*8
+ b .Lsqr8x_zero_start
+
+.Lsqr8x_zero:
+ sub x27,x27,#8*8
+ stp xzr,xzr,[x2,#8*0]
+ stp xzr,xzr,[x2,#8*2]
+ stp xzr,xzr,[x2,#8*4]
+ stp xzr,xzr,[x2,#8*6]
+.Lsqr8x_zero_start:
+ stp xzr,xzr,[x2,#8*8]
+ stp xzr,xzr,[x2,#8*10]
+ stp xzr,xzr,[x2,#8*12]
+ stp xzr,xzr,[x2,#8*14]
+ add x2,x2,#8*16
+ cbnz x27,.Lsqr8x_zero
+
+ add x3,x1,x5
+ add x1,x1,#8*8
+ mov x19,xzr
+ mov x20,xzr
+ mov x21,xzr
+ mov x22,xzr
+ mov x23,xzr
+ mov x24,xzr
+ mov x25,xzr
+ mov x26,xzr
+ mov x2,sp
+ str x4,[x29,#112] // offload n0
+
+ // Multiply everything but a[i]*a[i]
+.align 4
+.Lsqr8x_outer_loop:
+ // a[1]a[0] (i)
+ // a[2]a[0]
+ // a[3]a[0]
+ // a[4]a[0]
+ // a[5]a[0]
+ // a[6]a[0]
+ // a[7]a[0]
+ // a[2]a[1] (ii)
+ // a[3]a[1]
+ // a[4]a[1]
+ // a[5]a[1]
+ // a[6]a[1]
+ // a[7]a[1]
+ // a[3]a[2] (iii)
+ // a[4]a[2]
+ // a[5]a[2]
+ // a[6]a[2]
+ // a[7]a[2]
+ // a[4]a[3] (iv)
+ // a[5]a[3]
+ // a[6]a[3]
+ // a[7]a[3]
+ // a[5]a[4] (v)
+ // a[6]a[4]
+ // a[7]a[4]
+ // a[6]a[5] (vi)
+ // a[7]a[5]
+ // a[7]a[6] (vii)
+
+ mul x14,x7,x6 // lo(a[1..7]*a[0]) (i)
+ mul x15,x8,x6
+ mul x16,x9,x6
+ mul x17,x10,x6
+ adds x20,x20,x14 // t[1]+lo(a[1]*a[0])
+ mul x14,x11,x6
+ adcs x21,x21,x15
+ mul x15,x12,x6
+ adcs x22,x22,x16
+ mul x16,x13,x6
+ adcs x23,x23,x17
+ umulh x17,x7,x6 // hi(a[1..7]*a[0])
+ adcs x24,x24,x14
+ umulh x14,x8,x6
+ adcs x25,x25,x15
+ umulh x15,x9,x6
+ adcs x26,x26,x16
+ umulh x16,x10,x6
+ stp x19,x20,[x2],#8*2 // t[0..1]
+ adc x19,xzr,xzr // t[8]
+ adds x21,x21,x17 // t[2]+lo(a[1]*a[0])
+ umulh x17,x11,x6
+ adcs x22,x22,x14
+ umulh x14,x12,x6
+ adcs x23,x23,x15
+ umulh x15,x13,x6
+ adcs x24,x24,x16
+ mul x16,x8,x7 // lo(a[2..7]*a[1]) (ii)
+ adcs x25,x25,x17
+ mul x17,x9,x7
+ adcs x26,x26,x14
+ mul x14,x10,x7
+ adc x19,x19,x15
+
+ mul x15,x11,x7
+ adds x22,x22,x16
+ mul x16,x12,x7
+ adcs x23,x23,x17
+ mul x17,x13,x7
+ adcs x24,x24,x14
+ umulh x14,x8,x7 // hi(a[2..7]*a[1])
+ adcs x25,x25,x15
+ umulh x15,x9,x7
+ adcs x26,x26,x16
+ umulh x16,x10,x7
+ adcs x19,x19,x17
+ umulh x17,x11,x7
+ stp x21,x22,[x2],#8*2 // t[2..3]
+ adc x20,xzr,xzr // t[9]
+ adds x23,x23,x14
+ umulh x14,x12,x7
+ adcs x24,x24,x15
+ umulh x15,x13,x7
+ adcs x25,x25,x16
+ mul x16,x9,x8 // lo(a[3..7]*a[2]) (iii)
+ adcs x26,x26,x17
+ mul x17,x10,x8
+ adcs x19,x19,x14
+ mul x14,x11,x8
+ adc x20,x20,x15
+
+ mul x15,x12,x8
+ adds x24,x24,x16
+ mul x16,x13,x8
+ adcs x25,x25,x17
+ umulh x17,x9,x8 // hi(a[3..7]*a[2])
+ adcs x26,x26,x14
+ umulh x14,x10,x8
+ adcs x19,x19,x15
+ umulh x15,x11,x8
+ adcs x20,x20,x16
+ umulh x16,x12,x8
+ stp x23,x24,[x2],#8*2 // t[4..5]
+ adc x21,xzr,xzr // t[10]
+ adds x25,x25,x17
+ umulh x17,x13,x8
+ adcs x26,x26,x14
+ mul x14,x10,x9 // lo(a[4..7]*a[3]) (iv)
+ adcs x19,x19,x15
+ mul x15,x11,x9
+ adcs x20,x20,x16
+ mul x16,x12,x9
+ adc x21,x21,x17
+
+ mul x17,x13,x9
+ adds x26,x26,x14
+ umulh x14,x10,x9 // hi(a[4..7]*a[3])
+ adcs x19,x19,x15
+ umulh x15,x11,x9
+ adcs x20,x20,x16
+ umulh x16,x12,x9
+ adcs x21,x21,x17
+ umulh x17,x13,x9
+ stp x25,x26,[x2],#8*2 // t[6..7]
+ adc x22,xzr,xzr // t[11]
+ adds x19,x19,x14
+ mul x14,x11,x10 // lo(a[5..7]*a[4]) (v)
+ adcs x20,x20,x15
+ mul x15,x12,x10
+ adcs x21,x21,x16
+ mul x16,x13,x10
+ adc x22,x22,x17
+
+ umulh x17,x11,x10 // hi(a[5..7]*a[4])
+ adds x20,x20,x14
+ umulh x14,x12,x10
+ adcs x21,x21,x15
+ umulh x15,x13,x10
+ adcs x22,x22,x16
+ mul x16,x12,x11 // lo(a[6..7]*a[5]) (vi)
+ adc x23,xzr,xzr // t[12]
+ adds x21,x21,x17
+ mul x17,x13,x11
+ adcs x22,x22,x14
+ umulh x14,x12,x11 // hi(a[6..7]*a[5])
+ adc x23,x23,x15
+
+ umulh x15,x13,x11
+ adds x22,x22,x16
+ mul x16,x13,x12 // lo(a[7]*a[6]) (vii)
+ adcs x23,x23,x17
+ umulh x17,x13,x12 // hi(a[7]*a[6])
+ adc x24,xzr,xzr // t[13]
+ adds x23,x23,x14
+ sub x27,x3,x1 // done yet?
+ adc x24,x24,x15
+
+ adds x24,x24,x16
+ sub x14,x3,x5 // rewinded ap
+ adc x25,xzr,xzr // t[14]
+ add x25,x25,x17
+
+ cbz x27,.Lsqr8x_outer_break
+
+ mov x4,x6
+ ldp x6,x7,[x2,#8*0]
+ ldp x8,x9,[x2,#8*2]
+ ldp x10,x11,[x2,#8*4]
+ ldp x12,x13,[x2,#8*6]
+ adds x19,x19,x6
+ adcs x20,x20,x7
+ ldp x6,x7,[x1,#8*0]
+ adcs x21,x21,x8
+ adcs x22,x22,x9
+ ldp x8,x9,[x1,#8*2]
+ adcs x23,x23,x10
+ adcs x24,x24,x11
+ ldp x10,x11,[x1,#8*4]
+ adcs x25,x25,x12
+ mov x0,x1
+ adcs x26,xzr,x13
+ ldp x12,x13,[x1,#8*6]
+ add x1,x1,#8*8
+ //adc x28,xzr,xzr // moved below
+ mov x27,#-8*8
+
+ // a[8]a[0]
+ // a[9]a[0]
+ // a[a]a[0]
+ // a[b]a[0]
+ // a[c]a[0]
+ // a[d]a[0]
+ // a[e]a[0]
+ // a[f]a[0]
+ // a[8]a[1]
+ // a[f]a[1]........................
+ // a[8]a[2]
+ // a[f]a[2]........................
+ // a[8]a[3]
+ // a[f]a[3]........................
+ // a[8]a[4]
+ // a[f]a[4]........................
+ // a[8]a[5]
+ // a[f]a[5]........................
+ // a[8]a[6]
+ // a[f]a[6]........................
+ // a[8]a[7]
+ // a[f]a[7]........................
+.Lsqr8x_mul:
+ mul x14,x6,x4
+ adc x28,xzr,xzr // carry bit, modulo-scheduled
+ mul x15,x7,x4
+ add x27,x27,#8
+ mul x16,x8,x4
+ mul x17,x9,x4
+ adds x19,x19,x14
+ mul x14,x10,x4
+ adcs x20,x20,x15
+ mul x15,x11,x4
+ adcs x21,x21,x16
+ mul x16,x12,x4
+ adcs x22,x22,x17
+ mul x17,x13,x4
+ adcs x23,x23,x14
+ umulh x14,x6,x4
+ adcs x24,x24,x15
+ umulh x15,x7,x4
+ adcs x25,x25,x16
+ umulh x16,x8,x4
+ adcs x26,x26,x17
+ umulh x17,x9,x4
+ adc x28,x28,xzr
+ str x19,[x2],#8
+ adds x19,x20,x14
+ umulh x14,x10,x4
+ adcs x20,x21,x15
+ umulh x15,x11,x4
+ adcs x21,x22,x16
+ umulh x16,x12,x4
+ adcs x22,x23,x17
+ umulh x17,x13,x4
+ ldr x4,[x0,x27]
+ adcs x23,x24,x14
+ adcs x24,x25,x15
+ adcs x25,x26,x16
+ adcs x26,x28,x17
+ //adc x28,xzr,xzr // moved above
+ cbnz x27,.Lsqr8x_mul
+ // note that carry flag is guaranteed
+ // to be zero at this point
+ cmp x1,x3 // done yet?
+ b.eq .Lsqr8x_break
+
+ ldp x6,x7,[x2,#8*0]
+ ldp x8,x9,[x2,#8*2]
+ ldp x10,x11,[x2,#8*4]
+ ldp x12,x13,[x2,#8*6]
+ adds x19,x19,x6
+ ldr x4,[x0,#-8*8]
+ adcs x20,x20,x7
+ ldp x6,x7,[x1,#8*0]
+ adcs x21,x21,x8
+ adcs x22,x22,x9
+ ldp x8,x9,[x1,#8*2]
+ adcs x23,x23,x10
+ adcs x24,x24,x11
+ ldp x10,x11,[x1,#8*4]
+ adcs x25,x25,x12
+ mov x27,#-8*8
+ adcs x26,x26,x13
+ ldp x12,x13,[x1,#8*6]
+ add x1,x1,#8*8
+ //adc x28,xzr,xzr // moved above
+ b .Lsqr8x_mul
+
+.align 4
+.Lsqr8x_break:
+ ldp x6,x7,[x0,#8*0]
+ add x1,x0,#8*8
+ ldp x8,x9,[x0,#8*2]
+ sub x14,x3,x1 // is it last iteration?
+ ldp x10,x11,[x0,#8*4]
+ sub x15,x2,x14
+ ldp x12,x13,[x0,#8*6]
+ cbz x14,.Lsqr8x_outer_loop
+
+ stp x19,x20,[x2,#8*0]
+ ldp x19,x20,[x15,#8*0]
+ stp x21,x22,[x2,#8*2]
+ ldp x21,x22,[x15,#8*2]
+ stp x23,x24,[x2,#8*4]
+ ldp x23,x24,[x15,#8*4]
+ stp x25,x26,[x2,#8*6]
+ mov x2,x15
+ ldp x25,x26,[x15,#8*6]
+ b .Lsqr8x_outer_loop
+
+.align 4
+.Lsqr8x_outer_break:
+ // Now multiply above result by 2 and add a[n-1]*a[n-1]|...|a[0]*a[0]
+ ldp x7,x9,[x14,#8*0] // recall that x14 is &a[0]
+ ldp x15,x16,[sp,#8*1]
+ ldp x11,x13,[x14,#8*2]
+ add x1,x14,#8*4
+ ldp x17,x14,[sp,#8*3]
+
+ stp x19,x20,[x2,#8*0]
+ mul x19,x7,x7
+ stp x21,x22,[x2,#8*2]
+ umulh x7,x7,x7
+ stp x23,x24,[x2,#8*4]
+ mul x8,x9,x9
+ stp x25,x26,[x2,#8*6]
+ mov x2,sp
+ umulh x9,x9,x9
+ adds x20,x7,x15,lsl#1
+ extr x15,x16,x15,#63
+ sub x27,x5,#8*4
+
+.Lsqr4x_shift_n_add:
+ adcs x21,x8,x15
+ extr x16,x17,x16,#63
+ sub x27,x27,#8*4
+ adcs x22,x9,x16
+ ldp x15,x16,[x2,#8*5]
+ mul x10,x11,x11
+ ldp x7,x9,[x1],#8*2
+ umulh x11,x11,x11
+ mul x12,x13,x13
+ umulh x13,x13,x13
+ extr x17,x14,x17,#63
+ stp x19,x20,[x2,#8*0]
+ adcs x23,x10,x17
+ extr x14,x15,x14,#63
+ stp x21,x22,[x2,#8*2]
+ adcs x24,x11,x14
+ ldp x17,x14,[x2,#8*7]
+ extr x15,x16,x15,#63
+ adcs x25,x12,x15
+ extr x16,x17,x16,#63
+ adcs x26,x13,x16
+ ldp x15,x16,[x2,#8*9]
+ mul x6,x7,x7
+ ldp x11,x13,[x1],#8*2
+ umulh x7,x7,x7
+ mul x8,x9,x9
+ umulh x9,x9,x9
+ stp x23,x24,[x2,#8*4]
+ extr x17,x14,x17,#63
+ stp x25,x26,[x2,#8*6]
+ add x2,x2,#8*8
+ adcs x19,x6,x17
+ extr x14,x15,x14,#63
+ adcs x20,x7,x14
+ ldp x17,x14,[x2,#8*3]
+ extr x15,x16,x15,#63
+ cbnz x27,.Lsqr4x_shift_n_add
+ ldp x1,x4,[x29,#104] // pull np and n0
+
+ adcs x21,x8,x15
+ extr x16,x17,x16,#63
+ adcs x22,x9,x16
+ ldp x15,x16,[x2,#8*5]
+ mul x10,x11,x11
+ umulh x11,x11,x11
+ stp x19,x20,[x2,#8*0]
+ mul x12,x13,x13
+ umulh x13,x13,x13
+ stp x21,x22,[x2,#8*2]
+ extr x17,x14,x17,#63
+ adcs x23,x10,x17
+ extr x14,x15,x14,#63
+ ldp x19,x20,[sp,#8*0]
+ adcs x24,x11,x14
+ extr x15,x16,x15,#63
+ ldp x6,x7,[x1,#8*0]
+ adcs x25,x12,x15
+ extr x16,xzr,x16,#63
+ ldp x8,x9,[x1,#8*2]
+ adc x26,x13,x16
+ ldp x10,x11,[x1,#8*4]
+
+ // Reduce by 512 bits per iteration
+ mul x28,x4,x19 // t[0]*n0
+ ldp x12,x13,[x1,#8*6]
+ add x3,x1,x5
+ ldp x21,x22,[sp,#8*2]
+ stp x23,x24,[x2,#8*4]
+ ldp x23,x24,[sp,#8*4]
+ stp x25,x26,[x2,#8*6]
+ ldp x25,x26,[sp,#8*6]
+ add x1,x1,#8*8
+ mov x30,xzr // initial top-most carry
+ mov x2,sp
+ mov x27,#8
+
+.Lsqr8x_reduction:
+ // (*) mul x14,x6,x28 // lo(n[0-7])*lo(t[0]*n0)
+ mul x15,x7,x28
+ sub x27,x27,#1
+ mul x16,x8,x28
+ str x28,[x2],#8 // put aside t[0]*n0 for tail processing
+ mul x17,x9,x28
+ // (*) adds xzr,x19,x14
+ subs xzr,x19,#1 // (*)
+ mul x14,x10,x28
+ adcs x19,x20,x15
+ mul x15,x11,x28
+ adcs x20,x21,x16
+ mul x16,x12,x28
+ adcs x21,x22,x17
+ mul x17,x13,x28
+ adcs x22,x23,x14
+ umulh x14,x6,x28 // hi(n[0-7])*lo(t[0]*n0)
+ adcs x23,x24,x15
+ umulh x15,x7,x28
+ adcs x24,x25,x16
+ umulh x16,x8,x28
+ adcs x25,x26,x17
+ umulh x17,x9,x28
+ adc x26,xzr,xzr
+ adds x19,x19,x14
+ umulh x14,x10,x28
+ adcs x20,x20,x15
+ umulh x15,x11,x28
+ adcs x21,x21,x16
+ umulh x16,x12,x28
+ adcs x22,x22,x17
+ umulh x17,x13,x28
+ mul x28,x4,x19 // next t[0]*n0
+ adcs x23,x23,x14
+ adcs x24,x24,x15
+ adcs x25,x25,x16
+ adc x26,x26,x17
+ cbnz x27,.Lsqr8x_reduction
+
+ ldp x14,x15,[x2,#8*0]
+ ldp x16,x17,[x2,#8*2]
+ mov x0,x2
+ sub x27,x3,x1 // done yet?
+ adds x19,x19,x14
+ adcs x20,x20,x15
+ ldp x14,x15,[x2,#8*4]
+ adcs x21,x21,x16
+ adcs x22,x22,x17
+ ldp x16,x17,[x2,#8*6]
+ adcs x23,x23,x14
+ adcs x24,x24,x15
+ adcs x25,x25,x16
+ adcs x26,x26,x17
+ //adc x28,xzr,xzr // moved below
+ cbz x27,.Lsqr8x8_post_condition
+
+ ldr x4,[x2,#-8*8]
+ ldp x6,x7,[x1,#8*0]
+ ldp x8,x9,[x1,#8*2]
+ ldp x10,x11,[x1,#8*4]
+ mov x27,#-8*8
+ ldp x12,x13,[x1,#8*6]
+ add x1,x1,#8*8
+
+.Lsqr8x_tail:
+ mul x14,x6,x4
+ adc x28,xzr,xzr // carry bit, modulo-scheduled
+ mul x15,x7,x4
+ add x27,x27,#8
+ mul x16,x8,x4
+ mul x17,x9,x4
+ adds x19,x19,x14
+ mul x14,x10,x4
+ adcs x20,x20,x15
+ mul x15,x11,x4
+ adcs x21,x21,x16
+ mul x16,x12,x4
+ adcs x22,x22,x17
+ mul x17,x13,x4
+ adcs x23,x23,x14
+ umulh x14,x6,x4
+ adcs x24,x24,x15
+ umulh x15,x7,x4
+ adcs x25,x25,x16
+ umulh x16,x8,x4
+ adcs x26,x26,x17
+ umulh x17,x9,x4
+ adc x28,x28,xzr
+ str x19,[x2],#8
+ adds x19,x20,x14
+ umulh x14,x10,x4
+ adcs x20,x21,x15
+ umulh x15,x11,x4
+ adcs x21,x22,x16
+ umulh x16,x12,x4
+ adcs x22,x23,x17
+ umulh x17,x13,x4
+ ldr x4,[x0,x27]
+ adcs x23,x24,x14
+ adcs x24,x25,x15
+ adcs x25,x26,x16
+ adcs x26,x28,x17
+ //adc x28,xzr,xzr // moved above
+ cbnz x27,.Lsqr8x_tail
+ // note that carry flag is guaranteed
+ // to be zero at this point
+ ldp x6,x7,[x2,#8*0]
+ sub x27,x3,x1 // done yet?
+ sub x16,x3,x5 // rewinded np
+ ldp x8,x9,[x2,#8*2]
+ ldp x10,x11,[x2,#8*4]
+ ldp x12,x13,[x2,#8*6]
+ cbz x27,.Lsqr8x_tail_break
+
+ ldr x4,[x0,#-8*8]
+ adds x19,x19,x6
+ adcs x20,x20,x7
+ ldp x6,x7,[x1,#8*0]
+ adcs x21,x21,x8
+ adcs x22,x22,x9
+ ldp x8,x9,[x1,#8*2]
+ adcs x23,x23,x10
+ adcs x24,x24,x11
+ ldp x10,x11,[x1,#8*4]
+ adcs x25,x25,x12
+ mov x27,#-8*8
+ adcs x26,x26,x13
+ ldp x12,x13,[x1,#8*6]
+ add x1,x1,#8*8
+ //adc x28,xzr,xzr // moved above
+ b .Lsqr8x_tail
+
+.align 4
+.Lsqr8x_tail_break:
+ ldr x4,[x29,#112] // pull n0
+ add x27,x2,#8*8 // end of current t[num] window
+
+ subs xzr,x30,#1 // "move" top-most carry to carry bit
+ adcs x14,x19,x6
+ adcs x15,x20,x7
+ ldp x19,x20,[x0,#8*0]
+ adcs x21,x21,x8
+ ldp x6,x7,[x16,#8*0] // recall that x16 is &n[0]
+ adcs x22,x22,x9
+ ldp x8,x9,[x16,#8*2]
+ adcs x23,x23,x10
+ adcs x24,x24,x11
+ ldp x10,x11,[x16,#8*4]
+ adcs x25,x25,x12
+ adcs x26,x26,x13
+ ldp x12,x13,[x16,#8*6]
+ add x1,x16,#8*8
+ adc x30,xzr,xzr // top-most carry
+ mul x28,x4,x19
+ stp x14,x15,[x2,#8*0]
+ stp x21,x22,[x2,#8*2]
+ ldp x21,x22,[x0,#8*2]
+ stp x23,x24,[x2,#8*4]
+ ldp x23,x24,[x0,#8*4]
+ cmp x27,x29 // did we hit the bottom?
+ stp x25,x26,[x2,#8*6]
+ mov x2,x0 // slide the window
+ ldp x25,x26,[x0,#8*6]
+ mov x27,#8
+ b.ne .Lsqr8x_reduction
+
+ // Final step. We see if result is larger than modulus, and
+ // if it is, subtract the modulus. But comparison implies
+ // subtraction. So we subtract modulus, see if it borrowed,
+ // and conditionally copy original value.
+ ldr x0,[x29,#96] // pull rp
+ add x2,x2,#8*8
+ subs x14,x19,x6
+ sbcs x15,x20,x7
+ sub x27,x5,#8*8
+ mov x3,x0 // x0 copy
+
+.Lsqr8x_sub:
+ sbcs x16,x21,x8
+ ldp x6,x7,[x1,#8*0]
+ sbcs x17,x22,x9
+ stp x14,x15,[x0,#8*0]
+ sbcs x14,x23,x10
+ ldp x8,x9,[x1,#8*2]
+ sbcs x15,x24,x11
+ stp x16,x17,[x0,#8*2]
+ sbcs x16,x25,x12
+ ldp x10,x11,[x1,#8*4]
+ sbcs x17,x26,x13
+ ldp x12,x13,[x1,#8*6]
+ add x1,x1,#8*8
+ ldp x19,x20,[x2,#8*0]
+ sub x27,x27,#8*8
+ ldp x21,x22,[x2,#8*2]
+ ldp x23,x24,[x2,#8*4]
+ ldp x25,x26,[x2,#8*6]
+ add x2,x2,#8*8
+ stp x14,x15,[x0,#8*4]
+ sbcs x14,x19,x6
+ stp x16,x17,[x0,#8*6]
+ add x0,x0,#8*8
+ sbcs x15,x20,x7
+ cbnz x27,.Lsqr8x_sub
+
+ sbcs x16,x21,x8
+ mov x2,sp
+ add x1,sp,x5
+ ldp x6,x7,[x3,#8*0]
+ sbcs x17,x22,x9
+ stp x14,x15,[x0,#8*0]
+ sbcs x14,x23,x10
+ ldp x8,x9,[x3,#8*2]
+ sbcs x15,x24,x11
+ stp x16,x17,[x0,#8*2]
+ sbcs x16,x25,x12
+ ldp x19,x20,[x1,#8*0]
+ sbcs x17,x26,x13
+ ldp x21,x22,[x1,#8*2]
+ sbcs xzr,x30,xzr // did it borrow?
+ ldr x30,[x29,#8] // pull return address
+ stp x14,x15,[x0,#8*4]
+ stp x16,x17,[x0,#8*6]
+
+ sub x27,x5,#8*4
+.Lsqr4x_cond_copy:
+ sub x27,x27,#8*4
+ csel x14,x19,x6,lo
+ stp xzr,xzr,[x2,#8*0]
+ csel x15,x20,x7,lo
+ ldp x6,x7,[x3,#8*4]
+ ldp x19,x20,[x1,#8*4]
+ csel x16,x21,x8,lo
+ stp xzr,xzr,[x2,#8*2]
+ add x2,x2,#8*4
+ csel x17,x22,x9,lo
+ ldp x8,x9,[x3,#8*6]
+ ldp x21,x22,[x1,#8*6]
+ add x1,x1,#8*4
+ stp x14,x15,[x3,#8*0]
+ stp x16,x17,[x3,#8*2]
+ add x3,x3,#8*4
+ stp xzr,xzr,[x1,#8*0]
+ stp xzr,xzr,[x1,#8*2]
+ cbnz x27,.Lsqr4x_cond_copy
+
+ csel x14,x19,x6,lo
+ stp xzr,xzr,[x2,#8*0]
+ csel x15,x20,x7,lo
+ stp xzr,xzr,[x2,#8*2]
+ csel x16,x21,x8,lo
+ csel x17,x22,x9,lo
+ stp x14,x15,[x3,#8*0]
+ stp x16,x17,[x3,#8*2]
+
+ b .Lsqr8x_done
+
+.align 4
+.Lsqr8x8_post_condition:
+ adc x28,xzr,xzr
+ ldr x30,[x29,#8] // pull return address
+ // x19-7,x28 hold result, x6-7 hold modulus
+ subs x6,x19,x6
+ ldr x1,[x29,#96] // pull rp
+ sbcs x7,x20,x7
+ stp xzr,xzr,[sp,#8*0]
+ sbcs x8,x21,x8
+ stp xzr,xzr,[sp,#8*2]
+ sbcs x9,x22,x9
+ stp xzr,xzr,[sp,#8*4]
+ sbcs x10,x23,x10
+ stp xzr,xzr,[sp,#8*6]
+ sbcs x11,x24,x11
+ stp xzr,xzr,[sp,#8*8]
+ sbcs x12,x25,x12
+ stp xzr,xzr,[sp,#8*10]
+ sbcs x13,x26,x13
+ stp xzr,xzr,[sp,#8*12]
+ sbcs x28,x28,xzr // did it borrow?
+ stp xzr,xzr,[sp,#8*14]
+
+ // x6-7 hold result-modulus
+ csel x6,x19,x6,lo
+ csel x7,x20,x7,lo
+ csel x8,x21,x8,lo
+ csel x9,x22,x9,lo
+ stp x6,x7,[x1,#8*0]
+ csel x10,x23,x10,lo
+ csel x11,x24,x11,lo
+ stp x8,x9,[x1,#8*2]
+ csel x12,x25,x12,lo
+ csel x13,x26,x13,lo
+ stp x10,x11,[x1,#8*4]
+ stp x12,x13,[x1,#8*6]
+
+.Lsqr8x_done:
+ ldp x19,x20,[x29,#16]
+ mov sp,x29
+ ldp x21,x22,[x29,#32]
+ mov x0,#1
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldr x29,[sp],#128
+ ret
+.size __bn_sqr8x_mont,.-__bn_sqr8x_mont
+.type __bn_mul4x_mont,%function
+.align 5
+__bn_mul4x_mont:
+ 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 x26,sp,x5,lsl#3
+ lsl x5,x5,#3
+ ldr x4,[x4] // *n0
+ sub sp,x26,#8*4 // alloca
+
+ add x10,x2,x5
+ add x27,x1,x5
+ stp x0,x10,[x29,#96] // offload rp and &b[num]
+
+ ldr x24,[x2,#8*0] // b[0]
+ ldp x6,x7,[x1,#8*0] // a[0..3]
+ ldp x8,x9,[x1,#8*2]
+ add x1,x1,#8*4
+ mov x19,xzr
+ mov x20,xzr
+ mov x21,xzr
+ mov x22,xzr
+ ldp x14,x15,[x3,#8*0] // n[0..3]
+ ldp x16,x17,[x3,#8*2]
+ adds x3,x3,#8*4 // clear carry bit
+ mov x0,xzr
+ mov x28,#0
+ mov x26,sp
+
+.Loop_mul4x_1st_reduction:
+ mul x10,x6,x24 // lo(a[0..3]*b[0])
+ adc x0,x0,xzr // modulo-scheduled
+ mul x11,x7,x24
+ add x28,x28,#8
+ mul x12,x8,x24
+ and x28,x28,#31
+ mul x13,x9,x24
+ adds x19,x19,x10
+ umulh x10,x6,x24 // hi(a[0..3]*b[0])
+ adcs x20,x20,x11
+ mul x25,x19,x4 // t[0]*n0
+ adcs x21,x21,x12
+ umulh x11,x7,x24
+ adcs x22,x22,x13
+ umulh x12,x8,x24
+ adc x23,xzr,xzr
+ umulh x13,x9,x24
+ ldr x24,[x2,x28] // next b[i] (or b[0])
+ adds x20,x20,x10
+ // (*) mul x10,x14,x25 // lo(n[0..3]*t[0]*n0)
+ str x25,[x26],#8 // put aside t[0]*n0 for tail processing
+ adcs x21,x21,x11
+ mul x11,x15,x25
+ adcs x22,x22,x12
+ mul x12,x16,x25
+ adc x23,x23,x13 // can't overflow
+ mul x13,x17,x25
+ // (*) adds xzr,x19,x10
+ subs xzr,x19,#1 // (*)
+ umulh x10,x14,x25 // hi(n[0..3]*t[0]*n0)
+ adcs x19,x20,x11
+ umulh x11,x15,x25
+ adcs x20,x21,x12
+ umulh x12,x16,x25
+ adcs x21,x22,x13
+ umulh x13,x17,x25
+ adcs x22,x23,x0
+ adc x0,xzr,xzr
+ adds x19,x19,x10
+ sub x10,x27,x1
+ adcs x20,x20,x11
+ adcs x21,x21,x12
+ adcs x22,x22,x13
+ //adc x0,x0,xzr
+ cbnz x28,.Loop_mul4x_1st_reduction
+
+ cbz x10,.Lmul4x4_post_condition
+
+ ldp x6,x7,[x1,#8*0] // a[4..7]
+ ldp x8,x9,[x1,#8*2]
+ add x1,x1,#8*4
+ ldr x25,[sp] // a[0]*n0
+ ldp x14,x15,[x3,#8*0] // n[4..7]
+ ldp x16,x17,[x3,#8*2]
+ add x3,x3,#8*4
+
+.Loop_mul4x_1st_tail:
+ mul x10,x6,x24 // lo(a[4..7]*b[i])
+ adc x0,x0,xzr // modulo-scheduled
+ mul x11,x7,x24
+ add x28,x28,#8
+ mul x12,x8,x24
+ and x28,x28,#31
+ mul x13,x9,x24
+ adds x19,x19,x10
+ umulh x10,x6,x24 // hi(a[4..7]*b[i])
+ adcs x20,x20,x11
+ umulh x11,x7,x24
+ adcs x21,x21,x12
+ umulh x12,x8,x24
+ adcs x22,x22,x13
+ umulh x13,x9,x24
+ adc x23,xzr,xzr
+ ldr x24,[x2,x28] // next b[i] (or b[0])
+ adds x20,x20,x10
+ mul x10,x14,x25 // lo(n[4..7]*a[0]*n0)
+ adcs x21,x21,x11
+ mul x11,x15,x25
+ adcs x22,x22,x12
+ mul x12,x16,x25
+ adc x23,x23,x13 // can't overflow
+ mul x13,x17,x25
+ adds x19,x19,x10
+ umulh x10,x14,x25 // hi(n[4..7]*a[0]*n0)
+ adcs x20,x20,x11
+ umulh x11,x15,x25
+ adcs x21,x21,x12
+ umulh x12,x16,x25
+ adcs x22,x22,x13
+ adcs x23,x23,x0
+ umulh x13,x17,x25
+ adc x0,xzr,xzr
+ ldr x25,[sp,x28] // next t[0]*n0
+ str x19,[x26],#8 // result!!!
+ adds x19,x20,x10
+ sub x10,x27,x1 // done yet?
+ adcs x20,x21,x11
+ adcs x21,x22,x12
+ adcs x22,x23,x13
+ //adc x0,x0,xzr
+ cbnz x28,.Loop_mul4x_1st_tail
+
+ sub x11,x27,x5 // rewinded x1
+ cbz x10,.Lmul4x_proceed
+
+ ldp x6,x7,[x1,#8*0]
+ ldp x8,x9,[x1,#8*2]
+ add x1,x1,#8*4
+ ldp x14,x15,[x3,#8*0]
+ ldp x16,x17,[x3,#8*2]
+ add x3,x3,#8*4
+ b .Loop_mul4x_1st_tail
+
+.align 5
+.Lmul4x_proceed:
+ ldr x24,[x2,#8*4]! // *++b
+ adc x30,x0,xzr
+ ldp x6,x7,[x11,#8*0] // a[0..3]
+ sub x3,x3,x5 // rewind np
+ ldp x8,x9,[x11,#8*2]
+ add x1,x11,#8*4
+
+ stp x19,x20,[x26,#8*0] // result!!!
+ ldp x19,x20,[sp,#8*4] // t[0..3]
+ stp x21,x22,[x26,#8*2] // result!!!
+ ldp x21,x22,[sp,#8*6]
+
+ ldp x14,x15,[x3,#8*0] // n[0..3]
+ mov x26,sp
+ ldp x16,x17,[x3,#8*2]
+ adds x3,x3,#8*4 // clear carry bit
+ mov x0,xzr
+
+.align 4
+.Loop_mul4x_reduction:
+ mul x10,x6,x24 // lo(a[0..3]*b[4])
+ adc x0,x0,xzr // modulo-scheduled
+ mul x11,x7,x24
+ add x28,x28,#8
+ mul x12,x8,x24
+ and x28,x28,#31
+ mul x13,x9,x24
+ adds x19,x19,x10
+ umulh x10,x6,x24 // hi(a[0..3]*b[4])
+ adcs x20,x20,x11
+ mul x25,x19,x4 // t[0]*n0
+ adcs x21,x21,x12
+ umulh x11,x7,x24
+ adcs x22,x22,x13
+ umulh x12,x8,x24
+ adc x23,xzr,xzr
+ umulh x13,x9,x24
+ ldr x24,[x2,x28] // next b[i]
+ adds x20,x20,x10
+ // (*) mul x10,x14,x25
+ str x25,[x26],#8 // put aside t[0]*n0 for tail processing
+ adcs x21,x21,x11
+ mul x11,x15,x25 // lo(n[0..3]*t[0]*n0
+ adcs x22,x22,x12
+ mul x12,x16,x25
+ adc x23,x23,x13 // can't overflow
+ mul x13,x17,x25
+ // (*) adds xzr,x19,x10
+ subs xzr,x19,#1 // (*)
+ umulh x10,x14,x25 // hi(n[0..3]*t[0]*n0
+ adcs x19,x20,x11
+ umulh x11,x15,x25
+ adcs x20,x21,x12
+ umulh x12,x16,x25
+ adcs x21,x22,x13
+ umulh x13,x17,x25
+ adcs x22,x23,x0
+ adc x0,xzr,xzr
+ adds x19,x19,x10
+ adcs x20,x20,x11
+ adcs x21,x21,x12
+ adcs x22,x22,x13
+ //adc x0,x0,xzr
+ cbnz x28,.Loop_mul4x_reduction
+
+ adc x0,x0,xzr
+ ldp x10,x11,[x26,#8*4] // t[4..7]
+ ldp x12,x13,[x26,#8*6]
+ ldp x6,x7,[x1,#8*0] // a[4..7]
+ ldp x8,x9,[x1,#8*2]
+ add x1,x1,#8*4
+ adds x19,x19,x10
+ adcs x20,x20,x11
+ adcs x21,x21,x12
+ adcs x22,x22,x13
+ //adc x0,x0,xzr
+
+ ldr x25,[sp] // t[0]*n0
+ ldp x14,x15,[x3,#8*0] // n[4..7]
+ ldp x16,x17,[x3,#8*2]
+ add x3,x3,#8*4
+
+.align 4
+.Loop_mul4x_tail:
+ mul x10,x6,x24 // lo(a[4..7]*b[4])
+ adc x0,x0,xzr // modulo-scheduled
+ mul x11,x7,x24
+ add x28,x28,#8
+ mul x12,x8,x24
+ and x28,x28,#31
+ mul x13,x9,x24
+ adds x19,x19,x10
+ umulh x10,x6,x24 // hi(a[4..7]*b[4])
+ adcs x20,x20,x11
+ umulh x11,x7,x24
+ adcs x21,x21,x12
+ umulh x12,x8,x24
+ adcs x22,x22,x13
+ umulh x13,x9,x24
+ adc x23,xzr,xzr
+ ldr x24,[x2,x28] // next b[i]
+ adds x20,x20,x10
+ mul x10,x14,x25 // lo(n[4..7]*t[0]*n0)
+ adcs x21,x21,x11
+ mul x11,x15,x25
+ adcs x22,x22,x12
+ mul x12,x16,x25
+ adc x23,x23,x13 // can't overflow
+ mul x13,x17,x25
+ adds x19,x19,x10
+ umulh x10,x14,x25 // hi(n[4..7]*t[0]*n0)
+ adcs x20,x20,x11
+ umulh x11,x15,x25
+ adcs x21,x21,x12
+ umulh x12,x16,x25
+ adcs x22,x22,x13
+ umulh x13,x17,x25
+ adcs x23,x23,x0
+ ldr x25,[sp,x28] // next a[0]*n0
+ adc x0,xzr,xzr
+ str x19,[x26],#8 // result!!!
+ adds x19,x20,x10
+ sub x10,x27,x1 // done yet?
+ adcs x20,x21,x11
+ adcs x21,x22,x12
+ adcs x22,x23,x13
+ //adc x0,x0,xzr
+ cbnz x28,.Loop_mul4x_tail
+
+ sub x11,x3,x5 // rewinded np?
+ adc x0,x0,xzr
+ cbz x10,.Loop_mul4x_break
+
+ ldp x10,x11,[x26,#8*4]
+ ldp x12,x13,[x26,#8*6]
+ ldp x6,x7,[x1,#8*0]
+ ldp x8,x9,[x1,#8*2]
+ add x1,x1,#8*4
+ adds x19,x19,x10
+ adcs x20,x20,x11
+ adcs x21,x21,x12
+ adcs x22,x22,x13
+ //adc x0,x0,xzr
+ ldp x14,x15,[x3,#8*0]
+ ldp x16,x17,[x3,#8*2]
+ add x3,x3,#8*4
+ b .Loop_mul4x_tail
+
+.align 4
+.Loop_mul4x_break:
+ ldp x12,x13,[x29,#96] // pull rp and &b[num]
+ adds x19,x19,x30
+ add x2,x2,#8*4 // bp++
+ adcs x20,x20,xzr
+ sub x1,x1,x5 // rewind ap
+ adcs x21,x21,xzr
+ stp x19,x20,[x26,#8*0] // result!!!
+ adcs x22,x22,xzr
+ ldp x19,x20,[sp,#8*4] // t[0..3]
+ adc x30,x0,xzr
+ stp x21,x22,[x26,#8*2] // result!!!
+ cmp x2,x13 // done yet?
+ ldp x21,x22,[sp,#8*6]
+ ldp x14,x15,[x11,#8*0] // n[0..3]
+ ldp x16,x17,[x11,#8*2]
+ add x3,x11,#8*4
+ b.eq .Lmul4x_post
+
+ ldr x24,[x2]
+ ldp x6,x7,[x1,#8*0] // a[0..3]
+ ldp x8,x9,[x1,#8*2]
+ adds x1,x1,#8*4 // clear carry bit
+ mov x0,xzr
+ mov x26,sp
+ b .Loop_mul4x_reduction
+
+.align 4
+.Lmul4x_post:
+ // Final step. We see if result is larger than modulus, and
+ // if it is, subtract the modulus. But comparison implies
+ // subtraction. So we subtract modulus, see if it borrowed,
+ // and conditionally copy original value.
+ mov x0,x12
+ mov x27,x12 // x0 copy
+ subs x10,x19,x14
+ add x26,sp,#8*8
+ sbcs x11,x20,x15
+ sub x28,x5,#8*4
+
+.Lmul4x_sub:
+ sbcs x12,x21,x16
+ ldp x14,x15,[x3,#8*0]
+ sub x28,x28,#8*4
+ ldp x19,x20,[x26,#8*0]
+ sbcs x13,x22,x17
+ ldp x16,x17,[x3,#8*2]
+ add x3,x3,#8*4
+ ldp x21,x22,[x26,#8*2]
+ add x26,x26,#8*4
+ stp x10,x11,[x0,#8*0]
+ sbcs x10,x19,x14
+ stp x12,x13,[x0,#8*2]
+ add x0,x0,#8*4
+ sbcs x11,x20,x15
+ cbnz x28,.Lmul4x_sub
+
+ sbcs x12,x21,x16
+ mov x26,sp
+ add x1,sp,#8*4
+ ldp x6,x7,[x27,#8*0]
+ sbcs x13,x22,x17
+ stp x10,x11,[x0,#8*0]
+ ldp x8,x9,[x27,#8*2]
+ stp x12,x13,[x0,#8*2]
+ ldp x19,x20,[x1,#8*0]
+ ldp x21,x22,[x1,#8*2]
+ sbcs xzr,x30,xzr // did it borrow?
+ ldr x30,[x29,#8] // pull return address
+
+ sub x28,x5,#8*4
+.Lmul4x_cond_copy:
+ sub x28,x28,#8*4
+ csel x10,x19,x6,lo
+ stp xzr,xzr,[x26,#8*0]
+ csel x11,x20,x7,lo
+ ldp x6,x7,[x27,#8*4]
+ ldp x19,x20,[x1,#8*4]
+ csel x12,x21,x8,lo
+ stp xzr,xzr,[x26,#8*2]
+ add x26,x26,#8*4
+ csel x13,x22,x9,lo
+ ldp x8,x9,[x27,#8*6]
+ ldp x21,x22,[x1,#8*6]
+ add x1,x1,#8*4
+ stp x10,x11,[x27,#8*0]
+ stp x12,x13,[x27,#8*2]
+ add x27,x27,#8*4
+ cbnz x28,.Lmul4x_cond_copy
+
+ csel x10,x19,x6,lo
+ stp xzr,xzr,[x26,#8*0]
+ csel x11,x20,x7,lo
+ stp xzr,xzr,[x26,#8*2]
+ csel x12,x21,x8,lo
+ stp xzr,xzr,[x26,#8*3]
+ csel x13,x22,x9,lo
+ stp xzr,xzr,[x26,#8*4]
+ stp x10,x11,[x27,#8*0]
+ stp x12,x13,[x27,#8*2]
+
+ b .Lmul4x_done
+
+.align 4
+.Lmul4x4_post_condition:
+ adc x0,x0,xzr
+ ldr x1,[x29,#96] // pull rp
+ // x19-3,x0 hold result, x14-7 hold modulus
+ subs x6,x19,x14
+ ldr x30,[x29,#8] // pull return address
+ sbcs x7,x20,x15
+ stp xzr,xzr,[sp,#8*0]
+ sbcs x8,x21,x16
+ stp xzr,xzr,[sp,#8*2]
+ sbcs x9,x22,x17
+ stp xzr,xzr,[sp,#8*4]
+ sbcs xzr,x0,xzr // did it borrow?
+ stp xzr,xzr,[sp,#8*6]
+
+ // x6-3 hold result-modulus
+ csel x6,x19,x6,lo
+ csel x7,x20,x7,lo
+ csel x8,x21,x8,lo
+ csel x9,x22,x9,lo
+ stp x6,x7,[x1,#8*0]
+ stp x8,x9,[x1,#8*2]
+
+.Lmul4x_done:
+ ldp x19,x20,[x29,#16]
+ mov sp,x29
+ ldp x21,x22,[x29,#32]
+ mov x0,#1
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldr x29,[sp],#128
+ ret
+.size __bn_mul4x_mont,.-__bn_mul4x_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,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 4
+#endif
diff --git a/third_party/boringssl/linux-aarch64/crypto/chacha/chacha-armv8.S b/third_party/boringssl/linux-aarch64/crypto/chacha/chacha-armv8.S
new file mode 100644
index 0000000..6ff6bff
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/chacha/chacha-armv8.S
@@ -0,0 +1,1971 @@
+#if defined(__aarch64__)
+#include <openssl/arm_arch.h>
+
+.text
+
+
+
+.align 5
+.Lsigma:
+.quad 0x3320646e61707865,0x6b20657479622d32 // endian-neutral
+.Lone:
+.long 1,0,0,0
+.LOPENSSL_armcap_P:
+#ifdef __ILP32__
+.long OPENSSL_armcap_P-.
+#else
+.quad OPENSSL_armcap_P-.
+#endif
+.byte 67,104,97,67,104,97,50,48,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
+
+.globl ChaCha20_ctr32
+.hidden ChaCha20_ctr32
+.type ChaCha20_ctr32,%function
+.align 5
+ChaCha20_ctr32:
+ cbz x2,.Labort
+ adr x5,.LOPENSSL_armcap_P
+ cmp x2,#192
+ b.lo .Lshort
+#ifdef __ILP32__
+ ldrsw x6,[x5]
+#else
+ ldr x6,[x5]
+#endif
+ ldr w17,[x6,x5]
+ tst w17,#ARMV7_NEON
+ b.ne ChaCha20_neon
+
+.Lshort:
+ stp x29,x30,[sp,#-96]!
+ add x29,sp,#0
+
+ adr x5,.Lsigma
+ 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,#64
+
+ ldp x22,x23,[x5] // load sigma
+ ldp x24,x25,[x3] // load key
+ ldp x26,x27,[x3,#16]
+ ldp x28,x30,[x4] // load counter
+#ifdef __ARMEB__
+ ror x24,x24,#32
+ ror x25,x25,#32
+ ror x26,x26,#32
+ ror x27,x27,#32
+ ror x28,x28,#32
+ ror x30,x30,#32
+#endif
+
+.Loop_outer:
+ mov w5,w22 // unpack key block
+ lsr x6,x22,#32
+ mov w7,w23
+ lsr x8,x23,#32
+ mov w9,w24
+ lsr x10,x24,#32
+ mov w11,w25
+ lsr x12,x25,#32
+ mov w13,w26
+ lsr x14,x26,#32
+ mov w15,w27
+ lsr x16,x27,#32
+ mov w17,w28
+ lsr x19,x28,#32
+ mov w20,w30
+ lsr x21,x30,#32
+
+ mov x4,#10
+ subs x2,x2,#64
+.Loop:
+ sub x4,x4,#1
+ add w5,w5,w9
+ add w6,w6,w10
+ add w7,w7,w11
+ add w8,w8,w12
+ eor w17,w17,w5
+ eor w19,w19,w6
+ eor w20,w20,w7
+ eor w21,w21,w8
+ ror w17,w17,#16
+ ror w19,w19,#16
+ ror w20,w20,#16
+ ror w21,w21,#16
+ add w13,w13,w17
+ add w14,w14,w19
+ add w15,w15,w20
+ add w16,w16,w21
+ eor w9,w9,w13
+ eor w10,w10,w14
+ eor w11,w11,w15
+ eor w12,w12,w16
+ ror w9,w9,#20
+ ror w10,w10,#20
+ ror w11,w11,#20
+ ror w12,w12,#20
+ add w5,w5,w9
+ add w6,w6,w10
+ add w7,w7,w11
+ add w8,w8,w12
+ eor w17,w17,w5
+ eor w19,w19,w6
+ eor w20,w20,w7
+ eor w21,w21,w8
+ ror w17,w17,#24
+ ror w19,w19,#24
+ ror w20,w20,#24
+ ror w21,w21,#24
+ add w13,w13,w17
+ add w14,w14,w19
+ add w15,w15,w20
+ add w16,w16,w21
+ eor w9,w9,w13
+ eor w10,w10,w14
+ eor w11,w11,w15
+ eor w12,w12,w16
+ ror w9,w9,#25
+ ror w10,w10,#25
+ ror w11,w11,#25
+ ror w12,w12,#25
+ add w5,w5,w10
+ add w6,w6,w11
+ add w7,w7,w12
+ add w8,w8,w9
+ eor w21,w21,w5
+ eor w17,w17,w6
+ eor w19,w19,w7
+ eor w20,w20,w8
+ ror w21,w21,#16
+ ror w17,w17,#16
+ ror w19,w19,#16
+ ror w20,w20,#16
+ add w15,w15,w21
+ add w16,w16,w17
+ add w13,w13,w19
+ add w14,w14,w20
+ eor w10,w10,w15
+ eor w11,w11,w16
+ eor w12,w12,w13
+ eor w9,w9,w14
+ ror w10,w10,#20
+ ror w11,w11,#20
+ ror w12,w12,#20
+ ror w9,w9,#20
+ add w5,w5,w10
+ add w6,w6,w11
+ add w7,w7,w12
+ add w8,w8,w9
+ eor w21,w21,w5
+ eor w17,w17,w6
+ eor w19,w19,w7
+ eor w20,w20,w8
+ ror w21,w21,#24
+ ror w17,w17,#24
+ ror w19,w19,#24
+ ror w20,w20,#24
+ add w15,w15,w21
+ add w16,w16,w17
+ add w13,w13,w19
+ add w14,w14,w20
+ eor w10,w10,w15
+ eor w11,w11,w16
+ eor w12,w12,w13
+ eor w9,w9,w14
+ ror w10,w10,#25
+ ror w11,w11,#25
+ ror w12,w12,#25
+ ror w9,w9,#25
+ cbnz x4,.Loop
+
+ add w5,w5,w22 // accumulate key block
+ add x6,x6,x22,lsr#32
+ add w7,w7,w23
+ add x8,x8,x23,lsr#32
+ add w9,w9,w24
+ add x10,x10,x24,lsr#32
+ add w11,w11,w25
+ add x12,x12,x25,lsr#32
+ add w13,w13,w26
+ add x14,x14,x26,lsr#32
+ add w15,w15,w27
+ add x16,x16,x27,lsr#32
+ add w17,w17,w28
+ add x19,x19,x28,lsr#32
+ add w20,w20,w30
+ add x21,x21,x30,lsr#32
+
+ b.lo .Ltail
+
+ add x5,x5,x6,lsl#32 // pack
+ add x7,x7,x8,lsl#32
+ ldp x6,x8,[x1,#0] // load input
+ add x9,x9,x10,lsl#32
+ add x11,x11,x12,lsl#32
+ ldp x10,x12,[x1,#16]
+ add x13,x13,x14,lsl#32
+ add x15,x15,x16,lsl#32
+ ldp x14,x16,[x1,#32]
+ add x17,x17,x19,lsl#32
+ add x20,x20,x21,lsl#32
+ ldp x19,x21,[x1,#48]
+ add x1,x1,#64
+#ifdef __ARMEB__
+ rev x5,x5
+ rev x7,x7
+ rev x9,x9
+ rev x11,x11
+ rev x13,x13
+ rev x15,x15
+ rev x17,x17
+ rev x20,x20
+#endif
+ eor x5,x5,x6
+ eor x7,x7,x8
+ eor x9,x9,x10
+ eor x11,x11,x12
+ eor x13,x13,x14
+ eor x15,x15,x16
+ eor x17,x17,x19
+ eor x20,x20,x21
+
+ stp x5,x7,[x0,#0] // store output
+ add x28,x28,#1 // increment counter
+ stp x9,x11,[x0,#16]
+ stp x13,x15,[x0,#32]
+ stp x17,x20,[x0,#48]
+ add x0,x0,#64
+
+ b.hi .Loop_outer
+
+ ldp x19,x20,[x29,#16]
+ add sp,sp,#64
+ ldp x21,x22,[x29,#32]
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldp x29,x30,[sp],#96
+.Labort:
+ ret
+
+.align 4
+.Ltail:
+ add x2,x2,#64
+.Less_than_64:
+ sub x0,x0,#1
+ add x1,x1,x2
+ add x0,x0,x2
+ add x4,sp,x2
+ neg x2,x2
+
+ add x5,x5,x6,lsl#32 // pack
+ add x7,x7,x8,lsl#32
+ add x9,x9,x10,lsl#32
+ add x11,x11,x12,lsl#32
+ add x13,x13,x14,lsl#32
+ add x15,x15,x16,lsl#32
+ add x17,x17,x19,lsl#32
+ add x20,x20,x21,lsl#32
+#ifdef __ARMEB__
+ rev x5,x5
+ rev x7,x7
+ rev x9,x9
+ rev x11,x11
+ rev x13,x13
+ rev x15,x15
+ rev x17,x17
+ rev x20,x20
+#endif
+ stp x5,x7,[sp,#0]
+ stp x9,x11,[sp,#16]
+ stp x13,x15,[sp,#32]
+ stp x17,x20,[sp,#48]
+
+.Loop_tail:
+ ldrb w10,[x1,x2]
+ ldrb w11,[x4,x2]
+ add x2,x2,#1
+ eor w10,w10,w11
+ strb w10,[x0,x2]
+ cbnz x2,.Loop_tail
+
+ stp xzr,xzr,[sp,#0]
+ stp xzr,xzr,[sp,#16]
+ stp xzr,xzr,[sp,#32]
+ stp xzr,xzr,[sp,#48]
+
+ ldp x19,x20,[x29,#16]
+ add sp,sp,#64
+ ldp x21,x22,[x29,#32]
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldp x29,x30,[sp],#96
+ ret
+.size ChaCha20_ctr32,.-ChaCha20_ctr32
+
+.type ChaCha20_neon,%function
+.align 5
+ChaCha20_neon:
+ stp x29,x30,[sp,#-96]!
+ add x29,sp,#0
+
+ adr x5,.Lsigma
+ 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]
+ cmp x2,#512
+ b.hs .L512_or_more_neon
+
+ sub sp,sp,#64
+
+ ldp x22,x23,[x5] // load sigma
+ ld1 {v24.4s},[x5],#16
+ ldp x24,x25,[x3] // load key
+ ldp x26,x27,[x3,#16]
+ ld1 {v25.4s,v26.4s},[x3]
+ ldp x28,x30,[x4] // load counter
+ ld1 {v27.4s},[x4]
+ ld1 {v31.4s},[x5]
+#ifdef __ARMEB__
+ rev64 v24.4s,v24.4s
+ ror x24,x24,#32
+ ror x25,x25,#32
+ ror x26,x26,#32
+ ror x27,x27,#32
+ ror x28,x28,#32
+ ror x30,x30,#32
+#endif
+ add v27.4s,v27.4s,v31.4s // += 1
+ add v28.4s,v27.4s,v31.4s
+ add v29.4s,v28.4s,v31.4s
+ shl v31.4s,v31.4s,#2 // 1 -> 4
+
+.Loop_outer_neon:
+ mov w5,w22 // unpack key block
+ lsr x6,x22,#32
+ mov v0.16b,v24.16b
+ mov w7,w23
+ lsr x8,x23,#32
+ mov v4.16b,v24.16b
+ mov w9,w24
+ lsr x10,x24,#32
+ mov v16.16b,v24.16b
+ mov w11,w25
+ mov v1.16b,v25.16b
+ lsr x12,x25,#32
+ mov v5.16b,v25.16b
+ mov w13,w26
+ mov v17.16b,v25.16b
+ lsr x14,x26,#32
+ mov v3.16b,v27.16b
+ mov w15,w27
+ mov v7.16b,v28.16b
+ lsr x16,x27,#32
+ mov v19.16b,v29.16b
+ mov w17,w28
+ mov v2.16b,v26.16b
+ lsr x19,x28,#32
+ mov v6.16b,v26.16b
+ mov w20,w30
+ mov v18.16b,v26.16b
+ lsr x21,x30,#32
+
+ mov x4,#10
+ subs x2,x2,#256
+.Loop_neon:
+ sub x4,x4,#1
+ add v0.4s,v0.4s,v1.4s
+ add w5,w5,w9
+ add v4.4s,v4.4s,v5.4s
+ add w6,w6,w10
+ add v16.4s,v16.4s,v17.4s
+ add w7,w7,w11
+ eor v3.16b,v3.16b,v0.16b
+ add w8,w8,w12
+ eor v7.16b,v7.16b,v4.16b
+ eor w17,w17,w5
+ eor v19.16b,v19.16b,v16.16b
+ eor w19,w19,w6
+ rev32 v3.8h,v3.8h
+ eor w20,w20,w7
+ rev32 v7.8h,v7.8h
+ eor w21,w21,w8
+ rev32 v19.8h,v19.8h
+ ror w17,w17,#16
+ add v2.4s,v2.4s,v3.4s
+ ror w19,w19,#16
+ add v6.4s,v6.4s,v7.4s
+ ror w20,w20,#16
+ add v18.4s,v18.4s,v19.4s
+ ror w21,w21,#16
+ eor v20.16b,v1.16b,v2.16b
+ add w13,w13,w17
+ eor v21.16b,v5.16b,v6.16b
+ add w14,w14,w19
+ eor v22.16b,v17.16b,v18.16b
+ add w15,w15,w20
+ ushr v1.4s,v20.4s,#20
+ add w16,w16,w21
+ ushr v5.4s,v21.4s,#20
+ eor w9,w9,w13
+ ushr v17.4s,v22.4s,#20
+ eor w10,w10,w14
+ sli v1.4s,v20.4s,#12
+ eor w11,w11,w15
+ sli v5.4s,v21.4s,#12
+ eor w12,w12,w16
+ sli v17.4s,v22.4s,#12
+ ror w9,w9,#20
+ add v0.4s,v0.4s,v1.4s
+ ror w10,w10,#20
+ add v4.4s,v4.4s,v5.4s
+ ror w11,w11,#20
+ add v16.4s,v16.4s,v17.4s
+ ror w12,w12,#20
+ eor v20.16b,v3.16b,v0.16b
+ add w5,w5,w9
+ eor v21.16b,v7.16b,v4.16b
+ add w6,w6,w10
+ eor v22.16b,v19.16b,v16.16b
+ add w7,w7,w11
+ ushr v3.4s,v20.4s,#24
+ add w8,w8,w12
+ ushr v7.4s,v21.4s,#24
+ eor w17,w17,w5
+ ushr v19.4s,v22.4s,#24
+ eor w19,w19,w6
+ sli v3.4s,v20.4s,#8
+ eor w20,w20,w7
+ sli v7.4s,v21.4s,#8
+ eor w21,w21,w8
+ sli v19.4s,v22.4s,#8
+ ror w17,w17,#24
+ add v2.4s,v2.4s,v3.4s
+ ror w19,w19,#24
+ add v6.4s,v6.4s,v7.4s
+ ror w20,w20,#24
+ add v18.4s,v18.4s,v19.4s
+ ror w21,w21,#24
+ eor v20.16b,v1.16b,v2.16b
+ add w13,w13,w17
+ eor v21.16b,v5.16b,v6.16b
+ add w14,w14,w19
+ eor v22.16b,v17.16b,v18.16b
+ add w15,w15,w20
+ ushr v1.4s,v20.4s,#25
+ add w16,w16,w21
+ ushr v5.4s,v21.4s,#25
+ eor w9,w9,w13
+ ushr v17.4s,v22.4s,#25
+ eor w10,w10,w14
+ sli v1.4s,v20.4s,#7
+ eor w11,w11,w15
+ sli v5.4s,v21.4s,#7
+ eor w12,w12,w16
+ sli v17.4s,v22.4s,#7
+ ror w9,w9,#25
+ ext v2.16b,v2.16b,v2.16b,#8
+ ror w10,w10,#25
+ ext v6.16b,v6.16b,v6.16b,#8
+ ror w11,w11,#25
+ ext v18.16b,v18.16b,v18.16b,#8
+ ror w12,w12,#25
+ ext v3.16b,v3.16b,v3.16b,#12
+ ext v7.16b,v7.16b,v7.16b,#12
+ ext v19.16b,v19.16b,v19.16b,#12
+ ext v1.16b,v1.16b,v1.16b,#4
+ ext v5.16b,v5.16b,v5.16b,#4
+ ext v17.16b,v17.16b,v17.16b,#4
+ add v0.4s,v0.4s,v1.4s
+ add w5,w5,w10
+ add v4.4s,v4.4s,v5.4s
+ add w6,w6,w11
+ add v16.4s,v16.4s,v17.4s
+ add w7,w7,w12
+ eor v3.16b,v3.16b,v0.16b
+ add w8,w8,w9
+ eor v7.16b,v7.16b,v4.16b
+ eor w21,w21,w5
+ eor v19.16b,v19.16b,v16.16b
+ eor w17,w17,w6
+ rev32 v3.8h,v3.8h
+ eor w19,w19,w7
+ rev32 v7.8h,v7.8h
+ eor w20,w20,w8
+ rev32 v19.8h,v19.8h
+ ror w21,w21,#16
+ add v2.4s,v2.4s,v3.4s
+ ror w17,w17,#16
+ add v6.4s,v6.4s,v7.4s
+ ror w19,w19,#16
+ add v18.4s,v18.4s,v19.4s
+ ror w20,w20,#16
+ eor v20.16b,v1.16b,v2.16b
+ add w15,w15,w21
+ eor v21.16b,v5.16b,v6.16b
+ add w16,w16,w17
+ eor v22.16b,v17.16b,v18.16b
+ add w13,w13,w19
+ ushr v1.4s,v20.4s,#20
+ add w14,w14,w20
+ ushr v5.4s,v21.4s,#20
+ eor w10,w10,w15
+ ushr v17.4s,v22.4s,#20
+ eor w11,w11,w16
+ sli v1.4s,v20.4s,#12
+ eor w12,w12,w13
+ sli v5.4s,v21.4s,#12
+ eor w9,w9,w14
+ sli v17.4s,v22.4s,#12
+ ror w10,w10,#20
+ add v0.4s,v0.4s,v1.4s
+ ror w11,w11,#20
+ add v4.4s,v4.4s,v5.4s
+ ror w12,w12,#20
+ add v16.4s,v16.4s,v17.4s
+ ror w9,w9,#20
+ eor v20.16b,v3.16b,v0.16b
+ add w5,w5,w10
+ eor v21.16b,v7.16b,v4.16b
+ add w6,w6,w11
+ eor v22.16b,v19.16b,v16.16b
+ add w7,w7,w12
+ ushr v3.4s,v20.4s,#24
+ add w8,w8,w9
+ ushr v7.4s,v21.4s,#24
+ eor w21,w21,w5
+ ushr v19.4s,v22.4s,#24
+ eor w17,w17,w6
+ sli v3.4s,v20.4s,#8
+ eor w19,w19,w7
+ sli v7.4s,v21.4s,#8
+ eor w20,w20,w8
+ sli v19.4s,v22.4s,#8
+ ror w21,w21,#24
+ add v2.4s,v2.4s,v3.4s
+ ror w17,w17,#24
+ add v6.4s,v6.4s,v7.4s
+ ror w19,w19,#24
+ add v18.4s,v18.4s,v19.4s
+ ror w20,w20,#24
+ eor v20.16b,v1.16b,v2.16b
+ add w15,w15,w21
+ eor v21.16b,v5.16b,v6.16b
+ add w16,w16,w17
+ eor v22.16b,v17.16b,v18.16b
+ add w13,w13,w19
+ ushr v1.4s,v20.4s,#25
+ add w14,w14,w20
+ ushr v5.4s,v21.4s,#25
+ eor w10,w10,w15
+ ushr v17.4s,v22.4s,#25
+ eor w11,w11,w16
+ sli v1.4s,v20.4s,#7
+ eor w12,w12,w13
+ sli v5.4s,v21.4s,#7
+ eor w9,w9,w14
+ sli v17.4s,v22.4s,#7
+ ror w10,w10,#25
+ ext v2.16b,v2.16b,v2.16b,#8
+ ror w11,w11,#25
+ ext v6.16b,v6.16b,v6.16b,#8
+ ror w12,w12,#25
+ ext v18.16b,v18.16b,v18.16b,#8
+ ror w9,w9,#25
+ ext v3.16b,v3.16b,v3.16b,#4
+ ext v7.16b,v7.16b,v7.16b,#4
+ ext v19.16b,v19.16b,v19.16b,#4
+ ext v1.16b,v1.16b,v1.16b,#12
+ ext v5.16b,v5.16b,v5.16b,#12
+ ext v17.16b,v17.16b,v17.16b,#12
+ cbnz x4,.Loop_neon
+
+ add w5,w5,w22 // accumulate key block
+ add v0.4s,v0.4s,v24.4s
+ add x6,x6,x22,lsr#32
+ add v4.4s,v4.4s,v24.4s
+ add w7,w7,w23
+ add v16.4s,v16.4s,v24.4s
+ add x8,x8,x23,lsr#32
+ add v2.4s,v2.4s,v26.4s
+ add w9,w9,w24
+ add v6.4s,v6.4s,v26.4s
+ add x10,x10,x24,lsr#32
+ add v18.4s,v18.4s,v26.4s
+ add w11,w11,w25
+ add v3.4s,v3.4s,v27.4s
+ add x12,x12,x25,lsr#32
+ add w13,w13,w26
+ add v7.4s,v7.4s,v28.4s
+ add x14,x14,x26,lsr#32
+ add w15,w15,w27
+ add v19.4s,v19.4s,v29.4s
+ add x16,x16,x27,lsr#32
+ add w17,w17,w28
+ add v1.4s,v1.4s,v25.4s
+ add x19,x19,x28,lsr#32
+ add w20,w20,w30
+ add v5.4s,v5.4s,v25.4s
+ add x21,x21,x30,lsr#32
+ add v17.4s,v17.4s,v25.4s
+
+ b.lo .Ltail_neon
+
+ add x5,x5,x6,lsl#32 // pack
+ add x7,x7,x8,lsl#32
+ ldp x6,x8,[x1,#0] // load input
+ add x9,x9,x10,lsl#32
+ add x11,x11,x12,lsl#32
+ ldp x10,x12,[x1,#16]
+ add x13,x13,x14,lsl#32
+ add x15,x15,x16,lsl#32
+ ldp x14,x16,[x1,#32]
+ add x17,x17,x19,lsl#32
+ add x20,x20,x21,lsl#32
+ ldp x19,x21,[x1,#48]
+ add x1,x1,#64
+#ifdef __ARMEB__
+ rev x5,x5
+ rev x7,x7
+ rev x9,x9
+ rev x11,x11
+ rev x13,x13
+ rev x15,x15
+ rev x17,x17
+ rev x20,x20
+#endif
+ ld1 {v20.16b,v21.16b,v22.16b,v23.16b},[x1],#64
+ eor x5,x5,x6
+ eor x7,x7,x8
+ eor x9,x9,x10
+ eor x11,x11,x12
+ eor x13,x13,x14
+ eor v0.16b,v0.16b,v20.16b
+ eor x15,x15,x16
+ eor v1.16b,v1.16b,v21.16b
+ eor x17,x17,x19
+ eor v2.16b,v2.16b,v22.16b
+ eor x20,x20,x21
+ eor v3.16b,v3.16b,v23.16b
+ ld1 {v20.16b,v21.16b,v22.16b,v23.16b},[x1],#64
+
+ stp x5,x7,[x0,#0] // store output
+ add x28,x28,#4 // increment counter
+ stp x9,x11,[x0,#16]
+ add v27.4s,v27.4s,v31.4s // += 4
+ stp x13,x15,[x0,#32]
+ add v28.4s,v28.4s,v31.4s
+ stp x17,x20,[x0,#48]
+ add v29.4s,v29.4s,v31.4s
+ add x0,x0,#64
+
+ st1 {v0.16b,v1.16b,v2.16b,v3.16b},[x0],#64
+ ld1 {v0.16b,v1.16b,v2.16b,v3.16b},[x1],#64
+
+ eor v4.16b,v4.16b,v20.16b
+ eor v5.16b,v5.16b,v21.16b
+ eor v6.16b,v6.16b,v22.16b
+ eor v7.16b,v7.16b,v23.16b
+ st1 {v4.16b,v5.16b,v6.16b,v7.16b},[x0],#64
+
+ eor v16.16b,v16.16b,v0.16b
+ eor v17.16b,v17.16b,v1.16b
+ eor v18.16b,v18.16b,v2.16b
+ eor v19.16b,v19.16b,v3.16b
+ st1 {v16.16b,v17.16b,v18.16b,v19.16b},[x0],#64
+
+ b.hi .Loop_outer_neon
+
+ ldp x19,x20,[x29,#16]
+ add sp,sp,#64
+ ldp x21,x22,[x29,#32]
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldp x29,x30,[sp],#96
+ ret
+
+.Ltail_neon:
+ add x2,x2,#256
+ cmp x2,#64
+ b.lo .Less_than_64
+
+ add x5,x5,x6,lsl#32 // pack
+ add x7,x7,x8,lsl#32
+ ldp x6,x8,[x1,#0] // load input
+ add x9,x9,x10,lsl#32
+ add x11,x11,x12,lsl#32
+ ldp x10,x12,[x1,#16]
+ add x13,x13,x14,lsl#32
+ add x15,x15,x16,lsl#32
+ ldp x14,x16,[x1,#32]
+ add x17,x17,x19,lsl#32
+ add x20,x20,x21,lsl#32
+ ldp x19,x21,[x1,#48]
+ add x1,x1,#64
+#ifdef __ARMEB__
+ rev x5,x5
+ rev x7,x7
+ rev x9,x9
+ rev x11,x11
+ rev x13,x13
+ rev x15,x15
+ rev x17,x17
+ rev x20,x20
+#endif
+ eor x5,x5,x6
+ eor x7,x7,x8
+ eor x9,x9,x10
+ eor x11,x11,x12
+ eor x13,x13,x14
+ eor x15,x15,x16
+ eor x17,x17,x19
+ eor x20,x20,x21
+
+ stp x5,x7,[x0,#0] // store output
+ add x28,x28,#4 // increment counter
+ stp x9,x11,[x0,#16]
+ stp x13,x15,[x0,#32]
+ stp x17,x20,[x0,#48]
+ add x0,x0,#64
+ b.eq .Ldone_neon
+ sub x2,x2,#64
+ cmp x2,#64
+ b.lo .Less_than_128
+
+ ld1 {v20.16b,v21.16b,v22.16b,v23.16b},[x1],#64
+ eor v0.16b,v0.16b,v20.16b
+ eor v1.16b,v1.16b,v21.16b
+ eor v2.16b,v2.16b,v22.16b
+ eor v3.16b,v3.16b,v23.16b
+ st1 {v0.16b,v1.16b,v2.16b,v3.16b},[x0],#64
+ b.eq .Ldone_neon
+ sub x2,x2,#64
+ cmp x2,#64
+ b.lo .Less_than_192
+
+ ld1 {v20.16b,v21.16b,v22.16b,v23.16b},[x1],#64
+ eor v4.16b,v4.16b,v20.16b
+ eor v5.16b,v5.16b,v21.16b
+ eor v6.16b,v6.16b,v22.16b
+ eor v7.16b,v7.16b,v23.16b
+ st1 {v4.16b,v5.16b,v6.16b,v7.16b},[x0],#64
+ b.eq .Ldone_neon
+ sub x2,x2,#64
+
+ st1 {v16.16b,v17.16b,v18.16b,v19.16b},[sp]
+ b .Last_neon
+
+.Less_than_128:
+ st1 {v0.16b,v1.16b,v2.16b,v3.16b},[sp]
+ b .Last_neon
+.Less_than_192:
+ st1 {v4.16b,v5.16b,v6.16b,v7.16b},[sp]
+ b .Last_neon
+
+.align 4
+.Last_neon:
+ sub x0,x0,#1
+ add x1,x1,x2
+ add x0,x0,x2
+ add x4,sp,x2
+ neg x2,x2
+
+.Loop_tail_neon:
+ ldrb w10,[x1,x2]
+ ldrb w11,[x4,x2]
+ add x2,x2,#1
+ eor w10,w10,w11
+ strb w10,[x0,x2]
+ cbnz x2,.Loop_tail_neon
+
+ stp xzr,xzr,[sp,#0]
+ stp xzr,xzr,[sp,#16]
+ stp xzr,xzr,[sp,#32]
+ stp xzr,xzr,[sp,#48]
+
+.Ldone_neon:
+ ldp x19,x20,[x29,#16]
+ add sp,sp,#64
+ ldp x21,x22,[x29,#32]
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldp x29,x30,[sp],#96
+ ret
+.size ChaCha20_neon,.-ChaCha20_neon
+.type ChaCha20_512_neon,%function
+.align 5
+ChaCha20_512_neon:
+ stp x29,x30,[sp,#-96]!
+ add x29,sp,#0
+
+ adr x5,.Lsigma
+ 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]
+
+.L512_or_more_neon:
+ sub sp,sp,#128+64
+
+ ldp x22,x23,[x5] // load sigma
+ ld1 {v24.4s},[x5],#16
+ ldp x24,x25,[x3] // load key
+ ldp x26,x27,[x3,#16]
+ ld1 {v25.4s,v26.4s},[x3]
+ ldp x28,x30,[x4] // load counter
+ ld1 {v27.4s},[x4]
+ ld1 {v31.4s},[x5]
+#ifdef __ARMEB__
+ rev64 v24.4s,v24.4s
+ ror x24,x24,#32
+ ror x25,x25,#32
+ ror x26,x26,#32
+ ror x27,x27,#32
+ ror x28,x28,#32
+ ror x30,x30,#32
+#endif
+ add v27.4s,v27.4s,v31.4s // += 1
+ stp q24,q25,[sp,#0] // off-load key block, invariant part
+ add v27.4s,v27.4s,v31.4s // not typo
+ str q26,[sp,#32]
+ add v28.4s,v27.4s,v31.4s
+ add v29.4s,v28.4s,v31.4s
+ add v30.4s,v29.4s,v31.4s
+ shl v31.4s,v31.4s,#2 // 1 -> 4
+
+ stp d8,d9,[sp,#128+0] // meet ABI requirements
+ stp d10,d11,[sp,#128+16]
+ stp d12,d13,[sp,#128+32]
+ stp d14,d15,[sp,#128+48]
+
+ sub x2,x2,#512 // not typo
+
+.Loop_outer_512_neon:
+ mov v0.16b,v24.16b
+ mov v4.16b,v24.16b
+ mov v8.16b,v24.16b
+ mov v12.16b,v24.16b
+ mov v16.16b,v24.16b
+ mov v20.16b,v24.16b
+ mov v1.16b,v25.16b
+ mov w5,w22 // unpack key block
+ mov v5.16b,v25.16b
+ lsr x6,x22,#32
+ mov v9.16b,v25.16b
+ mov w7,w23
+ mov v13.16b,v25.16b
+ lsr x8,x23,#32
+ mov v17.16b,v25.16b
+ mov w9,w24
+ mov v21.16b,v25.16b
+ lsr x10,x24,#32
+ mov v3.16b,v27.16b
+ mov w11,w25
+ mov v7.16b,v28.16b
+ lsr x12,x25,#32
+ mov v11.16b,v29.16b
+ mov w13,w26
+ mov v15.16b,v30.16b
+ lsr x14,x26,#32
+ mov v2.16b,v26.16b
+ mov w15,w27
+ mov v6.16b,v26.16b
+ lsr x16,x27,#32
+ add v19.4s,v3.4s,v31.4s // +4
+ mov w17,w28
+ add v23.4s,v7.4s,v31.4s // +4
+ lsr x19,x28,#32
+ mov v10.16b,v26.16b
+ mov w20,w30
+ mov v14.16b,v26.16b
+ lsr x21,x30,#32
+ mov v18.16b,v26.16b
+ stp q27,q28,[sp,#48] // off-load key block, variable part
+ mov v22.16b,v26.16b
+ str q29,[sp,#80]
+
+ mov x4,#5
+ subs x2,x2,#512
+.Loop_upper_neon:
+ sub x4,x4,#1
+ add v0.4s,v0.4s,v1.4s
+ add w5,w5,w9
+ add v4.4s,v4.4s,v5.4s
+ add w6,w6,w10
+ add v8.4s,v8.4s,v9.4s
+ add w7,w7,w11
+ add v12.4s,v12.4s,v13.4s
+ add w8,w8,w12
+ add v16.4s,v16.4s,v17.4s
+ eor w17,w17,w5
+ add v20.4s,v20.4s,v21.4s
+ eor w19,w19,w6
+ eor v3.16b,v3.16b,v0.16b
+ eor w20,w20,w7
+ eor v7.16b,v7.16b,v4.16b
+ eor w21,w21,w8
+ eor v11.16b,v11.16b,v8.16b
+ ror w17,w17,#16
+ eor v15.16b,v15.16b,v12.16b
+ ror w19,w19,#16
+ eor v19.16b,v19.16b,v16.16b
+ ror w20,w20,#16
+ eor v23.16b,v23.16b,v20.16b
+ ror w21,w21,#16
+ rev32 v3.8h,v3.8h
+ add w13,w13,w17
+ rev32 v7.8h,v7.8h
+ add w14,w14,w19
+ rev32 v11.8h,v11.8h
+ add w15,w15,w20
+ rev32 v15.8h,v15.8h
+ add w16,w16,w21
+ rev32 v19.8h,v19.8h
+ eor w9,w9,w13
+ rev32 v23.8h,v23.8h
+ eor w10,w10,w14
+ add v2.4s,v2.4s,v3.4s
+ eor w11,w11,w15
+ add v6.4s,v6.4s,v7.4s
+ eor w12,w12,w16
+ add v10.4s,v10.4s,v11.4s
+ ror w9,w9,#20
+ add v14.4s,v14.4s,v15.4s
+ ror w10,w10,#20
+ add v18.4s,v18.4s,v19.4s
+ ror w11,w11,#20
+ add v22.4s,v22.4s,v23.4s
+ ror w12,w12,#20
+ eor v24.16b,v1.16b,v2.16b
+ add w5,w5,w9
+ eor v25.16b,v5.16b,v6.16b
+ add w6,w6,w10
+ eor v26.16b,v9.16b,v10.16b
+ add w7,w7,w11
+ eor v27.16b,v13.16b,v14.16b
+ add w8,w8,w12
+ eor v28.16b,v17.16b,v18.16b
+ eor w17,w17,w5
+ eor v29.16b,v21.16b,v22.16b
+ eor w19,w19,w6
+ ushr v1.4s,v24.4s,#20
+ eor w20,w20,w7
+ ushr v5.4s,v25.4s,#20
+ eor w21,w21,w8
+ ushr v9.4s,v26.4s,#20
+ ror w17,w17,#24
+ ushr v13.4s,v27.4s,#20
+ ror w19,w19,#24
+ ushr v17.4s,v28.4s,#20
+ ror w20,w20,#24
+ ushr v21.4s,v29.4s,#20
+ ror w21,w21,#24
+ sli v1.4s,v24.4s,#12
+ add w13,w13,w17
+ sli v5.4s,v25.4s,#12
+ add w14,w14,w19
+ sli v9.4s,v26.4s,#12
+ add w15,w15,w20
+ sli v13.4s,v27.4s,#12
+ add w16,w16,w21
+ sli v17.4s,v28.4s,#12
+ eor w9,w9,w13
+ sli v21.4s,v29.4s,#12
+ eor w10,w10,w14
+ add v0.4s,v0.4s,v1.4s
+ eor w11,w11,w15
+ add v4.4s,v4.4s,v5.4s
+ eor w12,w12,w16
+ add v8.4s,v8.4s,v9.4s
+ ror w9,w9,#25
+ add v12.4s,v12.4s,v13.4s
+ ror w10,w10,#25
+ add v16.4s,v16.4s,v17.4s
+ ror w11,w11,#25
+ add v20.4s,v20.4s,v21.4s
+ ror w12,w12,#25
+ eor v24.16b,v3.16b,v0.16b
+ add w5,w5,w10
+ eor v25.16b,v7.16b,v4.16b
+ add w6,w6,w11
+ eor v26.16b,v11.16b,v8.16b
+ add w7,w7,w12
+ eor v27.16b,v15.16b,v12.16b
+ add w8,w8,w9
+ eor v28.16b,v19.16b,v16.16b
+ eor w21,w21,w5
+ eor v29.16b,v23.16b,v20.16b
+ eor w17,w17,w6
+ ushr v3.4s,v24.4s,#24
+ eor w19,w19,w7
+ ushr v7.4s,v25.4s,#24
+ eor w20,w20,w8
+ ushr v11.4s,v26.4s,#24
+ ror w21,w21,#16
+ ushr v15.4s,v27.4s,#24
+ ror w17,w17,#16
+ ushr v19.4s,v28.4s,#24
+ ror w19,w19,#16
+ ushr v23.4s,v29.4s,#24
+ ror w20,w20,#16
+ sli v3.4s,v24.4s,#8
+ add w15,w15,w21
+ sli v7.4s,v25.4s,#8
+ add w16,w16,w17
+ sli v11.4s,v26.4s,#8
+ add w13,w13,w19
+ sli v15.4s,v27.4s,#8
+ add w14,w14,w20
+ sli v19.4s,v28.4s,#8
+ eor w10,w10,w15
+ sli v23.4s,v29.4s,#8
+ eor w11,w11,w16
+ add v2.4s,v2.4s,v3.4s
+ eor w12,w12,w13
+ add v6.4s,v6.4s,v7.4s
+ eor w9,w9,w14
+ add v10.4s,v10.4s,v11.4s
+ ror w10,w10,#20
+ add v14.4s,v14.4s,v15.4s
+ ror w11,w11,#20
+ add v18.4s,v18.4s,v19.4s
+ ror w12,w12,#20
+ add v22.4s,v22.4s,v23.4s
+ ror w9,w9,#20
+ eor v24.16b,v1.16b,v2.16b
+ add w5,w5,w10
+ eor v25.16b,v5.16b,v6.16b
+ add w6,w6,w11
+ eor v26.16b,v9.16b,v10.16b
+ add w7,w7,w12
+ eor v27.16b,v13.16b,v14.16b
+ add w8,w8,w9
+ eor v28.16b,v17.16b,v18.16b
+ eor w21,w21,w5
+ eor v29.16b,v21.16b,v22.16b
+ eor w17,w17,w6
+ ushr v1.4s,v24.4s,#25
+ eor w19,w19,w7
+ ushr v5.4s,v25.4s,#25
+ eor w20,w20,w8
+ ushr v9.4s,v26.4s,#25
+ ror w21,w21,#24
+ ushr v13.4s,v27.4s,#25
+ ror w17,w17,#24
+ ushr v17.4s,v28.4s,#25
+ ror w19,w19,#24
+ ushr v21.4s,v29.4s,#25
+ ror w20,w20,#24
+ sli v1.4s,v24.4s,#7
+ add w15,w15,w21
+ sli v5.4s,v25.4s,#7
+ add w16,w16,w17
+ sli v9.4s,v26.4s,#7
+ add w13,w13,w19
+ sli v13.4s,v27.4s,#7
+ add w14,w14,w20
+ sli v17.4s,v28.4s,#7
+ eor w10,w10,w15
+ sli v21.4s,v29.4s,#7
+ eor w11,w11,w16
+ ext v2.16b,v2.16b,v2.16b,#8
+ eor w12,w12,w13
+ ext v6.16b,v6.16b,v6.16b,#8
+ eor w9,w9,w14
+ ext v10.16b,v10.16b,v10.16b,#8
+ ror w10,w10,#25
+ ext v14.16b,v14.16b,v14.16b,#8
+ ror w11,w11,#25
+ ext v18.16b,v18.16b,v18.16b,#8
+ ror w12,w12,#25
+ ext v22.16b,v22.16b,v22.16b,#8
+ ror w9,w9,#25
+ ext v3.16b,v3.16b,v3.16b,#12
+ ext v7.16b,v7.16b,v7.16b,#12
+ ext v11.16b,v11.16b,v11.16b,#12
+ ext v15.16b,v15.16b,v15.16b,#12
+ ext v19.16b,v19.16b,v19.16b,#12
+ ext v23.16b,v23.16b,v23.16b,#12
+ ext v1.16b,v1.16b,v1.16b,#4
+ ext v5.16b,v5.16b,v5.16b,#4
+ ext v9.16b,v9.16b,v9.16b,#4
+ ext v13.16b,v13.16b,v13.16b,#4
+ ext v17.16b,v17.16b,v17.16b,#4
+ ext v21.16b,v21.16b,v21.16b,#4
+ add v0.4s,v0.4s,v1.4s
+ add w5,w5,w9
+ add v4.4s,v4.4s,v5.4s
+ add w6,w6,w10
+ add v8.4s,v8.4s,v9.4s
+ add w7,w7,w11
+ add v12.4s,v12.4s,v13.4s
+ add w8,w8,w12
+ add v16.4s,v16.4s,v17.4s
+ eor w17,w17,w5
+ add v20.4s,v20.4s,v21.4s
+ eor w19,w19,w6
+ eor v3.16b,v3.16b,v0.16b
+ eor w20,w20,w7
+ eor v7.16b,v7.16b,v4.16b
+ eor w21,w21,w8
+ eor v11.16b,v11.16b,v8.16b
+ ror w17,w17,#16
+ eor v15.16b,v15.16b,v12.16b
+ ror w19,w19,#16
+ eor v19.16b,v19.16b,v16.16b
+ ror w20,w20,#16
+ eor v23.16b,v23.16b,v20.16b
+ ror w21,w21,#16
+ rev32 v3.8h,v3.8h
+ add w13,w13,w17
+ rev32 v7.8h,v7.8h
+ add w14,w14,w19
+ rev32 v11.8h,v11.8h
+ add w15,w15,w20
+ rev32 v15.8h,v15.8h
+ add w16,w16,w21
+ rev32 v19.8h,v19.8h
+ eor w9,w9,w13
+ rev32 v23.8h,v23.8h
+ eor w10,w10,w14
+ add v2.4s,v2.4s,v3.4s
+ eor w11,w11,w15
+ add v6.4s,v6.4s,v7.4s
+ eor w12,w12,w16
+ add v10.4s,v10.4s,v11.4s
+ ror w9,w9,#20
+ add v14.4s,v14.4s,v15.4s
+ ror w10,w10,#20
+ add v18.4s,v18.4s,v19.4s
+ ror w11,w11,#20
+ add v22.4s,v22.4s,v23.4s
+ ror w12,w12,#20
+ eor v24.16b,v1.16b,v2.16b
+ add w5,w5,w9
+ eor v25.16b,v5.16b,v6.16b
+ add w6,w6,w10
+ eor v26.16b,v9.16b,v10.16b
+ add w7,w7,w11
+ eor v27.16b,v13.16b,v14.16b
+ add w8,w8,w12
+ eor v28.16b,v17.16b,v18.16b
+ eor w17,w17,w5
+ eor v29.16b,v21.16b,v22.16b
+ eor w19,w19,w6
+ ushr v1.4s,v24.4s,#20
+ eor w20,w20,w7
+ ushr v5.4s,v25.4s,#20
+ eor w21,w21,w8
+ ushr v9.4s,v26.4s,#20
+ ror w17,w17,#24
+ ushr v13.4s,v27.4s,#20
+ ror w19,w19,#24
+ ushr v17.4s,v28.4s,#20
+ ror w20,w20,#24
+ ushr v21.4s,v29.4s,#20
+ ror w21,w21,#24
+ sli v1.4s,v24.4s,#12
+ add w13,w13,w17
+ sli v5.4s,v25.4s,#12
+ add w14,w14,w19
+ sli v9.4s,v26.4s,#12
+ add w15,w15,w20
+ sli v13.4s,v27.4s,#12
+ add w16,w16,w21
+ sli v17.4s,v28.4s,#12
+ eor w9,w9,w13
+ sli v21.4s,v29.4s,#12
+ eor w10,w10,w14
+ add v0.4s,v0.4s,v1.4s
+ eor w11,w11,w15
+ add v4.4s,v4.4s,v5.4s
+ eor w12,w12,w16
+ add v8.4s,v8.4s,v9.4s
+ ror w9,w9,#25
+ add v12.4s,v12.4s,v13.4s
+ ror w10,w10,#25
+ add v16.4s,v16.4s,v17.4s
+ ror w11,w11,#25
+ add v20.4s,v20.4s,v21.4s
+ ror w12,w12,#25
+ eor v24.16b,v3.16b,v0.16b
+ add w5,w5,w10
+ eor v25.16b,v7.16b,v4.16b
+ add w6,w6,w11
+ eor v26.16b,v11.16b,v8.16b
+ add w7,w7,w12
+ eor v27.16b,v15.16b,v12.16b
+ add w8,w8,w9
+ eor v28.16b,v19.16b,v16.16b
+ eor w21,w21,w5
+ eor v29.16b,v23.16b,v20.16b
+ eor w17,w17,w6
+ ushr v3.4s,v24.4s,#24
+ eor w19,w19,w7
+ ushr v7.4s,v25.4s,#24
+ eor w20,w20,w8
+ ushr v11.4s,v26.4s,#24
+ ror w21,w21,#16
+ ushr v15.4s,v27.4s,#24
+ ror w17,w17,#16
+ ushr v19.4s,v28.4s,#24
+ ror w19,w19,#16
+ ushr v23.4s,v29.4s,#24
+ ror w20,w20,#16
+ sli v3.4s,v24.4s,#8
+ add w15,w15,w21
+ sli v7.4s,v25.4s,#8
+ add w16,w16,w17
+ sli v11.4s,v26.4s,#8
+ add w13,w13,w19
+ sli v15.4s,v27.4s,#8
+ add w14,w14,w20
+ sli v19.4s,v28.4s,#8
+ eor w10,w10,w15
+ sli v23.4s,v29.4s,#8
+ eor w11,w11,w16
+ add v2.4s,v2.4s,v3.4s
+ eor w12,w12,w13
+ add v6.4s,v6.4s,v7.4s
+ eor w9,w9,w14
+ add v10.4s,v10.4s,v11.4s
+ ror w10,w10,#20
+ add v14.4s,v14.4s,v15.4s
+ ror w11,w11,#20
+ add v18.4s,v18.4s,v19.4s
+ ror w12,w12,#20
+ add v22.4s,v22.4s,v23.4s
+ ror w9,w9,#20
+ eor v24.16b,v1.16b,v2.16b
+ add w5,w5,w10
+ eor v25.16b,v5.16b,v6.16b
+ add w6,w6,w11
+ eor v26.16b,v9.16b,v10.16b
+ add w7,w7,w12
+ eor v27.16b,v13.16b,v14.16b
+ add w8,w8,w9
+ eor v28.16b,v17.16b,v18.16b
+ eor w21,w21,w5
+ eor v29.16b,v21.16b,v22.16b
+ eor w17,w17,w6
+ ushr v1.4s,v24.4s,#25
+ eor w19,w19,w7
+ ushr v5.4s,v25.4s,#25
+ eor w20,w20,w8
+ ushr v9.4s,v26.4s,#25
+ ror w21,w21,#24
+ ushr v13.4s,v27.4s,#25
+ ror w17,w17,#24
+ ushr v17.4s,v28.4s,#25
+ ror w19,w19,#24
+ ushr v21.4s,v29.4s,#25
+ ror w20,w20,#24
+ sli v1.4s,v24.4s,#7
+ add w15,w15,w21
+ sli v5.4s,v25.4s,#7
+ add w16,w16,w17
+ sli v9.4s,v26.4s,#7
+ add w13,w13,w19
+ sli v13.4s,v27.4s,#7
+ add w14,w14,w20
+ sli v17.4s,v28.4s,#7
+ eor w10,w10,w15
+ sli v21.4s,v29.4s,#7
+ eor w11,w11,w16
+ ext v2.16b,v2.16b,v2.16b,#8
+ eor w12,w12,w13
+ ext v6.16b,v6.16b,v6.16b,#8
+ eor w9,w9,w14
+ ext v10.16b,v10.16b,v10.16b,#8
+ ror w10,w10,#25
+ ext v14.16b,v14.16b,v14.16b,#8
+ ror w11,w11,#25
+ ext v18.16b,v18.16b,v18.16b,#8
+ ror w12,w12,#25
+ ext v22.16b,v22.16b,v22.16b,#8
+ ror w9,w9,#25
+ ext v3.16b,v3.16b,v3.16b,#4
+ ext v7.16b,v7.16b,v7.16b,#4
+ ext v11.16b,v11.16b,v11.16b,#4
+ ext v15.16b,v15.16b,v15.16b,#4
+ ext v19.16b,v19.16b,v19.16b,#4
+ ext v23.16b,v23.16b,v23.16b,#4
+ ext v1.16b,v1.16b,v1.16b,#12
+ ext v5.16b,v5.16b,v5.16b,#12
+ ext v9.16b,v9.16b,v9.16b,#12
+ ext v13.16b,v13.16b,v13.16b,#12
+ ext v17.16b,v17.16b,v17.16b,#12
+ ext v21.16b,v21.16b,v21.16b,#12
+ cbnz x4,.Loop_upper_neon
+
+ add w5,w5,w22 // accumulate key block
+ add x6,x6,x22,lsr#32
+ add w7,w7,w23
+ add x8,x8,x23,lsr#32
+ add w9,w9,w24
+ add x10,x10,x24,lsr#32
+ add w11,w11,w25
+ add x12,x12,x25,lsr#32
+ add w13,w13,w26
+ add x14,x14,x26,lsr#32
+ add w15,w15,w27
+ add x16,x16,x27,lsr#32
+ add w17,w17,w28
+ add x19,x19,x28,lsr#32
+ add w20,w20,w30
+ add x21,x21,x30,lsr#32
+
+ add x5,x5,x6,lsl#32 // pack
+ add x7,x7,x8,lsl#32
+ ldp x6,x8,[x1,#0] // load input
+ add x9,x9,x10,lsl#32
+ add x11,x11,x12,lsl#32
+ ldp x10,x12,[x1,#16]
+ add x13,x13,x14,lsl#32
+ add x15,x15,x16,lsl#32
+ ldp x14,x16,[x1,#32]
+ add x17,x17,x19,lsl#32
+ add x20,x20,x21,lsl#32
+ ldp x19,x21,[x1,#48]
+ add x1,x1,#64
+#ifdef __ARMEB__
+ rev x5,x5
+ rev x7,x7
+ rev x9,x9
+ rev x11,x11
+ rev x13,x13
+ rev x15,x15
+ rev x17,x17
+ rev x20,x20
+#endif
+ eor x5,x5,x6
+ eor x7,x7,x8
+ eor x9,x9,x10
+ eor x11,x11,x12
+ eor x13,x13,x14
+ eor x15,x15,x16
+ eor x17,x17,x19
+ eor x20,x20,x21
+
+ stp x5,x7,[x0,#0] // store output
+ add x28,x28,#1 // increment counter
+ mov w5,w22 // unpack key block
+ lsr x6,x22,#32
+ stp x9,x11,[x0,#16]
+ mov w7,w23
+ lsr x8,x23,#32
+ stp x13,x15,[x0,#32]
+ mov w9,w24
+ lsr x10,x24,#32
+ stp x17,x20,[x0,#48]
+ add x0,x0,#64
+ mov w11,w25
+ lsr x12,x25,#32
+ mov w13,w26
+ lsr x14,x26,#32
+ mov w15,w27
+ lsr x16,x27,#32
+ mov w17,w28
+ lsr x19,x28,#32
+ mov w20,w30
+ lsr x21,x30,#32
+
+ mov x4,#5
+.Loop_lower_neon:
+ sub x4,x4,#1
+ add v0.4s,v0.4s,v1.4s
+ add w5,w5,w9
+ add v4.4s,v4.4s,v5.4s
+ add w6,w6,w10
+ add v8.4s,v8.4s,v9.4s
+ add w7,w7,w11
+ add v12.4s,v12.4s,v13.4s
+ add w8,w8,w12
+ add v16.4s,v16.4s,v17.4s
+ eor w17,w17,w5
+ add v20.4s,v20.4s,v21.4s
+ eor w19,w19,w6
+ eor v3.16b,v3.16b,v0.16b
+ eor w20,w20,w7
+ eor v7.16b,v7.16b,v4.16b
+ eor w21,w21,w8
+ eor v11.16b,v11.16b,v8.16b
+ ror w17,w17,#16
+ eor v15.16b,v15.16b,v12.16b
+ ror w19,w19,#16
+ eor v19.16b,v19.16b,v16.16b
+ ror w20,w20,#16
+ eor v23.16b,v23.16b,v20.16b
+ ror w21,w21,#16
+ rev32 v3.8h,v3.8h
+ add w13,w13,w17
+ rev32 v7.8h,v7.8h
+ add w14,w14,w19
+ rev32 v11.8h,v11.8h
+ add w15,w15,w20
+ rev32 v15.8h,v15.8h
+ add w16,w16,w21
+ rev32 v19.8h,v19.8h
+ eor w9,w9,w13
+ rev32 v23.8h,v23.8h
+ eor w10,w10,w14
+ add v2.4s,v2.4s,v3.4s
+ eor w11,w11,w15
+ add v6.4s,v6.4s,v7.4s
+ eor w12,w12,w16
+ add v10.4s,v10.4s,v11.4s
+ ror w9,w9,#20
+ add v14.4s,v14.4s,v15.4s
+ ror w10,w10,#20
+ add v18.4s,v18.4s,v19.4s
+ ror w11,w11,#20
+ add v22.4s,v22.4s,v23.4s
+ ror w12,w12,#20
+ eor v24.16b,v1.16b,v2.16b
+ add w5,w5,w9
+ eor v25.16b,v5.16b,v6.16b
+ add w6,w6,w10
+ eor v26.16b,v9.16b,v10.16b
+ add w7,w7,w11
+ eor v27.16b,v13.16b,v14.16b
+ add w8,w8,w12
+ eor v28.16b,v17.16b,v18.16b
+ eor w17,w17,w5
+ eor v29.16b,v21.16b,v22.16b
+ eor w19,w19,w6
+ ushr v1.4s,v24.4s,#20
+ eor w20,w20,w7
+ ushr v5.4s,v25.4s,#20
+ eor w21,w21,w8
+ ushr v9.4s,v26.4s,#20
+ ror w17,w17,#24
+ ushr v13.4s,v27.4s,#20
+ ror w19,w19,#24
+ ushr v17.4s,v28.4s,#20
+ ror w20,w20,#24
+ ushr v21.4s,v29.4s,#20
+ ror w21,w21,#24
+ sli v1.4s,v24.4s,#12
+ add w13,w13,w17
+ sli v5.4s,v25.4s,#12
+ add w14,w14,w19
+ sli v9.4s,v26.4s,#12
+ add w15,w15,w20
+ sli v13.4s,v27.4s,#12
+ add w16,w16,w21
+ sli v17.4s,v28.4s,#12
+ eor w9,w9,w13
+ sli v21.4s,v29.4s,#12
+ eor w10,w10,w14
+ add v0.4s,v0.4s,v1.4s
+ eor w11,w11,w15
+ add v4.4s,v4.4s,v5.4s
+ eor w12,w12,w16
+ add v8.4s,v8.4s,v9.4s
+ ror w9,w9,#25
+ add v12.4s,v12.4s,v13.4s
+ ror w10,w10,#25
+ add v16.4s,v16.4s,v17.4s
+ ror w11,w11,#25
+ add v20.4s,v20.4s,v21.4s
+ ror w12,w12,#25
+ eor v24.16b,v3.16b,v0.16b
+ add w5,w5,w10
+ eor v25.16b,v7.16b,v4.16b
+ add w6,w6,w11
+ eor v26.16b,v11.16b,v8.16b
+ add w7,w7,w12
+ eor v27.16b,v15.16b,v12.16b
+ add w8,w8,w9
+ eor v28.16b,v19.16b,v16.16b
+ eor w21,w21,w5
+ eor v29.16b,v23.16b,v20.16b
+ eor w17,w17,w6
+ ushr v3.4s,v24.4s,#24
+ eor w19,w19,w7
+ ushr v7.4s,v25.4s,#24
+ eor w20,w20,w8
+ ushr v11.4s,v26.4s,#24
+ ror w21,w21,#16
+ ushr v15.4s,v27.4s,#24
+ ror w17,w17,#16
+ ushr v19.4s,v28.4s,#24
+ ror w19,w19,#16
+ ushr v23.4s,v29.4s,#24
+ ror w20,w20,#16
+ sli v3.4s,v24.4s,#8
+ add w15,w15,w21
+ sli v7.4s,v25.4s,#8
+ add w16,w16,w17
+ sli v11.4s,v26.4s,#8
+ add w13,w13,w19
+ sli v15.4s,v27.4s,#8
+ add w14,w14,w20
+ sli v19.4s,v28.4s,#8
+ eor w10,w10,w15
+ sli v23.4s,v29.4s,#8
+ eor w11,w11,w16
+ add v2.4s,v2.4s,v3.4s
+ eor w12,w12,w13
+ add v6.4s,v6.4s,v7.4s
+ eor w9,w9,w14
+ add v10.4s,v10.4s,v11.4s
+ ror w10,w10,#20
+ add v14.4s,v14.4s,v15.4s
+ ror w11,w11,#20
+ add v18.4s,v18.4s,v19.4s
+ ror w12,w12,#20
+ add v22.4s,v22.4s,v23.4s
+ ror w9,w9,#20
+ eor v24.16b,v1.16b,v2.16b
+ add w5,w5,w10
+ eor v25.16b,v5.16b,v6.16b
+ add w6,w6,w11
+ eor v26.16b,v9.16b,v10.16b
+ add w7,w7,w12
+ eor v27.16b,v13.16b,v14.16b
+ add w8,w8,w9
+ eor v28.16b,v17.16b,v18.16b
+ eor w21,w21,w5
+ eor v29.16b,v21.16b,v22.16b
+ eor w17,w17,w6
+ ushr v1.4s,v24.4s,#25
+ eor w19,w19,w7
+ ushr v5.4s,v25.4s,#25
+ eor w20,w20,w8
+ ushr v9.4s,v26.4s,#25
+ ror w21,w21,#24
+ ushr v13.4s,v27.4s,#25
+ ror w17,w17,#24
+ ushr v17.4s,v28.4s,#25
+ ror w19,w19,#24
+ ushr v21.4s,v29.4s,#25
+ ror w20,w20,#24
+ sli v1.4s,v24.4s,#7
+ add w15,w15,w21
+ sli v5.4s,v25.4s,#7
+ add w16,w16,w17
+ sli v9.4s,v26.4s,#7
+ add w13,w13,w19
+ sli v13.4s,v27.4s,#7
+ add w14,w14,w20
+ sli v17.4s,v28.4s,#7
+ eor w10,w10,w15
+ sli v21.4s,v29.4s,#7
+ eor w11,w11,w16
+ ext v2.16b,v2.16b,v2.16b,#8
+ eor w12,w12,w13
+ ext v6.16b,v6.16b,v6.16b,#8
+ eor w9,w9,w14
+ ext v10.16b,v10.16b,v10.16b,#8
+ ror w10,w10,#25
+ ext v14.16b,v14.16b,v14.16b,#8
+ ror w11,w11,#25
+ ext v18.16b,v18.16b,v18.16b,#8
+ ror w12,w12,#25
+ ext v22.16b,v22.16b,v22.16b,#8
+ ror w9,w9,#25
+ ext v3.16b,v3.16b,v3.16b,#12
+ ext v7.16b,v7.16b,v7.16b,#12
+ ext v11.16b,v11.16b,v11.16b,#12
+ ext v15.16b,v15.16b,v15.16b,#12
+ ext v19.16b,v19.16b,v19.16b,#12
+ ext v23.16b,v23.16b,v23.16b,#12
+ ext v1.16b,v1.16b,v1.16b,#4
+ ext v5.16b,v5.16b,v5.16b,#4
+ ext v9.16b,v9.16b,v9.16b,#4
+ ext v13.16b,v13.16b,v13.16b,#4
+ ext v17.16b,v17.16b,v17.16b,#4
+ ext v21.16b,v21.16b,v21.16b,#4
+ add v0.4s,v0.4s,v1.4s
+ add w5,w5,w9
+ add v4.4s,v4.4s,v5.4s
+ add w6,w6,w10
+ add v8.4s,v8.4s,v9.4s
+ add w7,w7,w11
+ add v12.4s,v12.4s,v13.4s
+ add w8,w8,w12
+ add v16.4s,v16.4s,v17.4s
+ eor w17,w17,w5
+ add v20.4s,v20.4s,v21.4s
+ eor w19,w19,w6
+ eor v3.16b,v3.16b,v0.16b
+ eor w20,w20,w7
+ eor v7.16b,v7.16b,v4.16b
+ eor w21,w21,w8
+ eor v11.16b,v11.16b,v8.16b
+ ror w17,w17,#16
+ eor v15.16b,v15.16b,v12.16b
+ ror w19,w19,#16
+ eor v19.16b,v19.16b,v16.16b
+ ror w20,w20,#16
+ eor v23.16b,v23.16b,v20.16b
+ ror w21,w21,#16
+ rev32 v3.8h,v3.8h
+ add w13,w13,w17
+ rev32 v7.8h,v7.8h
+ add w14,w14,w19
+ rev32 v11.8h,v11.8h
+ add w15,w15,w20
+ rev32 v15.8h,v15.8h
+ add w16,w16,w21
+ rev32 v19.8h,v19.8h
+ eor w9,w9,w13
+ rev32 v23.8h,v23.8h
+ eor w10,w10,w14
+ add v2.4s,v2.4s,v3.4s
+ eor w11,w11,w15
+ add v6.4s,v6.4s,v7.4s
+ eor w12,w12,w16
+ add v10.4s,v10.4s,v11.4s
+ ror w9,w9,#20
+ add v14.4s,v14.4s,v15.4s
+ ror w10,w10,#20
+ add v18.4s,v18.4s,v19.4s
+ ror w11,w11,#20
+ add v22.4s,v22.4s,v23.4s
+ ror w12,w12,#20
+ eor v24.16b,v1.16b,v2.16b
+ add w5,w5,w9
+ eor v25.16b,v5.16b,v6.16b
+ add w6,w6,w10
+ eor v26.16b,v9.16b,v10.16b
+ add w7,w7,w11
+ eor v27.16b,v13.16b,v14.16b
+ add w8,w8,w12
+ eor v28.16b,v17.16b,v18.16b
+ eor w17,w17,w5
+ eor v29.16b,v21.16b,v22.16b
+ eor w19,w19,w6
+ ushr v1.4s,v24.4s,#20
+ eor w20,w20,w7
+ ushr v5.4s,v25.4s,#20
+ eor w21,w21,w8
+ ushr v9.4s,v26.4s,#20
+ ror w17,w17,#24
+ ushr v13.4s,v27.4s,#20
+ ror w19,w19,#24
+ ushr v17.4s,v28.4s,#20
+ ror w20,w20,#24
+ ushr v21.4s,v29.4s,#20
+ ror w21,w21,#24
+ sli v1.4s,v24.4s,#12
+ add w13,w13,w17
+ sli v5.4s,v25.4s,#12
+ add w14,w14,w19
+ sli v9.4s,v26.4s,#12
+ add w15,w15,w20
+ sli v13.4s,v27.4s,#12
+ add w16,w16,w21
+ sli v17.4s,v28.4s,#12
+ eor w9,w9,w13
+ sli v21.4s,v29.4s,#12
+ eor w10,w10,w14
+ add v0.4s,v0.4s,v1.4s
+ eor w11,w11,w15
+ add v4.4s,v4.4s,v5.4s
+ eor w12,w12,w16
+ add v8.4s,v8.4s,v9.4s
+ ror w9,w9,#25
+ add v12.4s,v12.4s,v13.4s
+ ror w10,w10,#25
+ add v16.4s,v16.4s,v17.4s
+ ror w11,w11,#25
+ add v20.4s,v20.4s,v21.4s
+ ror w12,w12,#25
+ eor v24.16b,v3.16b,v0.16b
+ add w5,w5,w10
+ eor v25.16b,v7.16b,v4.16b
+ add w6,w6,w11
+ eor v26.16b,v11.16b,v8.16b
+ add w7,w7,w12
+ eor v27.16b,v15.16b,v12.16b
+ add w8,w8,w9
+ eor v28.16b,v19.16b,v16.16b
+ eor w21,w21,w5
+ eor v29.16b,v23.16b,v20.16b
+ eor w17,w17,w6
+ ushr v3.4s,v24.4s,#24
+ eor w19,w19,w7
+ ushr v7.4s,v25.4s,#24
+ eor w20,w20,w8
+ ushr v11.4s,v26.4s,#24
+ ror w21,w21,#16
+ ushr v15.4s,v27.4s,#24
+ ror w17,w17,#16
+ ushr v19.4s,v28.4s,#24
+ ror w19,w19,#16
+ ushr v23.4s,v29.4s,#24
+ ror w20,w20,#16
+ sli v3.4s,v24.4s,#8
+ add w15,w15,w21
+ sli v7.4s,v25.4s,#8
+ add w16,w16,w17
+ sli v11.4s,v26.4s,#8
+ add w13,w13,w19
+ sli v15.4s,v27.4s,#8
+ add w14,w14,w20
+ sli v19.4s,v28.4s,#8
+ eor w10,w10,w15
+ sli v23.4s,v29.4s,#8
+ eor w11,w11,w16
+ add v2.4s,v2.4s,v3.4s
+ eor w12,w12,w13
+ add v6.4s,v6.4s,v7.4s
+ eor w9,w9,w14
+ add v10.4s,v10.4s,v11.4s
+ ror w10,w10,#20
+ add v14.4s,v14.4s,v15.4s
+ ror w11,w11,#20
+ add v18.4s,v18.4s,v19.4s
+ ror w12,w12,#20
+ add v22.4s,v22.4s,v23.4s
+ ror w9,w9,#20
+ eor v24.16b,v1.16b,v2.16b
+ add w5,w5,w10
+ eor v25.16b,v5.16b,v6.16b
+ add w6,w6,w11
+ eor v26.16b,v9.16b,v10.16b
+ add w7,w7,w12
+ eor v27.16b,v13.16b,v14.16b
+ add w8,w8,w9
+ eor v28.16b,v17.16b,v18.16b
+ eor w21,w21,w5
+ eor v29.16b,v21.16b,v22.16b
+ eor w17,w17,w6
+ ushr v1.4s,v24.4s,#25
+ eor w19,w19,w7
+ ushr v5.4s,v25.4s,#25
+ eor w20,w20,w8
+ ushr v9.4s,v26.4s,#25
+ ror w21,w21,#24
+ ushr v13.4s,v27.4s,#25
+ ror w17,w17,#24
+ ushr v17.4s,v28.4s,#25
+ ror w19,w19,#24
+ ushr v21.4s,v29.4s,#25
+ ror w20,w20,#24
+ sli v1.4s,v24.4s,#7
+ add w15,w15,w21
+ sli v5.4s,v25.4s,#7
+ add w16,w16,w17
+ sli v9.4s,v26.4s,#7
+ add w13,w13,w19
+ sli v13.4s,v27.4s,#7
+ add w14,w14,w20
+ sli v17.4s,v28.4s,#7
+ eor w10,w10,w15
+ sli v21.4s,v29.4s,#7
+ eor w11,w11,w16
+ ext v2.16b,v2.16b,v2.16b,#8
+ eor w12,w12,w13
+ ext v6.16b,v6.16b,v6.16b,#8
+ eor w9,w9,w14
+ ext v10.16b,v10.16b,v10.16b,#8
+ ror w10,w10,#25
+ ext v14.16b,v14.16b,v14.16b,#8
+ ror w11,w11,#25
+ ext v18.16b,v18.16b,v18.16b,#8
+ ror w12,w12,#25
+ ext v22.16b,v22.16b,v22.16b,#8
+ ror w9,w9,#25
+ ext v3.16b,v3.16b,v3.16b,#4
+ ext v7.16b,v7.16b,v7.16b,#4
+ ext v11.16b,v11.16b,v11.16b,#4
+ ext v15.16b,v15.16b,v15.16b,#4
+ ext v19.16b,v19.16b,v19.16b,#4
+ ext v23.16b,v23.16b,v23.16b,#4
+ ext v1.16b,v1.16b,v1.16b,#12
+ ext v5.16b,v5.16b,v5.16b,#12
+ ext v9.16b,v9.16b,v9.16b,#12
+ ext v13.16b,v13.16b,v13.16b,#12
+ ext v17.16b,v17.16b,v17.16b,#12
+ ext v21.16b,v21.16b,v21.16b,#12
+ cbnz x4,.Loop_lower_neon
+
+ add w5,w5,w22 // accumulate key block
+ ldp q24,q25,[sp,#0]
+ add x6,x6,x22,lsr#32
+ ldp q26,q27,[sp,#32]
+ add w7,w7,w23
+ ldp q28,q29,[sp,#64]
+ add x8,x8,x23,lsr#32
+ add v0.4s,v0.4s,v24.4s
+ add w9,w9,w24
+ add v4.4s,v4.4s,v24.4s
+ add x10,x10,x24,lsr#32
+ add v8.4s,v8.4s,v24.4s
+ add w11,w11,w25
+ add v12.4s,v12.4s,v24.4s
+ add x12,x12,x25,lsr#32
+ add v16.4s,v16.4s,v24.4s
+ add w13,w13,w26
+ add v20.4s,v20.4s,v24.4s
+ add x14,x14,x26,lsr#32
+ add v2.4s,v2.4s,v26.4s
+ add w15,w15,w27
+ add v6.4s,v6.4s,v26.4s
+ add x16,x16,x27,lsr#32
+ add v10.4s,v10.4s,v26.4s
+ add w17,w17,w28
+ add v14.4s,v14.4s,v26.4s
+ add x19,x19,x28,lsr#32
+ add v18.4s,v18.4s,v26.4s
+ add w20,w20,w30
+ add v22.4s,v22.4s,v26.4s
+ add x21,x21,x30,lsr#32
+ add v19.4s,v19.4s,v31.4s // +4
+ add x5,x5,x6,lsl#32 // pack
+ add v23.4s,v23.4s,v31.4s // +4
+ add x7,x7,x8,lsl#32
+ add v3.4s,v3.4s,v27.4s
+ ldp x6,x8,[x1,#0] // load input
+ add v7.4s,v7.4s,v28.4s
+ add x9,x9,x10,lsl#32
+ add v11.4s,v11.4s,v29.4s
+ add x11,x11,x12,lsl#32
+ add v15.4s,v15.4s,v30.4s
+ ldp x10,x12,[x1,#16]
+ add v19.4s,v19.4s,v27.4s
+ add x13,x13,x14,lsl#32
+ add v23.4s,v23.4s,v28.4s
+ add x15,x15,x16,lsl#32
+ add v1.4s,v1.4s,v25.4s
+ ldp x14,x16,[x1,#32]
+ add v5.4s,v5.4s,v25.4s
+ add x17,x17,x19,lsl#32
+ add v9.4s,v9.4s,v25.4s
+ add x20,x20,x21,lsl#32
+ add v13.4s,v13.4s,v25.4s
+ ldp x19,x21,[x1,#48]
+ add v17.4s,v17.4s,v25.4s
+ add x1,x1,#64
+ add v21.4s,v21.4s,v25.4s
+
+#ifdef __ARMEB__
+ rev x5,x5
+ rev x7,x7
+ rev x9,x9
+ rev x11,x11
+ rev x13,x13
+ rev x15,x15
+ rev x17,x17
+ rev x20,x20
+#endif
+ ld1 {v24.16b,v25.16b,v26.16b,v27.16b},[x1],#64
+ eor x5,x5,x6
+ eor x7,x7,x8
+ eor x9,x9,x10
+ eor x11,x11,x12
+ eor x13,x13,x14
+ eor v0.16b,v0.16b,v24.16b
+ eor x15,x15,x16
+ eor v1.16b,v1.16b,v25.16b
+ eor x17,x17,x19
+ eor v2.16b,v2.16b,v26.16b
+ eor x20,x20,x21
+ eor v3.16b,v3.16b,v27.16b
+ ld1 {v24.16b,v25.16b,v26.16b,v27.16b},[x1],#64
+
+ stp x5,x7,[x0,#0] // store output
+ add x28,x28,#7 // increment counter
+ stp x9,x11,[x0,#16]
+ stp x13,x15,[x0,#32]
+ stp x17,x20,[x0,#48]
+ add x0,x0,#64
+ st1 {v0.16b,v1.16b,v2.16b,v3.16b},[x0],#64
+
+ ld1 {v0.16b,v1.16b,v2.16b,v3.16b},[x1],#64
+ eor v4.16b,v4.16b,v24.16b
+ eor v5.16b,v5.16b,v25.16b
+ eor v6.16b,v6.16b,v26.16b
+ eor v7.16b,v7.16b,v27.16b
+ st1 {v4.16b,v5.16b,v6.16b,v7.16b},[x0],#64
+
+ ld1 {v4.16b,v5.16b,v6.16b,v7.16b},[x1],#64
+ eor v8.16b,v8.16b,v0.16b
+ ldp q24,q25,[sp,#0]
+ eor v9.16b,v9.16b,v1.16b
+ ldp q26,q27,[sp,#32]
+ eor v10.16b,v10.16b,v2.16b
+ eor v11.16b,v11.16b,v3.16b
+ st1 {v8.16b,v9.16b,v10.16b,v11.16b},[x0],#64
+
+ ld1 {v8.16b,v9.16b,v10.16b,v11.16b},[x1],#64
+ eor v12.16b,v12.16b,v4.16b
+ eor v13.16b,v13.16b,v5.16b
+ eor v14.16b,v14.16b,v6.16b
+ eor v15.16b,v15.16b,v7.16b
+ st1 {v12.16b,v13.16b,v14.16b,v15.16b},[x0],#64
+
+ ld1 {v12.16b,v13.16b,v14.16b,v15.16b},[x1],#64
+ eor v16.16b,v16.16b,v8.16b
+ eor v17.16b,v17.16b,v9.16b
+ eor v18.16b,v18.16b,v10.16b
+ eor v19.16b,v19.16b,v11.16b
+ st1 {v16.16b,v17.16b,v18.16b,v19.16b},[x0],#64
+
+ shl v0.4s,v31.4s,#1 // 4 -> 8
+ eor v20.16b,v20.16b,v12.16b
+ eor v21.16b,v21.16b,v13.16b
+ eor v22.16b,v22.16b,v14.16b
+ eor v23.16b,v23.16b,v15.16b
+ st1 {v20.16b,v21.16b,v22.16b,v23.16b},[x0],#64
+
+ add v27.4s,v27.4s,v0.4s // += 8
+ add v28.4s,v28.4s,v0.4s
+ add v29.4s,v29.4s,v0.4s
+ add v30.4s,v30.4s,v0.4s
+
+ b.hs .Loop_outer_512_neon
+
+ adds x2,x2,#512
+ ushr v0.4s,v31.4s,#2 // 4 -> 1
+
+ ldp d8,d9,[sp,#128+0] // meet ABI requirements
+ ldp d10,d11,[sp,#128+16]
+ ldp d12,d13,[sp,#128+32]
+ ldp d14,d15,[sp,#128+48]
+
+ stp q24,q31,[sp,#0] // wipe off-load area
+ stp q24,q31,[sp,#32]
+ stp q24,q31,[sp,#64]
+
+ b.eq .Ldone_512_neon
+
+ cmp x2,#192
+ sub v27.4s,v27.4s,v0.4s // -= 1
+ sub v28.4s,v28.4s,v0.4s
+ sub v29.4s,v29.4s,v0.4s
+ add sp,sp,#128
+ b.hs .Loop_outer_neon
+
+ eor v25.16b,v25.16b,v25.16b
+ eor v26.16b,v26.16b,v26.16b
+ eor v27.16b,v27.16b,v27.16b
+ eor v28.16b,v28.16b,v28.16b
+ eor v29.16b,v29.16b,v29.16b
+ eor v30.16b,v30.16b,v30.16b
+ b .Loop_outer
+
+.Ldone_512_neon:
+ ldp x19,x20,[x29,#16]
+ add sp,sp,#128+64
+ ldp x21,x22,[x29,#32]
+ ldp x23,x24,[x29,#48]
+ ldp x25,x26,[x29,#64]
+ ldp x27,x28,[x29,#80]
+ ldp x29,x30,[sp],#96
+ ret
+.size ChaCha20_512_neon,.-ChaCha20_512_neon
+#endif
diff --git a/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S b/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S
index a0a9b680..f39f3ba 100644
--- a/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S
+++ b/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S
@@ -1,11 +1,12 @@
#if defined(__aarch64__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
.text
#if !defined(__clang__)
.arch armv8-a+crypto
#endif
.globl gcm_init_v8
+.hidden gcm_init_v8
.type gcm_init_v8,%function
.align 4
gcm_init_v8:
@@ -56,6 +57,7 @@
ret
.size gcm_init_v8,.-gcm_init_v8
.globl gcm_gmult_v8
+.hidden gcm_gmult_v8
.type gcm_gmult_v8,%function
.align 4
gcm_gmult_v8:
@@ -68,10 +70,10 @@
#endif
ext v3.16b,v17.16b,v17.16b,#8
- pmull v0.1q,v20.1d,v3.1d //H.lo·Xi.lo
+ 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)
+ 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
@@ -97,6 +99,7 @@
ret
.size gcm_gmult_v8,.-gcm_gmult_v8
.globl gcm_ghash_v8
+.hidden gcm_ghash_v8
.type gcm_ghash_v8,%function
.align 4
gcm_ghash_v8:
@@ -135,7 +138,7 @@
#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
+ 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
@@ -144,14 +147,14 @@
.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
+ 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
+ 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)
+ 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
@@ -176,7 +179,7 @@
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
+ 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
@@ -197,10 +200,10 @@
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
+ 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)
+ 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
@@ -229,4 +232,4 @@
.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
+#endif
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S
index 487a497..cfb4aa02 100644
--- a/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S
@@ -1,10 +1,11 @@
#if defined(__aarch64__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
.text
.globl sha1_block_data_order
+.hidden sha1_block_data_order
.type sha1_block_data_order,%function
.align 6
sha1_block_data_order:
@@ -1212,4 +1213,4 @@
.align 2
.align 2
.comm OPENSSL_armcap_P,4,4
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S
index 4834553..bfc552c 100644
--- a/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S
@@ -1,10 +1,11 @@
#if defined(__aarch64__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
.text
.globl sha256_block_data_order
+.hidden sha256_block_data_order
.type sha256_block_data_order,%function
.align 6
sha256_block_data_order:
@@ -1142,4 +1143,4 @@
ret
.size sha256_block_armv8,.-sha256_block_armv8
.comm OPENSSL_armcap_P,4,4
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S
index 654c473..4645722 100644
--- a/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S
@@ -1,10 +1,11 @@
#if defined(__aarch64__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
.text
.globl sha512_block_data_order
+.hidden sha512_block_data_order
.type sha512_block_data_order,%function
.align 6
sha512_block_data_order:
@@ -1022,4 +1023,4 @@
.align 2
.align 2
.comm OPENSSL_armcap_P,4,4
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S b/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S
index cb94841..bc11e3f 100644
--- a/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S
@@ -34,7 +34,7 @@
#if defined(__arm__)
#ifndef __KERNEL__
-# include "arm_arch.h"
+# include <openssl/arm_arch.h>
#else
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
#endif
@@ -1197,4 +1197,4 @@
.align 2
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S b/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S
index 6f0ee7d..95a2ea4 100644
--- a/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S
+++ b/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S
@@ -1,5 +1,5 @@
#if defined(__arm__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
#if __ARM_MAX_ARCH__>=7
.text
@@ -13,6 +13,7 @@
.long 0x1b,0x1b,0x1b,0x1b
.globl aes_v8_set_encrypt_key
+.hidden aes_v8_set_encrypt_key
.type aes_v8_set_encrypt_key,%function
.align 5
aes_v8_set_encrypt_key:
@@ -183,6 +184,7 @@
.size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key
.globl aes_v8_set_decrypt_key
+.hidden aes_v8_set_decrypt_key
.type aes_v8_set_decrypt_key,%function
.align 5
aes_v8_set_decrypt_key:
@@ -220,6 +222,7 @@
ldmia sp!,{r4,pc}
.size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key
.globl aes_v8_encrypt
+.hidden aes_v8_encrypt
.type aes_v8_encrypt,%function
.align 5
aes_v8_encrypt:
@@ -249,6 +252,7 @@
bx lr
.size aes_v8_encrypt,.-aes_v8_encrypt
.globl aes_v8_decrypt
+.hidden aes_v8_decrypt
.type aes_v8_decrypt,%function
.align 5
aes_v8_decrypt:
@@ -278,6 +282,7 @@
bx lr
.size aes_v8_decrypt,.-aes_v8_decrypt
.globl aes_v8_cbc_encrypt
+.hidden aes_v8_cbc_encrypt
.type aes_v8_cbc_encrypt,%function
.align 5
aes_v8_cbc_encrypt:
@@ -570,6 +575,7 @@
ldmia sp!,{r4,r5,r6,r7,r8,pc}
.size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt
.globl aes_v8_ctr32_encrypt_blocks
+.hidden aes_v8_ctr32_encrypt_blocks
.type aes_v8_ctr32_encrypt_blocks,%function
.align 5
aes_v8_ctr32_encrypt_blocks:
@@ -753,4 +759,4 @@
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
+#endif
diff --git a/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S b/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S
index dd84f35..abb414d 100644
--- a/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S
+++ b/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S
@@ -47,9 +47,8 @@
@
@ <ard.biesheuvel@linaro.org>
-#if defined(__arm__)
#ifndef __KERNEL__
-# include "arm_arch.h"
+# include <openssl/arm_arch.h>
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
# define VFP_ABI_POP vldmia sp!,{d8-d15}
@@ -2576,4 +2575,3 @@
.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
index 68dfb2c..e59599f 100644
--- a/third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S
+++ b/third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S
@@ -1,5 +1,5 @@
#if defined(__arm__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
.text
.code 32
@@ -28,7 +28,7 @@
#ifdef __APPLE__
ldr r0,[r0]
#endif
- tst r0,#1 @ NEON available?
+ tst r0,#ARMV7_NEON @ NEON available?
ldmia sp, {r0,r2}
beq .Lialu
add sp,sp,#8
@@ -586,4 +586,4 @@
.comm OPENSSL_armcap_P,4,4
.hidden OPENSSL_armcap_P
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4.S b/third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4.S
new file mode 100644
index 0000000..19a4d2c
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4.S
@@ -0,0 +1,1471 @@
+#if defined(__arm__)
+#include <openssl/arm_arch.h>
+
+.text
+#if defined(__thumb2__)
+.syntax unified
+.thumb
+#else
+.code 32
+#endif
+
+#if defined(__thumb2__) || defined(__clang__)
+#define ldrhsb ldrbhs
+#endif
+
+.align 5
+.Lsigma:
+.long 0x61707865,0x3320646e,0x79622d32,0x6b206574 @ endian-neutral
+.Lone:
+.long 1,0,0,0
+#if __ARM_MAX_ARCH__>=7
+.LOPENSSL_armcap:
+.word OPENSSL_armcap_P-.LChaCha20_ctr32
+#else
+.word -1
+#endif
+
+.globl ChaCha20_ctr32
+.hidden ChaCha20_ctr32
+.type ChaCha20_ctr32,%function
+.align 5
+ChaCha20_ctr32:
+.LChaCha20_ctr32:
+ ldr r12,[sp,#0] @ pull pointer to counter and nonce
+ stmdb sp!,{r0,r1,r2,r4-r11,lr}
+#if __ARM_ARCH__<7 && !defined(__thumb2__)
+ sub r14,pc,#16 @ ChaCha20_ctr32
+#else
+ adr r14,.LChaCha20_ctr32
+#endif
+ cmp r2,#0 @ len==0?
+#ifdef __thumb2__
+ itt eq
+#endif
+ addeq sp,sp,#4*3
+ beq .Lno_data
+#if __ARM_MAX_ARCH__>=7
+ cmp r2,#192 @ test len
+ bls .Lshort
+ ldr r4,[r14,#-32]
+ ldr r4,[r14,r4]
+# ifdef __APPLE__
+ ldr r4,[r4]
+# endif
+ tst r4,#ARMV7_NEON
+ bne .LChaCha20_neon
+.Lshort:
+#endif
+ ldmia r12,{r4,r5,r6,r7} @ load counter and nonce
+ sub sp,sp,#4*(16) @ off-load area
+ sub r14,r14,#64 @ .Lsigma
+ stmdb sp!,{r4,r5,r6,r7} @ copy counter and nonce
+ ldmia r3,{r4,r5,r6,r7,r8,r9,r10,r11} @ load key
+ ldmia r14,{r0,r1,r2,r3} @ load sigma
+ stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} @ copy key
+ stmdb sp!,{r0,r1,r2,r3} @ copy sigma
+ str r10,[sp,#4*(16+10)] @ off-load "rx"
+ str r11,[sp,#4*(16+11)] @ off-load "rx"
+ b .Loop_outer_enter
+
+.align 4
+.Loop_outer:
+ ldmia sp,{r0,r1,r2,r3,r4,r5,r6,r7,r8,r9} @ load key material
+ str r11,[sp,#4*(32+2)] @ save len
+ str r12, [sp,#4*(32+1)] @ save inp
+ str r14, [sp,#4*(32+0)] @ save out
+.Loop_outer_enter:
+ ldr r11, [sp,#4*(15)]
+ ldr r12,[sp,#4*(12)] @ modulo-scheduled load
+ ldr r10, [sp,#4*(13)]
+ ldr r14,[sp,#4*(14)]
+ str r11, [sp,#4*(16+15)]
+ mov r11,#10
+ b .Loop
+
+.align 4
+.Loop:
+ subs r11,r11,#1
+ add r0,r0,r4
+ mov r12,r12,ror#16
+ add r1,r1,r5
+ mov r10,r10,ror#16
+ eor r12,r12,r0,ror#16
+ eor r10,r10,r1,ror#16
+ add r8,r8,r12
+ mov r4,r4,ror#20
+ add r9,r9,r10
+ mov r5,r5,ror#20
+ eor r4,r4,r8,ror#20
+ eor r5,r5,r9,ror#20
+ add r0,r0,r4
+ mov r12,r12,ror#24
+ add r1,r1,r5
+ mov r10,r10,ror#24
+ eor r12,r12,r0,ror#24
+ eor r10,r10,r1,ror#24
+ add r8,r8,r12
+ mov r4,r4,ror#25
+ add r9,r9,r10
+ mov r5,r5,ror#25
+ str r10,[sp,#4*(16+13)]
+ ldr r10,[sp,#4*(16+15)]
+ eor r4,r4,r8,ror#25
+ eor r5,r5,r9,ror#25
+ str r8,[sp,#4*(16+8)]
+ ldr r8,[sp,#4*(16+10)]
+ add r2,r2,r6
+ mov r14,r14,ror#16
+ str r9,[sp,#4*(16+9)]
+ ldr r9,[sp,#4*(16+11)]
+ add r3,r3,r7
+ mov r10,r10,ror#16
+ eor r14,r14,r2,ror#16
+ eor r10,r10,r3,ror#16
+ add r8,r8,r14
+ mov r6,r6,ror#20
+ add r9,r9,r10
+ mov r7,r7,ror#20
+ eor r6,r6,r8,ror#20
+ eor r7,r7,r9,ror#20
+ add r2,r2,r6
+ mov r14,r14,ror#24
+ add r3,r3,r7
+ mov r10,r10,ror#24
+ eor r14,r14,r2,ror#24
+ eor r10,r10,r3,ror#24
+ add r8,r8,r14
+ mov r6,r6,ror#25
+ add r9,r9,r10
+ mov r7,r7,ror#25
+ eor r6,r6,r8,ror#25
+ eor r7,r7,r9,ror#25
+ add r0,r0,r5
+ mov r10,r10,ror#16
+ add r1,r1,r6
+ mov r12,r12,ror#16
+ eor r10,r10,r0,ror#16
+ eor r12,r12,r1,ror#16
+ add r8,r8,r10
+ mov r5,r5,ror#20
+ add r9,r9,r12
+ mov r6,r6,ror#20
+ eor r5,r5,r8,ror#20
+ eor r6,r6,r9,ror#20
+ add r0,r0,r5
+ mov r10,r10,ror#24
+ add r1,r1,r6
+ mov r12,r12,ror#24
+ eor r10,r10,r0,ror#24
+ eor r12,r12,r1,ror#24
+ add r8,r8,r10
+ mov r5,r5,ror#25
+ str r10,[sp,#4*(16+15)]
+ ldr r10,[sp,#4*(16+13)]
+ add r9,r9,r12
+ mov r6,r6,ror#25
+ eor r5,r5,r8,ror#25
+ eor r6,r6,r9,ror#25
+ str r8,[sp,#4*(16+10)]
+ ldr r8,[sp,#4*(16+8)]
+ add r2,r2,r7
+ mov r10,r10,ror#16
+ str r9,[sp,#4*(16+11)]
+ ldr r9,[sp,#4*(16+9)]
+ add r3,r3,r4
+ mov r14,r14,ror#16
+ eor r10,r10,r2,ror#16
+ eor r14,r14,r3,ror#16
+ add r8,r8,r10
+ mov r7,r7,ror#20
+ add r9,r9,r14
+ mov r4,r4,ror#20
+ eor r7,r7,r8,ror#20
+ eor r4,r4,r9,ror#20
+ add r2,r2,r7
+ mov r10,r10,ror#24
+ add r3,r3,r4
+ mov r14,r14,ror#24
+ eor r10,r10,r2,ror#24
+ eor r14,r14,r3,ror#24
+ add r8,r8,r10
+ mov r7,r7,ror#25
+ add r9,r9,r14
+ mov r4,r4,ror#25
+ eor r7,r7,r8,ror#25
+ eor r4,r4,r9,ror#25
+ bne .Loop
+
+ ldr r11,[sp,#4*(32+2)] @ load len
+
+ str r8, [sp,#4*(16+8)] @ modulo-scheduled store
+ str r9, [sp,#4*(16+9)]
+ str r12,[sp,#4*(16+12)]
+ str r10, [sp,#4*(16+13)]
+ str r14,[sp,#4*(16+14)]
+
+ @ at this point we have first half of 512-bit result in
+ @ rx and second half at sp+4*(16+8)
+
+ cmp r11,#64 @ done yet?
+#ifdef __thumb2__
+ itete lo
+#endif
+ addlo r12,sp,#4*(0) @ shortcut or ...
+ ldrhs r12,[sp,#4*(32+1)] @ ... load inp
+ addlo r14,sp,#4*(0) @ shortcut or ...
+ ldrhs r14,[sp,#4*(32+0)] @ ... load out
+
+ ldr r8,[sp,#4*(0)] @ load key material
+ ldr r9,[sp,#4*(1)]
+
+#if __ARM_ARCH__>=6 || !defined(__ARMEB__)
+# if __ARM_ARCH__<7
+ orr r10,r12,r14
+ tst r10,#3 @ are input and output aligned?
+ ldr r10,[sp,#4*(2)]
+ bne .Lunaligned
+ cmp r11,#64 @ restore flags
+# else
+ ldr r10,[sp,#4*(2)]
+# endif
+ ldr r11,[sp,#4*(3)]
+
+ add r0,r0,r8 @ accumulate key material
+ add r1,r1,r9
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhs r8,[r12],#16 @ load input
+ ldrhs r9,[r12,#-12]
+
+ add r2,r2,r10
+ add r3,r3,r11
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhs r10,[r12,#-8]
+ ldrhs r11,[r12,#-4]
+# if __ARM_ARCH__>=6 && defined(__ARMEB__)
+ rev r0,r0
+ rev r1,r1
+ rev r2,r2
+ rev r3,r3
+# endif
+# ifdef __thumb2__
+ itt hs
+# endif
+ eorhs r0,r0,r8 @ xor with input
+ eorhs r1,r1,r9
+ add r8,sp,#4*(4)
+ str r0,[r14],#16 @ store output
+# ifdef __thumb2__
+ itt hs
+# endif
+ eorhs r2,r2,r10
+ eorhs r3,r3,r11
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ str r1,[r14,#-12]
+ str r2,[r14,#-8]
+ str r3,[r14,#-4]
+
+ add r4,r4,r8 @ accumulate key material
+ add r5,r5,r9
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhs r8,[r12],#16 @ load input
+ ldrhs r9,[r12,#-12]
+ add r6,r6,r10
+ add r7,r7,r11
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhs r10,[r12,#-8]
+ ldrhs r11,[r12,#-4]
+# if __ARM_ARCH__>=6 && defined(__ARMEB__)
+ rev r4,r4
+ rev r5,r5
+ rev r6,r6
+ rev r7,r7
+# endif
+# ifdef __thumb2__
+ itt hs
+# endif
+ eorhs r4,r4,r8
+ eorhs r5,r5,r9
+ add r8,sp,#4*(8)
+ str r4,[r14],#16 @ store output
+# ifdef __thumb2__
+ itt hs
+# endif
+ eorhs r6,r6,r10
+ eorhs r7,r7,r11
+ str r5,[r14,#-12]
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ str r6,[r14,#-8]
+ add r0,sp,#4*(16+8)
+ str r7,[r14,#-4]
+
+ ldmia r0,{r0,r1,r2,r3,r4,r5,r6,r7} @ load second half
+
+ add r0,r0,r8 @ accumulate key material
+ add r1,r1,r9
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhs r8,[r12],#16 @ load input
+ ldrhs r9,[r12,#-12]
+# ifdef __thumb2__
+ itt hi
+# endif
+ strhi r10,[sp,#4*(16+10)] @ copy "rx" while at it
+ strhi r11,[sp,#4*(16+11)] @ copy "rx" while at it
+ add r2,r2,r10
+ add r3,r3,r11
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhs r10,[r12,#-8]
+ ldrhs r11,[r12,#-4]
+# if __ARM_ARCH__>=6 && defined(__ARMEB__)
+ rev r0,r0
+ rev r1,r1
+ rev r2,r2
+ rev r3,r3
+# endif
+# ifdef __thumb2__
+ itt hs
+# endif
+ eorhs r0,r0,r8
+ eorhs r1,r1,r9
+ add r8,sp,#4*(12)
+ str r0,[r14],#16 @ store output
+# ifdef __thumb2__
+ itt hs
+# endif
+ eorhs r2,r2,r10
+ eorhs r3,r3,r11
+ str r1,[r14,#-12]
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ str r2,[r14,#-8]
+ str r3,[r14,#-4]
+
+ add r4,r4,r8 @ accumulate key material
+ add r5,r5,r9
+# ifdef __thumb2__
+ itt hi
+# endif
+ addhi r8,r8,#1 @ next counter value
+ strhi r8,[sp,#4*(12)] @ save next counter value
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhs r8,[r12],#16 @ load input
+ ldrhs r9,[r12,#-12]
+ add r6,r6,r10
+ add r7,r7,r11
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhs r10,[r12,#-8]
+ ldrhs r11,[r12,#-4]
+# if __ARM_ARCH__>=6 && defined(__ARMEB__)
+ rev r4,r4
+ rev r5,r5
+ rev r6,r6
+ rev r7,r7
+# endif
+# ifdef __thumb2__
+ itt hs
+# endif
+ eorhs r4,r4,r8
+ eorhs r5,r5,r9
+# ifdef __thumb2__
+ it ne
+# endif
+ ldrne r8,[sp,#4*(32+2)] @ re-load len
+# ifdef __thumb2__
+ itt hs
+# endif
+ eorhs r6,r6,r10
+ eorhs r7,r7,r11
+ str r4,[r14],#16 @ store output
+ str r5,[r14,#-12]
+# ifdef __thumb2__
+ it hs
+# endif
+ subhs r11,r8,#64 @ len-=64
+ str r6,[r14,#-8]
+ str r7,[r14,#-4]
+ bhi .Loop_outer
+
+ beq .Ldone
+# if __ARM_ARCH__<7
+ b .Ltail
+
+.align 4
+.Lunaligned:@ unaligned endian-neutral path
+ cmp r11,#64 @ restore flags
+# endif
+#endif
+#if __ARM_ARCH__<7
+ ldr r11,[sp,#4*(3)]
+ add r0,r0,r8 @ accumulate key material
+ add r1,r1,r9
+ add r2,r2,r10
+# ifdef __thumb2__
+ itete lo
+# endif
+ eorlo r8,r8,r8 @ zero or ...
+ ldrhsb r8,[r12],#16 @ ... load input
+ eorlo r9,r9,r9
+ ldrhsb r9,[r12,#-12]
+
+ add r3,r3,r11
+# ifdef __thumb2__
+ itete lo
+# endif
+ eorlo r10,r10,r10
+ ldrhsb r10,[r12,#-8]
+ eorlo r11,r11,r11
+ ldrhsb r11,[r12,#-4]
+
+ eor r0,r8,r0 @ xor with input (or zero)
+ eor r1,r9,r1
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-15] @ load more input
+ ldrhsb r9,[r12,#-11]
+ eor r2,r10,r2
+ strb r0,[r14],#16 @ store output
+ eor r3,r11,r3
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-7]
+ ldrhsb r11,[r12,#-3]
+ strb r1,[r14,#-12]
+ eor r0,r8,r0,lsr#8
+ strb r2,[r14,#-8]
+ eor r1,r9,r1,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-14] @ load more input
+ ldrhsb r9,[r12,#-10]
+ strb r3,[r14,#-4]
+ eor r2,r10,r2,lsr#8
+ strb r0,[r14,#-15]
+ eor r3,r11,r3,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-6]
+ ldrhsb r11,[r12,#-2]
+ strb r1,[r14,#-11]
+ eor r0,r8,r0,lsr#8
+ strb r2,[r14,#-7]
+ eor r1,r9,r1,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-13] @ load more input
+ ldrhsb r9,[r12,#-9]
+ strb r3,[r14,#-3]
+ eor r2,r10,r2,lsr#8
+ strb r0,[r14,#-14]
+ eor r3,r11,r3,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-5]
+ ldrhsb r11,[r12,#-1]
+ strb r1,[r14,#-10]
+ strb r2,[r14,#-6]
+ eor r0,r8,r0,lsr#8
+ strb r3,[r14,#-2]
+ eor r1,r9,r1,lsr#8
+ strb r0,[r14,#-13]
+ eor r2,r10,r2,lsr#8
+ strb r1,[r14,#-9]
+ eor r3,r11,r3,lsr#8
+ strb r2,[r14,#-5]
+ strb r3,[r14,#-1]
+ add r8,sp,#4*(4+0)
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ add r0,sp,#4*(16+8)
+ add r4,r4,r8 @ accumulate key material
+ add r5,r5,r9
+ add r6,r6,r10
+# ifdef __thumb2__
+ itete lo
+# endif
+ eorlo r8,r8,r8 @ zero or ...
+ ldrhsb r8,[r12],#16 @ ... load input
+ eorlo r9,r9,r9
+ ldrhsb r9,[r12,#-12]
+
+ add r7,r7,r11
+# ifdef __thumb2__
+ itete lo
+# endif
+ eorlo r10,r10,r10
+ ldrhsb r10,[r12,#-8]
+ eorlo r11,r11,r11
+ ldrhsb r11,[r12,#-4]
+
+ eor r4,r8,r4 @ xor with input (or zero)
+ eor r5,r9,r5
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-15] @ load more input
+ ldrhsb r9,[r12,#-11]
+ eor r6,r10,r6
+ strb r4,[r14],#16 @ store output
+ eor r7,r11,r7
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-7]
+ ldrhsb r11,[r12,#-3]
+ strb r5,[r14,#-12]
+ eor r4,r8,r4,lsr#8
+ strb r6,[r14,#-8]
+ eor r5,r9,r5,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-14] @ load more input
+ ldrhsb r9,[r12,#-10]
+ strb r7,[r14,#-4]
+ eor r6,r10,r6,lsr#8
+ strb r4,[r14,#-15]
+ eor r7,r11,r7,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-6]
+ ldrhsb r11,[r12,#-2]
+ strb r5,[r14,#-11]
+ eor r4,r8,r4,lsr#8
+ strb r6,[r14,#-7]
+ eor r5,r9,r5,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-13] @ load more input
+ ldrhsb r9,[r12,#-9]
+ strb r7,[r14,#-3]
+ eor r6,r10,r6,lsr#8
+ strb r4,[r14,#-14]
+ eor r7,r11,r7,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-5]
+ ldrhsb r11,[r12,#-1]
+ strb r5,[r14,#-10]
+ strb r6,[r14,#-6]
+ eor r4,r8,r4,lsr#8
+ strb r7,[r14,#-2]
+ eor r5,r9,r5,lsr#8
+ strb r4,[r14,#-13]
+ eor r6,r10,r6,lsr#8
+ strb r5,[r14,#-9]
+ eor r7,r11,r7,lsr#8
+ strb r6,[r14,#-5]
+ strb r7,[r14,#-1]
+ add r8,sp,#4*(4+4)
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ ldmia r0,{r0,r1,r2,r3,r4,r5,r6,r7} @ load second half
+# ifdef __thumb2__
+ itt hi
+# endif
+ strhi r10,[sp,#4*(16+10)] @ copy "rx"
+ strhi r11,[sp,#4*(16+11)] @ copy "rx"
+ add r0,r0,r8 @ accumulate key material
+ add r1,r1,r9
+ add r2,r2,r10
+# ifdef __thumb2__
+ itete lo
+# endif
+ eorlo r8,r8,r8 @ zero or ...
+ ldrhsb r8,[r12],#16 @ ... load input
+ eorlo r9,r9,r9
+ ldrhsb r9,[r12,#-12]
+
+ add r3,r3,r11
+# ifdef __thumb2__
+ itete lo
+# endif
+ eorlo r10,r10,r10
+ ldrhsb r10,[r12,#-8]
+ eorlo r11,r11,r11
+ ldrhsb r11,[r12,#-4]
+
+ eor r0,r8,r0 @ xor with input (or zero)
+ eor r1,r9,r1
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-15] @ load more input
+ ldrhsb r9,[r12,#-11]
+ eor r2,r10,r2
+ strb r0,[r14],#16 @ store output
+ eor r3,r11,r3
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-7]
+ ldrhsb r11,[r12,#-3]
+ strb r1,[r14,#-12]
+ eor r0,r8,r0,lsr#8
+ strb r2,[r14,#-8]
+ eor r1,r9,r1,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-14] @ load more input
+ ldrhsb r9,[r12,#-10]
+ strb r3,[r14,#-4]
+ eor r2,r10,r2,lsr#8
+ strb r0,[r14,#-15]
+ eor r3,r11,r3,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-6]
+ ldrhsb r11,[r12,#-2]
+ strb r1,[r14,#-11]
+ eor r0,r8,r0,lsr#8
+ strb r2,[r14,#-7]
+ eor r1,r9,r1,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-13] @ load more input
+ ldrhsb r9,[r12,#-9]
+ strb r3,[r14,#-3]
+ eor r2,r10,r2,lsr#8
+ strb r0,[r14,#-14]
+ eor r3,r11,r3,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-5]
+ ldrhsb r11,[r12,#-1]
+ strb r1,[r14,#-10]
+ strb r2,[r14,#-6]
+ eor r0,r8,r0,lsr#8
+ strb r3,[r14,#-2]
+ eor r1,r9,r1,lsr#8
+ strb r0,[r14,#-13]
+ eor r2,r10,r2,lsr#8
+ strb r1,[r14,#-9]
+ eor r3,r11,r3,lsr#8
+ strb r2,[r14,#-5]
+ strb r3,[r14,#-1]
+ add r8,sp,#4*(4+8)
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ add r4,r4,r8 @ accumulate key material
+# ifdef __thumb2__
+ itt hi
+# endif
+ addhi r8,r8,#1 @ next counter value
+ strhi r8,[sp,#4*(12)] @ save next counter value
+ add r5,r5,r9
+ add r6,r6,r10
+# ifdef __thumb2__
+ itete lo
+# endif
+ eorlo r8,r8,r8 @ zero or ...
+ ldrhsb r8,[r12],#16 @ ... load input
+ eorlo r9,r9,r9
+ ldrhsb r9,[r12,#-12]
+
+ add r7,r7,r11
+# ifdef __thumb2__
+ itete lo
+# endif
+ eorlo r10,r10,r10
+ ldrhsb r10,[r12,#-8]
+ eorlo r11,r11,r11
+ ldrhsb r11,[r12,#-4]
+
+ eor r4,r8,r4 @ xor with input (or zero)
+ eor r5,r9,r5
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-15] @ load more input
+ ldrhsb r9,[r12,#-11]
+ eor r6,r10,r6
+ strb r4,[r14],#16 @ store output
+ eor r7,r11,r7
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-7]
+ ldrhsb r11,[r12,#-3]
+ strb r5,[r14,#-12]
+ eor r4,r8,r4,lsr#8
+ strb r6,[r14,#-8]
+ eor r5,r9,r5,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-14] @ load more input
+ ldrhsb r9,[r12,#-10]
+ strb r7,[r14,#-4]
+ eor r6,r10,r6,lsr#8
+ strb r4,[r14,#-15]
+ eor r7,r11,r7,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-6]
+ ldrhsb r11,[r12,#-2]
+ strb r5,[r14,#-11]
+ eor r4,r8,r4,lsr#8
+ strb r6,[r14,#-7]
+ eor r5,r9,r5,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r8,[r12,#-13] @ load more input
+ ldrhsb r9,[r12,#-9]
+ strb r7,[r14,#-3]
+ eor r6,r10,r6,lsr#8
+ strb r4,[r14,#-14]
+ eor r7,r11,r7,lsr#8
+# ifdef __thumb2__
+ itt hs
+# endif
+ ldrhsb r10,[r12,#-5]
+ ldrhsb r11,[r12,#-1]
+ strb r5,[r14,#-10]
+ strb r6,[r14,#-6]
+ eor r4,r8,r4,lsr#8
+ strb r7,[r14,#-2]
+ eor r5,r9,r5,lsr#8
+ strb r4,[r14,#-13]
+ eor r6,r10,r6,lsr#8
+ strb r5,[r14,#-9]
+ eor r7,r11,r7,lsr#8
+ strb r6,[r14,#-5]
+ strb r7,[r14,#-1]
+# ifdef __thumb2__
+ it ne
+# endif
+ ldrne r8,[sp,#4*(32+2)] @ re-load len
+# ifdef __thumb2__
+ it hs
+# endif
+ subhs r11,r8,#64 @ len-=64
+ bhi .Loop_outer
+
+ beq .Ldone
+#endif
+
+.Ltail:
+ ldr r12,[sp,#4*(32+1)] @ load inp
+ add r9,sp,#4*(0)
+ ldr r14,[sp,#4*(32+0)] @ load out
+
+.Loop_tail:
+ ldrb r10,[r9],#1 @ read buffer on stack
+ ldrb r11,[r12],#1 @ read input
+ subs r8,r8,#1
+ eor r11,r11,r10
+ strb r11,[r14],#1 @ store output
+ bne .Loop_tail
+
+.Ldone:
+ add sp,sp,#4*(32+3)
+.Lno_data:
+ ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,pc}
+.size ChaCha20_ctr32,.-ChaCha20_ctr32
+#if __ARM_MAX_ARCH__>=7
+.arch armv7-a
+.fpu neon
+
+.type ChaCha20_neon,%function
+.align 5
+ChaCha20_neon:
+ ldr r12,[sp,#0] @ pull pointer to counter and nonce
+ stmdb sp!,{r0,r1,r2,r4-r11,lr}
+.LChaCha20_neon:
+ adr r14,.Lsigma
+ vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI spec says so
+ stmdb sp!,{r0,r1,r2,r3}
+
+ vld1.32 {q1,q2},[r3] @ load key
+ ldmia r3,{r4,r5,r6,r7,r8,r9,r10,r11} @ load key
+
+ sub sp,sp,#4*(16+16)
+ vld1.32 {q3},[r12] @ load counter and nonce
+ add r12,sp,#4*8
+ ldmia r14,{r0,r1,r2,r3} @ load sigma
+ vld1.32 {q0},[r14]! @ load sigma
+ vld1.32 {q12},[r14] @ one
+ vst1.32 {q2,q3},[r12] @ copy 1/2key|counter|nonce
+ vst1.32 {q0,q1},[sp] @ copy sigma|1/2key
+
+ str r10,[sp,#4*(16+10)] @ off-load "rx"
+ str r11,[sp,#4*(16+11)] @ off-load "rx"
+ vshl.i32 d26,d24,#1 @ two
+ vstr d24,[sp,#4*(16+0)]
+ vshl.i32 d28,d24,#2 @ four
+ vstr d26,[sp,#4*(16+2)]
+ vmov q4,q0
+ vstr d28,[sp,#4*(16+4)]
+ vmov q8,q0
+ vmov q5,q1
+ vmov q9,q1
+ b .Loop_neon_enter
+
+.align 4
+.Loop_neon_outer:
+ ldmia sp,{r0,r1,r2,r3,r4,r5,r6,r7,r8,r9} @ load key material
+ cmp r11,#64*2 @ if len<=64*2
+ bls .Lbreak_neon @ switch to integer-only
+ vmov q4,q0
+ str r11,[sp,#4*(32+2)] @ save len
+ vmov q8,q0
+ str r12, [sp,#4*(32+1)] @ save inp
+ vmov q5,q1
+ str r14, [sp,#4*(32+0)] @ save out
+ vmov q9,q1
+.Loop_neon_enter:
+ ldr r11, [sp,#4*(15)]
+ vadd.i32 q7,q3,q12 @ counter+1
+ ldr r12,[sp,#4*(12)] @ modulo-scheduled load
+ vmov q6,q2
+ ldr r10, [sp,#4*(13)]
+ vmov q10,q2
+ ldr r14,[sp,#4*(14)]
+ vadd.i32 q11,q7,q12 @ counter+2
+ str r11, [sp,#4*(16+15)]
+ mov r11,#10
+ add r12,r12,#3 @ counter+3
+ b .Loop_neon
+
+.align 4
+.Loop_neon:
+ subs r11,r11,#1
+ vadd.i32 q0,q0,q1
+ add r0,r0,r4
+ vadd.i32 q4,q4,q5
+ mov r12,r12,ror#16
+ vadd.i32 q8,q8,q9
+ add r1,r1,r5
+ veor q3,q3,q0
+ mov r10,r10,ror#16
+ veor q7,q7,q4
+ eor r12,r12,r0,ror#16
+ veor q11,q11,q8
+ eor r10,r10,r1,ror#16
+ vrev32.16 q3,q3
+ add r8,r8,r12
+ vrev32.16 q7,q7
+ mov r4,r4,ror#20
+ vrev32.16 q11,q11
+ add r9,r9,r10
+ vadd.i32 q2,q2,q3
+ mov r5,r5,ror#20
+ vadd.i32 q6,q6,q7
+ eor r4,r4,r8,ror#20
+ vadd.i32 q10,q10,q11
+ eor r5,r5,r9,ror#20
+ veor q12,q1,q2
+ add r0,r0,r4
+ veor q13,q5,q6
+ mov r12,r12,ror#24
+ veor q14,q9,q10
+ add r1,r1,r5
+ vshr.u32 q1,q12,#20
+ mov r10,r10,ror#24
+ vshr.u32 q5,q13,#20
+ eor r12,r12,r0,ror#24
+ vshr.u32 q9,q14,#20
+ eor r10,r10,r1,ror#24
+ vsli.32 q1,q12,#12
+ add r8,r8,r12
+ vsli.32 q5,q13,#12
+ mov r4,r4,ror#25
+ vsli.32 q9,q14,#12
+ add r9,r9,r10
+ vadd.i32 q0,q0,q1
+ mov r5,r5,ror#25
+ vadd.i32 q4,q4,q5
+ str r10,[sp,#4*(16+13)]
+ vadd.i32 q8,q8,q9
+ ldr r10,[sp,#4*(16+15)]
+ veor q12,q3,q0
+ eor r4,r4,r8,ror#25
+ veor q13,q7,q4
+ eor r5,r5,r9,ror#25
+ veor q14,q11,q8
+ str r8,[sp,#4*(16+8)]
+ vshr.u32 q3,q12,#24
+ ldr r8,[sp,#4*(16+10)]
+ vshr.u32 q7,q13,#24
+ add r2,r2,r6
+ vshr.u32 q11,q14,#24
+ mov r14,r14,ror#16
+ vsli.32 q3,q12,#8
+ str r9,[sp,#4*(16+9)]
+ vsli.32 q7,q13,#8
+ ldr r9,[sp,#4*(16+11)]
+ vsli.32 q11,q14,#8
+ add r3,r3,r7
+ vadd.i32 q2,q2,q3
+ mov r10,r10,ror#16
+ vadd.i32 q6,q6,q7
+ eor r14,r14,r2,ror#16
+ vadd.i32 q10,q10,q11
+ eor r10,r10,r3,ror#16
+ veor q12,q1,q2
+ add r8,r8,r14
+ veor q13,q5,q6
+ mov r6,r6,ror#20
+ veor q14,q9,q10
+ add r9,r9,r10
+ vshr.u32 q1,q12,#25
+ mov r7,r7,ror#20
+ vshr.u32 q5,q13,#25
+ eor r6,r6,r8,ror#20
+ vshr.u32 q9,q14,#25
+ eor r7,r7,r9,ror#20
+ vsli.32 q1,q12,#7
+ add r2,r2,r6
+ vsli.32 q5,q13,#7
+ mov r14,r14,ror#24
+ vsli.32 q9,q14,#7
+ add r3,r3,r7
+ vext.8 q2,q2,q2,#8
+ mov r10,r10,ror#24
+ vext.8 q6,q6,q6,#8
+ eor r14,r14,r2,ror#24
+ vext.8 q10,q10,q10,#8
+ eor r10,r10,r3,ror#24
+ vext.8 q1,q1,q1,#4
+ add r8,r8,r14
+ vext.8 q5,q5,q5,#4
+ mov r6,r6,ror#25
+ vext.8 q9,q9,q9,#4
+ add r9,r9,r10
+ vext.8 q3,q3,q3,#12
+ mov r7,r7,ror#25
+ vext.8 q7,q7,q7,#12
+ eor r6,r6,r8,ror#25
+ vext.8 q11,q11,q11,#12
+ eor r7,r7,r9,ror#25
+ vadd.i32 q0,q0,q1
+ add r0,r0,r5
+ vadd.i32 q4,q4,q5
+ mov r10,r10,ror#16
+ vadd.i32 q8,q8,q9
+ add r1,r1,r6
+ veor q3,q3,q0
+ mov r12,r12,ror#16
+ veor q7,q7,q4
+ eor r10,r10,r0,ror#16
+ veor q11,q11,q8
+ eor r12,r12,r1,ror#16
+ vrev32.16 q3,q3
+ add r8,r8,r10
+ vrev32.16 q7,q7
+ mov r5,r5,ror#20
+ vrev32.16 q11,q11
+ add r9,r9,r12
+ vadd.i32 q2,q2,q3
+ mov r6,r6,ror#20
+ vadd.i32 q6,q6,q7
+ eor r5,r5,r8,ror#20
+ vadd.i32 q10,q10,q11
+ eor r6,r6,r9,ror#20
+ veor q12,q1,q2
+ add r0,r0,r5
+ veor q13,q5,q6
+ mov r10,r10,ror#24
+ veor q14,q9,q10
+ add r1,r1,r6
+ vshr.u32 q1,q12,#20
+ mov r12,r12,ror#24
+ vshr.u32 q5,q13,#20
+ eor r10,r10,r0,ror#24
+ vshr.u32 q9,q14,#20
+ eor r12,r12,r1,ror#24
+ vsli.32 q1,q12,#12
+ add r8,r8,r10
+ vsli.32 q5,q13,#12
+ mov r5,r5,ror#25
+ vsli.32 q9,q14,#12
+ str r10,[sp,#4*(16+15)]
+ vadd.i32 q0,q0,q1
+ ldr r10,[sp,#4*(16+13)]
+ vadd.i32 q4,q4,q5
+ add r9,r9,r12
+ vadd.i32 q8,q8,q9
+ mov r6,r6,ror#25
+ veor q12,q3,q0
+ eor r5,r5,r8,ror#25
+ veor q13,q7,q4
+ eor r6,r6,r9,ror#25
+ veor q14,q11,q8
+ str r8,[sp,#4*(16+10)]
+ vshr.u32 q3,q12,#24
+ ldr r8,[sp,#4*(16+8)]
+ vshr.u32 q7,q13,#24
+ add r2,r2,r7
+ vshr.u32 q11,q14,#24
+ mov r10,r10,ror#16
+ vsli.32 q3,q12,#8
+ str r9,[sp,#4*(16+11)]
+ vsli.32 q7,q13,#8
+ ldr r9,[sp,#4*(16+9)]
+ vsli.32 q11,q14,#8
+ add r3,r3,r4
+ vadd.i32 q2,q2,q3
+ mov r14,r14,ror#16
+ vadd.i32 q6,q6,q7
+ eor r10,r10,r2,ror#16
+ vadd.i32 q10,q10,q11
+ eor r14,r14,r3,ror#16
+ veor q12,q1,q2
+ add r8,r8,r10
+ veor q13,q5,q6
+ mov r7,r7,ror#20
+ veor q14,q9,q10
+ add r9,r9,r14
+ vshr.u32 q1,q12,#25
+ mov r4,r4,ror#20
+ vshr.u32 q5,q13,#25
+ eor r7,r7,r8,ror#20
+ vshr.u32 q9,q14,#25
+ eor r4,r4,r9,ror#20
+ vsli.32 q1,q12,#7
+ add r2,r2,r7
+ vsli.32 q5,q13,#7
+ mov r10,r10,ror#24
+ vsli.32 q9,q14,#7
+ add r3,r3,r4
+ vext.8 q2,q2,q2,#8
+ mov r14,r14,ror#24
+ vext.8 q6,q6,q6,#8
+ eor r10,r10,r2,ror#24
+ vext.8 q10,q10,q10,#8
+ eor r14,r14,r3,ror#24
+ vext.8 q1,q1,q1,#12
+ add r8,r8,r10
+ vext.8 q5,q5,q5,#12
+ mov r7,r7,ror#25
+ vext.8 q9,q9,q9,#12
+ add r9,r9,r14
+ vext.8 q3,q3,q3,#4
+ mov r4,r4,ror#25
+ vext.8 q7,q7,q7,#4
+ eor r7,r7,r8,ror#25
+ vext.8 q11,q11,q11,#4
+ eor r4,r4,r9,ror#25
+ bne .Loop_neon
+
+ add r11,sp,#32
+ vld1.32 {q12,q13},[sp] @ load key material
+ vld1.32 {q14,q15},[r11]
+
+ ldr r11,[sp,#4*(32+2)] @ load len
+
+ str r8, [sp,#4*(16+8)] @ modulo-scheduled store
+ str r9, [sp,#4*(16+9)]
+ str r12,[sp,#4*(16+12)]
+ str r10, [sp,#4*(16+13)]
+ str r14,[sp,#4*(16+14)]
+
+ @ at this point we have first half of 512-bit result in
+ @ rx and second half at sp+4*(16+8)
+
+ ldr r12,[sp,#4*(32+1)] @ load inp
+ ldr r14,[sp,#4*(32+0)] @ load out
+
+ vadd.i32 q0,q0,q12 @ accumulate key material
+ vadd.i32 q4,q4,q12
+ vadd.i32 q8,q8,q12
+ vldr d24,[sp,#4*(16+0)] @ one
+
+ vadd.i32 q1,q1,q13
+ vadd.i32 q5,q5,q13
+ vadd.i32 q9,q9,q13
+ vldr d26,[sp,#4*(16+2)] @ two
+
+ vadd.i32 q2,q2,q14
+ vadd.i32 q6,q6,q14
+ vadd.i32 q10,q10,q14
+ vadd.i32 d14,d14,d24 @ counter+1
+ vadd.i32 d22,d22,d26 @ counter+2
+
+ vadd.i32 q3,q3,q15
+ vadd.i32 q7,q7,q15
+ vadd.i32 q11,q11,q15
+
+ cmp r11,#64*4
+ blo .Ltail_neon
+
+ vld1.8 {q12,q13},[r12]! @ load input
+ mov r11,sp
+ vld1.8 {q14,q15},[r12]!
+ veor q0,q0,q12 @ xor with input
+ veor q1,q1,q13
+ vld1.8 {q12,q13},[r12]!
+ veor q2,q2,q14
+ veor q3,q3,q15
+ vld1.8 {q14,q15},[r12]!
+
+ veor q4,q4,q12
+ vst1.8 {q0,q1},[r14]! @ store output
+ veor q5,q5,q13
+ vld1.8 {q12,q13},[r12]!
+ veor q6,q6,q14
+ vst1.8 {q2,q3},[r14]!
+ veor q7,q7,q15
+ vld1.8 {q14,q15},[r12]!
+
+ veor q8,q8,q12
+ vld1.32 {q0,q1},[r11]! @ load for next iteration
+ veor d25,d25,d25
+ vldr d24,[sp,#4*(16+4)] @ four
+ veor q9,q9,q13
+ vld1.32 {q2,q3},[r11]
+ veor q10,q10,q14
+ vst1.8 {q4,q5},[r14]!
+ veor q11,q11,q15
+ vst1.8 {q6,q7},[r14]!
+
+ vadd.i32 d6,d6,d24 @ next counter value
+ vldr d24,[sp,#4*(16+0)] @ one
+
+ ldmia sp,{r8,r9,r10,r11} @ load key material
+ add r0,r0,r8 @ accumulate key material
+ ldr r8,[r12],#16 @ load input
+ vst1.8 {q8,q9},[r14]!
+ add r1,r1,r9
+ ldr r9,[r12,#-12]
+ vst1.8 {q10,q11},[r14]!
+ add r2,r2,r10
+ ldr r10,[r12,#-8]
+ add r3,r3,r11
+ ldr r11,[r12,#-4]
+# ifdef __ARMEB__
+ rev r0,r0
+ rev r1,r1
+ rev r2,r2
+ rev r3,r3
+# endif
+ eor r0,r0,r8 @ xor with input
+ add r8,sp,#4*(4)
+ eor r1,r1,r9
+ str r0,[r14],#16 @ store output
+ eor r2,r2,r10
+ str r1,[r14,#-12]
+ eor r3,r3,r11
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ str r2,[r14,#-8]
+ str r3,[r14,#-4]
+
+ add r4,r4,r8 @ accumulate key material
+ ldr r8,[r12],#16 @ load input
+ add r5,r5,r9
+ ldr r9,[r12,#-12]
+ add r6,r6,r10
+ ldr r10,[r12,#-8]
+ add r7,r7,r11
+ ldr r11,[r12,#-4]
+# ifdef __ARMEB__
+ rev r4,r4
+ rev r5,r5
+ rev r6,r6
+ rev r7,r7
+# endif
+ eor r4,r4,r8
+ add r8,sp,#4*(8)
+ eor r5,r5,r9
+ str r4,[r14],#16 @ store output
+ eor r6,r6,r10
+ str r5,[r14,#-12]
+ eor r7,r7,r11
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ str r6,[r14,#-8]
+ add r0,sp,#4*(16+8)
+ str r7,[r14,#-4]
+
+ ldmia r0,{r0,r1,r2,r3,r4,r5,r6,r7} @ load second half
+
+ add r0,r0,r8 @ accumulate key material
+ ldr r8,[r12],#16 @ load input
+ add r1,r1,r9
+ ldr r9,[r12,#-12]
+# ifdef __thumb2__
+ it hi
+# endif
+ strhi r10,[sp,#4*(16+10)] @ copy "rx" while at it
+ add r2,r2,r10
+ ldr r10,[r12,#-8]
+# ifdef __thumb2__
+ it hi
+# endif
+ strhi r11,[sp,#4*(16+11)] @ copy "rx" while at it
+ add r3,r3,r11
+ ldr r11,[r12,#-4]
+# ifdef __ARMEB__
+ rev r0,r0
+ rev r1,r1
+ rev r2,r2
+ rev r3,r3
+# endif
+ eor r0,r0,r8
+ add r8,sp,#4*(12)
+ eor r1,r1,r9
+ str r0,[r14],#16 @ store output
+ eor r2,r2,r10
+ str r1,[r14,#-12]
+ eor r3,r3,r11
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+ str r2,[r14,#-8]
+ str r3,[r14,#-4]
+
+ add r4,r4,r8 @ accumulate key material
+ add r8,r8,#4 @ next counter value
+ add r5,r5,r9
+ str r8,[sp,#4*(12)] @ save next counter value
+ ldr r8,[r12],#16 @ load input
+ add r6,r6,r10
+ add r4,r4,#3 @ counter+3
+ ldr r9,[r12,#-12]
+ add r7,r7,r11
+ ldr r10,[r12,#-8]
+ ldr r11,[r12,#-4]
+# ifdef __ARMEB__
+ rev r4,r4
+ rev r5,r5
+ rev r6,r6
+ rev r7,r7
+# endif
+ eor r4,r4,r8
+# ifdef __thumb2__
+ it hi
+# endif
+ ldrhi r8,[sp,#4*(32+2)] @ re-load len
+ eor r5,r5,r9
+ eor r6,r6,r10
+ str r4,[r14],#16 @ store output
+ eor r7,r7,r11
+ str r5,[r14,#-12]
+ sub r11,r8,#64*4 @ len-=64*4
+ str r6,[r14,#-8]
+ str r7,[r14,#-4]
+ bhi .Loop_neon_outer
+
+ b .Ldone_neon
+
+.align 4
+.Lbreak_neon:
+ @ harmonize NEON and integer-only stack frames: load data
+ @ from NEON frame, but save to integer-only one; distance
+ @ between the two is 4*(32+4+16-32)=4*(20).
+
+ str r11, [sp,#4*(20+32+2)] @ save len
+ add r11,sp,#4*(32+4)
+ str r12, [sp,#4*(20+32+1)] @ save inp
+ str r14, [sp,#4*(20+32+0)] @ save out
+
+ ldr r12,[sp,#4*(16+10)]
+ ldr r14,[sp,#4*(16+11)]
+ vldmia r11,{d8,d9,d10,d11,d12,d13,d14,d15} @ fulfill ABI requirement
+ str r12,[sp,#4*(20+16+10)] @ copy "rx"
+ str r14,[sp,#4*(20+16+11)] @ copy "rx"
+
+ ldr r11, [sp,#4*(15)]
+ ldr r12,[sp,#4*(12)] @ modulo-scheduled load
+ ldr r10, [sp,#4*(13)]
+ ldr r14,[sp,#4*(14)]
+ str r11, [sp,#4*(20+16+15)]
+ add r11,sp,#4*(20)
+ vst1.32 {q0,q1},[r11]! @ copy key
+ add sp,sp,#4*(20) @ switch frame
+ vst1.32 {q2,q3},[r11]
+ mov r11,#10
+ b .Loop @ go integer-only
+
+.align 4
+.Ltail_neon:
+ cmp r11,#64*3
+ bhs .L192_or_more_neon
+ cmp r11,#64*2
+ bhs .L128_or_more_neon
+ cmp r11,#64*1
+ bhs .L64_or_more_neon
+
+ add r8,sp,#4*(8)
+ vst1.8 {q0,q1},[sp]
+ add r10,sp,#4*(0)
+ vst1.8 {q2,q3},[r8]
+ b .Loop_tail_neon
+
+.align 4
+.L64_or_more_neon:
+ vld1.8 {q12,q13},[r12]!
+ vld1.8 {q14,q15},[r12]!
+ veor q0,q0,q12
+ veor q1,q1,q13
+ veor q2,q2,q14
+ veor q3,q3,q15
+ vst1.8 {q0,q1},[r14]!
+ vst1.8 {q2,q3},[r14]!
+
+ beq .Ldone_neon
+
+ add r8,sp,#4*(8)
+ vst1.8 {q4,q5},[sp]
+ add r10,sp,#4*(0)
+ vst1.8 {q6,q7},[r8]
+ sub r11,r11,#64*1 @ len-=64*1
+ b .Loop_tail_neon
+
+.align 4
+.L128_or_more_neon:
+ vld1.8 {q12,q13},[r12]!
+ vld1.8 {q14,q15},[r12]!
+ veor q0,q0,q12
+ veor q1,q1,q13
+ vld1.8 {q12,q13},[r12]!
+ veor q2,q2,q14
+ veor q3,q3,q15
+ vld1.8 {q14,q15},[r12]!
+
+ veor q4,q4,q12
+ veor q5,q5,q13
+ vst1.8 {q0,q1},[r14]!
+ veor q6,q6,q14
+ vst1.8 {q2,q3},[r14]!
+ veor q7,q7,q15
+ vst1.8 {q4,q5},[r14]!
+ vst1.8 {q6,q7},[r14]!
+
+ beq .Ldone_neon
+
+ add r8,sp,#4*(8)
+ vst1.8 {q8,q9},[sp]
+ add r10,sp,#4*(0)
+ vst1.8 {q10,q11},[r8]
+ sub r11,r11,#64*2 @ len-=64*2
+ b .Loop_tail_neon
+
+.align 4
+.L192_or_more_neon:
+ vld1.8 {q12,q13},[r12]!
+ vld1.8 {q14,q15},[r12]!
+ veor q0,q0,q12
+ veor q1,q1,q13
+ vld1.8 {q12,q13},[r12]!
+ veor q2,q2,q14
+ veor q3,q3,q15
+ vld1.8 {q14,q15},[r12]!
+
+ veor q4,q4,q12
+ veor q5,q5,q13
+ vld1.8 {q12,q13},[r12]!
+ veor q6,q6,q14
+ vst1.8 {q0,q1},[r14]!
+ veor q7,q7,q15
+ vld1.8 {q14,q15},[r12]!
+
+ veor q8,q8,q12
+ vst1.8 {q2,q3},[r14]!
+ veor q9,q9,q13
+ vst1.8 {q4,q5},[r14]!
+ veor q10,q10,q14
+ vst1.8 {q6,q7},[r14]!
+ veor q11,q11,q15
+ vst1.8 {q8,q9},[r14]!
+ vst1.8 {q10,q11},[r14]!
+
+ beq .Ldone_neon
+
+ ldmia sp,{r8,r9,r10,r11} @ load key material
+ add r0,r0,r8 @ accumulate key material
+ add r8,sp,#4*(4)
+ add r1,r1,r9
+ add r2,r2,r10
+ add r3,r3,r11
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+
+ add r4,r4,r8 @ accumulate key material
+ add r8,sp,#4*(8)
+ add r5,r5,r9
+ add r6,r6,r10
+ add r7,r7,r11
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+# ifdef __ARMEB__
+ rev r0,r0
+ rev r1,r1
+ rev r2,r2
+ rev r3,r3
+ rev r4,r4
+ rev r5,r5
+ rev r6,r6
+ rev r7,r7
+# endif
+ stmia sp,{r0,r1,r2,r3,r4,r5,r6,r7}
+ add r0,sp,#4*(16+8)
+
+ ldmia r0,{r0,r1,r2,r3,r4,r5,r6,r7} @ load second half
+
+ add r0,r0,r8 @ accumulate key material
+ add r8,sp,#4*(12)
+ add r1,r1,r9
+ add r2,r2,r10
+ add r3,r3,r11
+ ldmia r8,{r8,r9,r10,r11} @ load key material
+
+ add r4,r4,r8 @ accumulate key material
+ add r8,sp,#4*(8)
+ add r5,r5,r9
+ add r4,r4,#3 @ counter+3
+ add r6,r6,r10
+ add r7,r7,r11
+ ldr r11,[sp,#4*(32+2)] @ re-load len
+# ifdef __ARMEB__
+ rev r0,r0
+ rev r1,r1
+ rev r2,r2
+ rev r3,r3
+ rev r4,r4
+ rev r5,r5
+ rev r6,r6
+ rev r7,r7
+# endif
+ stmia r8,{r0,r1,r2,r3,r4,r5,r6,r7}
+ add r10,sp,#4*(0)
+ sub r11,r11,#64*3 @ len-=64*3
+
+.Loop_tail_neon:
+ ldrb r8,[r10],#1 @ read buffer on stack
+ ldrb r9,[r12],#1 @ read input
+ subs r11,r11,#1
+ eor r8,r8,r9
+ strb r8,[r14],#1 @ store ouput
+ bne .Loop_tail_neon
+
+.Ldone_neon:
+ add sp,sp,#4*(32+4)
+ vldmia sp,{d8,d9,d10,d11,d12,d13,d14,d15}
+ add sp,sp,#4*(16+3)
+ ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,pc}
+.size ChaCha20_neon,.-ChaCha20_neon
+.comm OPENSSL_armcap_P,4,4
+#endif
+#endif
diff --git a/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S b/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S
index c6f025d..791b289 100644
--- a/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S
@@ -1,13 +1,12 @@
#if defined(__arm__)
-#if defined(__arm__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
.syntax unified
.text
.code 32
-#ifdef __APPLE__
+#ifdef __clang__
#define ldrplb ldrbpl
#define ldrneb ldrbne
#endif
@@ -536,6 +535,4 @@
.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
index bdbbae9..0e1e631 100644
--- a/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx32.S
+++ b/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx32.S
@@ -1,10 +1,11 @@
#if defined(__arm__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
.text
.fpu neon
.code 32
.globl gcm_init_v8
+.hidden gcm_init_v8
.type gcm_init_v8,%function
.align 4
gcm_init_v8:
@@ -55,6 +56,7 @@
bx lr
.size gcm_init_v8,.-gcm_init_v8
.globl gcm_gmult_v8
+.hidden gcm_gmult_v8
.type gcm_gmult_v8,%function
.align 4
gcm_gmult_v8:
@@ -67,10 +69,10 @@
#endif
vext.8 q3,q9,q9,#8
-.byte 0x86,0x0e,0xa8,0xf2 @ pmull q0,q12,q3 @ H.lo·Xi.lo
+.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)
+.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
@@ -96,6 +98,7 @@
bx lr
.size gcm_gmult_v8,.-gcm_gmult_v8
.globl gcm_ghash_v8
+.hidden gcm_ghash_v8
.type gcm_ghash_v8,%function
.align 4
gcm_ghash_v8:
@@ -135,7 +138,7 @@
#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
+.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
@@ -144,14 +147,14 @@
.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
+.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
+.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)
+.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
@@ -176,7 +179,7 @@
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
+.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
@@ -197,10 +200,10 @@
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
+.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)
+.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
@@ -230,4 +233,4 @@
.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
+#endif
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
index 4911458..36955fa 100644
--- a/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S
@@ -1,10 +1,11 @@
#if defined(__arm__)
-#include "arm_arch.h"
+#include <openssl/arm_arch.h>
.text
.code 32
.globl sha1_block_data_order
+.hidden sha1_block_data_order
.type sha1_block_data_order,%function
.align 5
@@ -1459,4 +1460,4 @@
.comm OPENSSL_armcap_P,4,4
.hidden OPENSSL_armcap_P
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S b/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S
index ac9f2f1..6040041 100644
--- a/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S
@@ -38,7 +38,7 @@
@ Add ARMv8 code path performing at 2.0 cpb on Apple A7.
#ifndef __KERNEL__
-# include "arm_arch.h"
+# include <openssl/arm_arch.h>
#else
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
# define __ARM_MAX_ARCH__ 7
@@ -85,6 +85,7 @@
.align 5
.globl sha256_block_data_order
+.hidden sha256_block_data_order
.type sha256_block_data_order,%function
sha256_block_data_order:
.Lsha256_block_data_order:
@@ -1875,6 +1876,7 @@
.fpu neon
.globl sha256_block_data_order_neon
+.hidden sha256_block_data_order_neon
.type sha256_block_data_order_neon,%function
.align 4
sha256_block_data_order_neon:
@@ -2815,4 +2817,4 @@
.comm OPENSSL_armcap_P,4,4
.hidden OPENSSL_armcap_P
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S b/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S
index c794f87..93a7bf8 100644
--- a/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S
@@ -47,7 +47,7 @@
@ 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"
+# include <openssl/arm_arch.h>
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
# define VFP_ABI_POP vldmia sp!,{d8-d15}
#else
@@ -133,6 +133,7 @@
#endif
.globl sha512_block_data_order
+.hidden sha512_block_data_order
.type sha512_block_data_order,%function
sha512_block_data_order:
.Lsha512_block_data_order:
@@ -147,7 +148,7 @@
#ifdef __APPLE__
ldr r12,[r12]
#endif
- tst r12,#1
+ tst r12,#ARMV7_NEON
bne .LNEON
#endif
add r2,r1,r2,lsl#7 @ len to point at the end of inp
@@ -533,6 +534,7 @@
.fpu neon
.globl sha512_block_data_order_neon
+.hidden sha512_block_data_order_neon
.type sha512_block_data_order_neon,%function
.align 4
sha512_block_data_order_neon:
@@ -1866,4 +1868,4 @@
.comm OPENSSL_armcap_P,4,4
.hidden OPENSSL_armcap_P
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/chacha/chacha-x86.S b/third_party/boringssl/linux-x86/crypto/chacha/chacha-x86.S
new file mode 100644
index 0000000..d3c39ac
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/chacha/chacha-x86.S
@@ -0,0 +1,969 @@
+#if defined(__i386__)
+.file "chacha-x86.S"
+.text
+.globl ChaCha20_ctr32
+.hidden ChaCha20_ctr32
+.type ChaCha20_ctr32,@function
+.align 16
+ChaCha20_ctr32:
+.L_ChaCha20_ctr32_begin:
+ pushl %ebp
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+ xorl %eax,%eax
+ cmpl 28(%esp),%eax
+ je .L000no_data
+ call .Lpic_point
+.Lpic_point:
+ popl %eax
+ leal OPENSSL_ia32cap_P-.Lpic_point(%eax),%ebp
+ testl $16777216,(%ebp)
+ jz .L001x86
+ testl $512,4(%ebp)
+ jz .L001x86
+ jmp .Lssse3_shortcut
+.L001x86:
+ movl 32(%esp),%esi
+ movl 36(%esp),%edi
+ subl $132,%esp
+ movl (%esi),%eax
+ movl 4(%esi),%ebx
+ movl 8(%esi),%ecx
+ movl 12(%esi),%edx
+ movl %eax,80(%esp)
+ movl %ebx,84(%esp)
+ movl %ecx,88(%esp)
+ movl %edx,92(%esp)
+ movl 16(%esi),%eax
+ movl 20(%esi),%ebx
+ movl 24(%esi),%ecx
+ movl 28(%esi),%edx
+ movl %eax,96(%esp)
+ movl %ebx,100(%esp)
+ movl %ecx,104(%esp)
+ movl %edx,108(%esp)
+ movl (%edi),%eax
+ movl 4(%edi),%ebx
+ movl 8(%edi),%ecx
+ movl 12(%edi),%edx
+ subl $1,%eax
+ movl %eax,112(%esp)
+ movl %ebx,116(%esp)
+ movl %ecx,120(%esp)
+ movl %edx,124(%esp)
+ jmp .L002entry
+.align 16
+.L003outer_loop:
+ movl %ebx,156(%esp)
+ movl %eax,152(%esp)
+ movl %ecx,160(%esp)
+.L002entry:
+ movl $1634760805,%eax
+ movl $857760878,4(%esp)
+ movl $2036477234,8(%esp)
+ movl $1797285236,12(%esp)
+ movl 84(%esp),%ebx
+ movl 88(%esp),%ebp
+ movl 104(%esp),%ecx
+ movl 108(%esp),%esi
+ movl 116(%esp),%edx
+ movl 120(%esp),%edi
+ movl %ebx,20(%esp)
+ movl %ebp,24(%esp)
+ movl %ecx,40(%esp)
+ movl %esi,44(%esp)
+ movl %edx,52(%esp)
+ movl %edi,56(%esp)
+ movl 92(%esp),%ebx
+ movl 124(%esp),%edi
+ movl 112(%esp),%edx
+ movl 80(%esp),%ebp
+ movl 96(%esp),%ecx
+ movl 100(%esp),%esi
+ addl $1,%edx
+ movl %ebx,28(%esp)
+ movl %edi,60(%esp)
+ movl %edx,112(%esp)
+ movl $10,%ebx
+ jmp .L004loop
+.align 16
+.L004loop:
+ addl %ebp,%eax
+ movl %ebx,128(%esp)
+ movl %ebp,%ebx
+ xorl %eax,%edx
+ roll $16,%edx
+ addl %edx,%ecx
+ xorl %ecx,%ebx
+ movl 52(%esp),%edi
+ roll $12,%ebx
+ movl 20(%esp),%ebp
+ addl %ebx,%eax
+ xorl %eax,%edx
+ movl %eax,(%esp)
+ roll $8,%edx
+ movl 4(%esp),%eax
+ addl %edx,%ecx
+ movl %edx,48(%esp)
+ xorl %ecx,%ebx
+ addl %ebp,%eax
+ roll $7,%ebx
+ xorl %eax,%edi
+ movl %ecx,32(%esp)
+ roll $16,%edi
+ movl %ebx,16(%esp)
+ addl %edi,%esi
+ movl 40(%esp),%ecx
+ xorl %esi,%ebp
+ movl 56(%esp),%edx
+ roll $12,%ebp
+ movl 24(%esp),%ebx
+ addl %ebp,%eax
+ xorl %eax,%edi
+ movl %eax,4(%esp)
+ roll $8,%edi
+ movl 8(%esp),%eax
+ addl %edi,%esi
+ movl %edi,52(%esp)
+ xorl %esi,%ebp
+ addl %ebx,%eax
+ roll $7,%ebp
+ xorl %eax,%edx
+ movl %esi,36(%esp)
+ roll $16,%edx
+ movl %ebp,20(%esp)
+ addl %edx,%ecx
+ movl 44(%esp),%esi
+ xorl %ecx,%ebx
+ movl 60(%esp),%edi
+ roll $12,%ebx
+ movl 28(%esp),%ebp
+ addl %ebx,%eax
+ xorl %eax,%edx
+ movl %eax,8(%esp)
+ roll $8,%edx
+ movl 12(%esp),%eax
+ addl %edx,%ecx
+ movl %edx,56(%esp)
+ xorl %ecx,%ebx
+ addl %ebp,%eax
+ roll $7,%ebx
+ xorl %eax,%edi
+ roll $16,%edi
+ movl %ebx,24(%esp)
+ addl %edi,%esi
+ xorl %esi,%ebp
+ roll $12,%ebp
+ movl 20(%esp),%ebx
+ addl %ebp,%eax
+ xorl %eax,%edi
+ movl %eax,12(%esp)
+ roll $8,%edi
+ movl (%esp),%eax
+ addl %edi,%esi
+ movl %edi,%edx
+ xorl %esi,%ebp
+ addl %ebx,%eax
+ roll $7,%ebp
+ xorl %eax,%edx
+ roll $16,%edx
+ movl %ebp,28(%esp)
+ addl %edx,%ecx
+ xorl %ecx,%ebx
+ movl 48(%esp),%edi
+ roll $12,%ebx
+ movl 24(%esp),%ebp
+ addl %ebx,%eax
+ xorl %eax,%edx
+ movl %eax,(%esp)
+ roll $8,%edx
+ movl 4(%esp),%eax
+ addl %edx,%ecx
+ movl %edx,60(%esp)
+ xorl %ecx,%ebx
+ addl %ebp,%eax
+ roll $7,%ebx
+ xorl %eax,%edi
+ movl %ecx,40(%esp)
+ roll $16,%edi
+ movl %ebx,20(%esp)
+ addl %edi,%esi
+ movl 32(%esp),%ecx
+ xorl %esi,%ebp
+ movl 52(%esp),%edx
+ roll $12,%ebp
+ movl 28(%esp),%ebx
+ addl %ebp,%eax
+ xorl %eax,%edi
+ movl %eax,4(%esp)
+ roll $8,%edi
+ movl 8(%esp),%eax
+ addl %edi,%esi
+ movl %edi,48(%esp)
+ xorl %esi,%ebp
+ addl %ebx,%eax
+ roll $7,%ebp
+ xorl %eax,%edx
+ movl %esi,44(%esp)
+ roll $16,%edx
+ movl %ebp,24(%esp)
+ addl %edx,%ecx
+ movl 36(%esp),%esi
+ xorl %ecx,%ebx
+ movl 56(%esp),%edi
+ roll $12,%ebx
+ movl 16(%esp),%ebp
+ addl %ebx,%eax
+ xorl %eax,%edx
+ movl %eax,8(%esp)
+ roll $8,%edx
+ movl 12(%esp),%eax
+ addl %edx,%ecx
+ movl %edx,52(%esp)
+ xorl %ecx,%ebx
+ addl %ebp,%eax
+ roll $7,%ebx
+ xorl %eax,%edi
+ roll $16,%edi
+ movl %ebx,28(%esp)
+ addl %edi,%esi
+ xorl %esi,%ebp
+ movl 48(%esp),%edx
+ roll $12,%ebp
+ movl 128(%esp),%ebx
+ addl %ebp,%eax
+ xorl %eax,%edi
+ movl %eax,12(%esp)
+ roll $8,%edi
+ movl (%esp),%eax
+ addl %edi,%esi
+ movl %edi,56(%esp)
+ xorl %esi,%ebp
+ roll $7,%ebp
+ decl %ebx
+ jnz .L004loop
+ movl 160(%esp),%ebx
+ addl $1634760805,%eax
+ addl 80(%esp),%ebp
+ addl 96(%esp),%ecx
+ addl 100(%esp),%esi
+ cmpl $64,%ebx
+ jb .L005tail
+ movl 156(%esp),%ebx
+ addl 112(%esp),%edx
+ addl 120(%esp),%edi
+ xorl (%ebx),%eax
+ xorl 16(%ebx),%ebp
+ movl %eax,(%esp)
+ movl 152(%esp),%eax
+ xorl 32(%ebx),%ecx
+ xorl 36(%ebx),%esi
+ xorl 48(%ebx),%edx
+ xorl 56(%ebx),%edi
+ movl %ebp,16(%eax)
+ movl %ecx,32(%eax)
+ movl %esi,36(%eax)
+ movl %edx,48(%eax)
+ movl %edi,56(%eax)
+ movl 4(%esp),%ebp
+ movl 8(%esp),%ecx
+ movl 12(%esp),%esi
+ movl 20(%esp),%edx
+ movl 24(%esp),%edi
+ addl $857760878,%ebp
+ addl $2036477234,%ecx
+ addl $1797285236,%esi
+ addl 84(%esp),%edx
+ addl 88(%esp),%edi
+ xorl 4(%ebx),%ebp
+ xorl 8(%ebx),%ecx
+ xorl 12(%ebx),%esi
+ xorl 20(%ebx),%edx
+ xorl 24(%ebx),%edi
+ movl %ebp,4(%eax)
+ movl %ecx,8(%eax)
+ movl %esi,12(%eax)
+ movl %edx,20(%eax)
+ movl %edi,24(%eax)
+ movl 28(%esp),%ebp
+ movl 40(%esp),%ecx
+ movl 44(%esp),%esi
+ movl 52(%esp),%edx
+ movl 60(%esp),%edi
+ addl 92(%esp),%ebp
+ addl 104(%esp),%ecx
+ addl 108(%esp),%esi
+ addl 116(%esp),%edx
+ addl 124(%esp),%edi
+ xorl 28(%ebx),%ebp
+ xorl 40(%ebx),%ecx
+ xorl 44(%ebx),%esi
+ xorl 52(%ebx),%edx
+ xorl 60(%ebx),%edi
+ leal 64(%ebx),%ebx
+ movl %ebp,28(%eax)
+ movl (%esp),%ebp
+ movl %ecx,40(%eax)
+ movl 160(%esp),%ecx
+ movl %esi,44(%eax)
+ movl %edx,52(%eax)
+ movl %edi,60(%eax)
+ movl %ebp,(%eax)
+ leal 64(%eax),%eax
+ subl $64,%ecx
+ jnz .L003outer_loop
+ jmp .L006done
+.L005tail:
+ addl 112(%esp),%edx
+ addl 120(%esp),%edi
+ movl %eax,(%esp)
+ movl %ebp,16(%esp)
+ movl %ecx,32(%esp)
+ movl %esi,36(%esp)
+ movl %edx,48(%esp)
+ movl %edi,56(%esp)
+ movl 4(%esp),%ebp
+ movl 8(%esp),%ecx
+ movl 12(%esp),%esi
+ movl 20(%esp),%edx
+ movl 24(%esp),%edi
+ addl $857760878,%ebp
+ addl $2036477234,%ecx
+ addl $1797285236,%esi
+ addl 84(%esp),%edx
+ addl 88(%esp),%edi
+ movl %ebp,4(%esp)
+ movl %ecx,8(%esp)
+ movl %esi,12(%esp)
+ movl %edx,20(%esp)
+ movl %edi,24(%esp)
+ movl 28(%esp),%ebp
+ movl 40(%esp),%ecx
+ movl 44(%esp),%esi
+ movl 52(%esp),%edx
+ movl 60(%esp),%edi
+ addl 92(%esp),%ebp
+ addl 104(%esp),%ecx
+ addl 108(%esp),%esi
+ addl 116(%esp),%edx
+ addl 124(%esp),%edi
+ movl %ebp,28(%esp)
+ movl 156(%esp),%ebp
+ movl %ecx,40(%esp)
+ movl 152(%esp),%ecx
+ movl %esi,44(%esp)
+ xorl %esi,%esi
+ movl %edx,52(%esp)
+ movl %edi,60(%esp)
+ xorl %eax,%eax
+ xorl %edx,%edx
+.L007tail_loop:
+ movb (%esi,%ebp,1),%al
+ movb (%esp,%esi,1),%dl
+ leal 1(%esi),%esi
+ xorb %dl,%al
+ movb %al,-1(%ecx,%esi,1)
+ decl %ebx
+ jnz .L007tail_loop
+.L006done:
+ addl $132,%esp
+.L000no_data:
+ popl %edi
+ popl %esi
+ popl %ebx
+ popl %ebp
+ ret
+.size ChaCha20_ctr32,.-.L_ChaCha20_ctr32_begin
+.globl ChaCha20_ssse3
+.hidden ChaCha20_ssse3
+.type ChaCha20_ssse3,@function
+.align 16
+ChaCha20_ssse3:
+.L_ChaCha20_ssse3_begin:
+ pushl %ebp
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+.Lssse3_shortcut:
+ movl 20(%esp),%edi
+ movl 24(%esp),%esi
+ movl 28(%esp),%ecx
+ movl 32(%esp),%edx
+ movl 36(%esp),%ebx
+ movl %esp,%ebp
+ subl $524,%esp
+ andl $-64,%esp
+ movl %ebp,512(%esp)
+ leal .Lssse3_data-.Lpic_point(%eax),%eax
+ movdqu (%ebx),%xmm3
+ cmpl $256,%ecx
+ jb .L0081x
+ movl %edx,516(%esp)
+ movl %ebx,520(%esp)
+ subl $256,%ecx
+ leal 384(%esp),%ebp
+ movdqu (%edx),%xmm7
+ pshufd $0,%xmm3,%xmm0
+ pshufd $85,%xmm3,%xmm1
+ pshufd $170,%xmm3,%xmm2
+ pshufd $255,%xmm3,%xmm3
+ paddd 48(%eax),%xmm0
+ pshufd $0,%xmm7,%xmm4
+ pshufd $85,%xmm7,%xmm5
+ psubd 64(%eax),%xmm0
+ pshufd $170,%xmm7,%xmm6
+ pshufd $255,%xmm7,%xmm7
+ movdqa %xmm0,64(%ebp)
+ movdqa %xmm1,80(%ebp)
+ movdqa %xmm2,96(%ebp)
+ movdqa %xmm3,112(%ebp)
+ movdqu 16(%edx),%xmm3
+ movdqa %xmm4,-64(%ebp)
+ movdqa %xmm5,-48(%ebp)
+ movdqa %xmm6,-32(%ebp)
+ movdqa %xmm7,-16(%ebp)
+ movdqa 32(%eax),%xmm7
+ leal 128(%esp),%ebx
+ pshufd $0,%xmm3,%xmm0
+ pshufd $85,%xmm3,%xmm1
+ pshufd $170,%xmm3,%xmm2
+ pshufd $255,%xmm3,%xmm3
+ pshufd $0,%xmm7,%xmm4
+ pshufd $85,%xmm7,%xmm5
+ pshufd $170,%xmm7,%xmm6
+ pshufd $255,%xmm7,%xmm7
+ movdqa %xmm0,(%ebp)
+ movdqa %xmm1,16(%ebp)
+ movdqa %xmm2,32(%ebp)
+ movdqa %xmm3,48(%ebp)
+ movdqa %xmm4,-128(%ebp)
+ movdqa %xmm5,-112(%ebp)
+ movdqa %xmm6,-96(%ebp)
+ movdqa %xmm7,-80(%ebp)
+ leal 128(%esi),%esi
+ leal 128(%edi),%edi
+ jmp .L009outer_loop
+.align 16
+.L009outer_loop:
+ movdqa -112(%ebp),%xmm1
+ movdqa -96(%ebp),%xmm2
+ movdqa -80(%ebp),%xmm3
+ movdqa -48(%ebp),%xmm5
+ movdqa -32(%ebp),%xmm6
+ movdqa -16(%ebp),%xmm7
+ movdqa %xmm1,-112(%ebx)
+ movdqa %xmm2,-96(%ebx)
+ movdqa %xmm3,-80(%ebx)
+ movdqa %xmm5,-48(%ebx)
+ movdqa %xmm6,-32(%ebx)
+ movdqa %xmm7,-16(%ebx)
+ movdqa 32(%ebp),%xmm2
+ movdqa 48(%ebp),%xmm3
+ movdqa 64(%ebp),%xmm4
+ movdqa 80(%ebp),%xmm5
+ movdqa 96(%ebp),%xmm6
+ movdqa 112(%ebp),%xmm7
+ paddd 64(%eax),%xmm4
+ movdqa %xmm2,32(%ebx)
+ movdqa %xmm3,48(%ebx)
+ movdqa %xmm4,64(%ebx)
+ movdqa %xmm5,80(%ebx)
+ movdqa %xmm6,96(%ebx)
+ movdqa %xmm7,112(%ebx)
+ movdqa %xmm4,64(%ebp)
+ movdqa -128(%ebp),%xmm0
+ movdqa %xmm4,%xmm6
+ movdqa -64(%ebp),%xmm3
+ movdqa (%ebp),%xmm4
+ movdqa 16(%ebp),%xmm5
+ movl $10,%edx
+ nop
+.align 16
+.L010loop:
+ paddd %xmm3,%xmm0
+ movdqa %xmm3,%xmm2
+ pxor %xmm0,%xmm6
+ pshufb (%eax),%xmm6
+ paddd %xmm6,%xmm4
+ pxor %xmm4,%xmm2
+ movdqa -48(%ebx),%xmm3
+ movdqa %xmm2,%xmm1
+ pslld $12,%xmm2
+ psrld $20,%xmm1
+ por %xmm1,%xmm2
+ movdqa -112(%ebx),%xmm1
+ paddd %xmm2,%xmm0
+ movdqa 80(%ebx),%xmm7
+ pxor %xmm0,%xmm6
+ movdqa %xmm0,-128(%ebx)
+ pshufb 16(%eax),%xmm6
+ paddd %xmm6,%xmm4
+ movdqa %xmm6,64(%ebx)
+ pxor %xmm4,%xmm2
+ paddd %xmm3,%xmm1
+ movdqa %xmm2,%xmm0
+ pslld $7,%xmm2
+ psrld $25,%xmm0
+ pxor %xmm1,%xmm7
+ por %xmm0,%xmm2
+ movdqa %xmm4,(%ebx)
+ pshufb (%eax),%xmm7
+ movdqa %xmm2,-64(%ebx)
+ paddd %xmm7,%xmm5
+ movdqa 32(%ebx),%xmm4
+ pxor %xmm5,%xmm3
+ movdqa -32(%ebx),%xmm2
+ movdqa %xmm3,%xmm0
+ pslld $12,%xmm3
+ psrld $20,%xmm0
+ por %xmm0,%xmm3
+ movdqa -96(%ebx),%xmm0
+ paddd %xmm3,%xmm1
+ movdqa 96(%ebx),%xmm6
+ pxor %xmm1,%xmm7
+ movdqa %xmm1,-112(%ebx)
+ pshufb 16(%eax),%xmm7
+ paddd %xmm7,%xmm5
+ movdqa %xmm7,80(%ebx)
+ pxor %xmm5,%xmm3
+ paddd %xmm2,%xmm0
+ movdqa %xmm3,%xmm1
+ pslld $7,%xmm3
+ psrld $25,%xmm1
+ pxor %xmm0,%xmm6
+ por %xmm1,%xmm3
+ movdqa %xmm5,16(%ebx)
+ pshufb (%eax),%xmm6
+ movdqa %xmm3,-48(%ebx)
+ paddd %xmm6,%xmm4
+ movdqa 48(%ebx),%xmm5
+ pxor %xmm4,%xmm2
+ movdqa -16(%ebx),%xmm3
+ movdqa %xmm2,%xmm1
+ pslld $12,%xmm2
+ psrld $20,%xmm1
+ por %xmm1,%xmm2
+ movdqa -80(%ebx),%xmm1
+ paddd %xmm2,%xmm0
+ movdqa 112(%ebx),%xmm7
+ pxor %xmm0,%xmm6
+ movdqa %xmm0,-96(%ebx)
+ pshufb 16(%eax),%xmm6
+ paddd %xmm6,%xmm4
+ movdqa %xmm6,96(%ebx)
+ pxor %xmm4,%xmm2
+ paddd %xmm3,%xmm1
+ movdqa %xmm2,%xmm0
+ pslld $7,%xmm2
+ psrld $25,%xmm0
+ pxor %xmm1,%xmm7
+ por %xmm0,%xmm2
+ pshufb (%eax),%xmm7
+ movdqa %xmm2,-32(%ebx)
+ paddd %xmm7,%xmm5
+ pxor %xmm5,%xmm3
+ movdqa -48(%ebx),%xmm2
+ movdqa %xmm3,%xmm0
+ pslld $12,%xmm3
+ psrld $20,%xmm0
+ por %xmm0,%xmm3
+ movdqa -128(%ebx),%xmm0
+ paddd %xmm3,%xmm1
+ pxor %xmm1,%xmm7
+ movdqa %xmm1,-80(%ebx)
+ pshufb 16(%eax),%xmm7
+ paddd %xmm7,%xmm5
+ movdqa %xmm7,%xmm6
+ pxor %xmm5,%xmm3
+ paddd %xmm2,%xmm0
+ movdqa %xmm3,%xmm1
+ pslld $7,%xmm3
+ psrld $25,%xmm1
+ pxor %xmm0,%xmm6
+ por %xmm1,%xmm3
+ pshufb (%eax),%xmm6
+ movdqa %xmm3,-16(%ebx)
+ paddd %xmm6,%xmm4
+ pxor %xmm4,%xmm2
+ movdqa -32(%ebx),%xmm3
+ movdqa %xmm2,%xmm1
+ pslld $12,%xmm2
+ psrld $20,%xmm1
+ por %xmm1,%xmm2
+ movdqa -112(%ebx),%xmm1
+ paddd %xmm2,%xmm0
+ movdqa 64(%ebx),%xmm7
+ pxor %xmm0,%xmm6
+ movdqa %xmm0,-128(%ebx)
+ pshufb 16(%eax),%xmm6
+ paddd %xmm6,%xmm4
+ movdqa %xmm6,112(%ebx)
+ pxor %xmm4,%xmm2
+ paddd %xmm3,%xmm1
+ movdqa %xmm2,%xmm0
+ pslld $7,%xmm2
+ psrld $25,%xmm0
+ pxor %xmm1,%xmm7
+ por %xmm0,%xmm2
+ movdqa %xmm4,32(%ebx)
+ pshufb (%eax),%xmm7
+ movdqa %xmm2,-48(%ebx)
+ paddd %xmm7,%xmm5
+ movdqa (%ebx),%xmm4
+ pxor %xmm5,%xmm3
+ movdqa -16(%ebx),%xmm2
+ movdqa %xmm3,%xmm0
+ pslld $12,%xmm3
+ psrld $20,%xmm0
+ por %xmm0,%xmm3
+ movdqa -96(%ebx),%xmm0
+ paddd %xmm3,%xmm1
+ movdqa 80(%ebx),%xmm6
+ pxor %xmm1,%xmm7
+ movdqa %xmm1,-112(%ebx)
+ pshufb 16(%eax),%xmm7
+ paddd %xmm7,%xmm5
+ movdqa %xmm7,64(%ebx)
+ pxor %xmm5,%xmm3
+ paddd %xmm2,%xmm0
+ movdqa %xmm3,%xmm1
+ pslld $7,%xmm3
+ psrld $25,%xmm1
+ pxor %xmm0,%xmm6
+ por %xmm1,%xmm3
+ movdqa %xmm5,48(%ebx)
+ pshufb (%eax),%xmm6
+ movdqa %xmm3,-32(%ebx)
+ paddd %xmm6,%xmm4
+ movdqa 16(%ebx),%xmm5
+ pxor %xmm4,%xmm2
+ movdqa -64(%ebx),%xmm3
+ movdqa %xmm2,%xmm1
+ pslld $12,%xmm2
+ psrld $20,%xmm1
+ por %xmm1,%xmm2
+ movdqa -80(%ebx),%xmm1
+ paddd %xmm2,%xmm0
+ movdqa 96(%ebx),%xmm7
+ pxor %xmm0,%xmm6
+ movdqa %xmm0,-96(%ebx)
+ pshufb 16(%eax),%xmm6
+ paddd %xmm6,%xmm4
+ movdqa %xmm6,80(%ebx)
+ pxor %xmm4,%xmm2
+ paddd %xmm3,%xmm1
+ movdqa %xmm2,%xmm0
+ pslld $7,%xmm2
+ psrld $25,%xmm0
+ pxor %xmm1,%xmm7
+ por %xmm0,%xmm2
+ pshufb (%eax),%xmm7
+ movdqa %xmm2,-16(%ebx)
+ paddd %xmm7,%xmm5
+ pxor %xmm5,%xmm3
+ movdqa %xmm3,%xmm0
+ pslld $12,%xmm3
+ psrld $20,%xmm0
+ por %xmm0,%xmm3
+ movdqa -128(%ebx),%xmm0
+ paddd %xmm3,%xmm1
+ movdqa 64(%ebx),%xmm6
+ pxor %xmm1,%xmm7
+ movdqa %xmm1,-80(%ebx)
+ pshufb 16(%eax),%xmm7
+ paddd %xmm7,%xmm5
+ movdqa %xmm7,96(%ebx)
+ pxor %xmm5,%xmm3
+ movdqa %xmm3,%xmm1
+ pslld $7,%xmm3
+ psrld $25,%xmm1
+ por %xmm1,%xmm3
+ decl %edx
+ jnz .L010loop
+ movdqa %xmm3,-64(%ebx)
+ movdqa %xmm4,(%ebx)
+ movdqa %xmm5,16(%ebx)
+ movdqa %xmm6,64(%ebx)
+ movdqa %xmm7,96(%ebx)
+ movdqa -112(%ebx),%xmm1
+ movdqa -96(%ebx),%xmm2
+ movdqa -80(%ebx),%xmm3
+ paddd -128(%ebp),%xmm0
+ paddd -112(%ebp),%xmm1
+ paddd -96(%ebp),%xmm2
+ paddd -80(%ebp),%xmm3
+ movdqa %xmm0,%xmm6
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm6
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm6,%xmm3
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ movdqu -128(%esi),%xmm4
+ movdqu -64(%esi),%xmm5
+ movdqu (%esi),%xmm2
+ movdqu 64(%esi),%xmm7
+ leal 16(%esi),%esi
+ pxor %xmm0,%xmm4
+ movdqa -64(%ebx),%xmm0
+ pxor %xmm1,%xmm5
+ movdqa -48(%ebx),%xmm1
+ pxor %xmm2,%xmm6
+ movdqa -32(%ebx),%xmm2
+ pxor %xmm3,%xmm7
+ movdqa -16(%ebx),%xmm3
+ movdqu %xmm4,-128(%edi)
+ movdqu %xmm5,-64(%edi)
+ movdqu %xmm6,(%edi)
+ movdqu %xmm7,64(%edi)
+ leal 16(%edi),%edi
+ paddd -64(%ebp),%xmm0
+ paddd -48(%ebp),%xmm1
+ paddd -32(%ebp),%xmm2
+ paddd -16(%ebp),%xmm3
+ movdqa %xmm0,%xmm6
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm6
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm6,%xmm3
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ movdqu -128(%esi),%xmm4
+ movdqu -64(%esi),%xmm5
+ movdqu (%esi),%xmm2
+ movdqu 64(%esi),%xmm7
+ leal 16(%esi),%esi
+ pxor %xmm0,%xmm4
+ movdqa (%ebx),%xmm0
+ pxor %xmm1,%xmm5
+ movdqa 16(%ebx),%xmm1
+ pxor %xmm2,%xmm6
+ movdqa 32(%ebx),%xmm2
+ pxor %xmm3,%xmm7
+ movdqa 48(%ebx),%xmm3
+ movdqu %xmm4,-128(%edi)
+ movdqu %xmm5,-64(%edi)
+ movdqu %xmm6,(%edi)
+ movdqu %xmm7,64(%edi)
+ leal 16(%edi),%edi
+ paddd (%ebp),%xmm0
+ paddd 16(%ebp),%xmm1
+ paddd 32(%ebp),%xmm2
+ paddd 48(%ebp),%xmm3
+ movdqa %xmm0,%xmm6
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm6
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm6,%xmm3
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ movdqu -128(%esi),%xmm4
+ movdqu -64(%esi),%xmm5
+ movdqu (%esi),%xmm2
+ movdqu 64(%esi),%xmm7
+ leal 16(%esi),%esi
+ pxor %xmm0,%xmm4
+ movdqa 64(%ebx),%xmm0
+ pxor %xmm1,%xmm5
+ movdqa 80(%ebx),%xmm1
+ pxor %xmm2,%xmm6
+ movdqa 96(%ebx),%xmm2
+ pxor %xmm3,%xmm7
+ movdqa 112(%ebx),%xmm3
+ movdqu %xmm4,-128(%edi)
+ movdqu %xmm5,-64(%edi)
+ movdqu %xmm6,(%edi)
+ movdqu %xmm7,64(%edi)
+ leal 16(%edi),%edi
+ paddd 64(%ebp),%xmm0
+ paddd 80(%ebp),%xmm1
+ paddd 96(%ebp),%xmm2
+ paddd 112(%ebp),%xmm3
+ movdqa %xmm0,%xmm6
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm6
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm6,%xmm3
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ movdqu -128(%esi),%xmm4
+ movdqu -64(%esi),%xmm5
+ movdqu (%esi),%xmm2
+ movdqu 64(%esi),%xmm7
+ leal 208(%esi),%esi
+ pxor %xmm0,%xmm4
+ pxor %xmm1,%xmm5
+ pxor %xmm2,%xmm6
+ pxor %xmm3,%xmm7
+ movdqu %xmm4,-128(%edi)
+ movdqu %xmm5,-64(%edi)
+ movdqu %xmm6,(%edi)
+ movdqu %xmm7,64(%edi)
+ leal 208(%edi),%edi
+ subl $256,%ecx
+ jnc .L009outer_loop
+ addl $256,%ecx
+ jz .L011done
+ movl 520(%esp),%ebx
+ leal -128(%esi),%esi
+ movl 516(%esp),%edx
+ leal -128(%edi),%edi
+ movd 64(%ebp),%xmm2
+ movdqu (%ebx),%xmm3
+ paddd 96(%eax),%xmm2
+ pand 112(%eax),%xmm3
+ por %xmm2,%xmm3
+.L0081x:
+ movdqa 32(%eax),%xmm0
+ movdqu (%edx),%xmm1
+ movdqu 16(%edx),%xmm2
+ movdqa (%eax),%xmm6
+ movdqa 16(%eax),%xmm7
+ movl %ebp,48(%esp)
+ movdqa %xmm0,(%esp)
+ movdqa %xmm1,16(%esp)
+ movdqa %xmm2,32(%esp)
+ movdqa %xmm3,48(%esp)
+ movl $10,%edx
+ jmp .L012loop1x
+.align 16
+.L013outer1x:
+ movdqa 80(%eax),%xmm3
+ movdqa (%esp),%xmm0
+ movdqa 16(%esp),%xmm1
+ movdqa 32(%esp),%xmm2
+ paddd 48(%esp),%xmm3
+ movl $10,%edx
+ movdqa %xmm3,48(%esp)
+ jmp .L012loop1x
+.align 16
+.L012loop1x:
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,222
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $20,%xmm1
+ pslld $12,%xmm4
+ por %xmm4,%xmm1
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,223
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $25,%xmm1
+ pslld $7,%xmm4
+ por %xmm4,%xmm1
+ pshufd $78,%xmm2,%xmm2
+ pshufd $57,%xmm1,%xmm1
+ pshufd $147,%xmm3,%xmm3
+ nop
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,222
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $20,%xmm1
+ pslld $12,%xmm4
+ por %xmm4,%xmm1
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,223
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $25,%xmm1
+ pslld $7,%xmm4
+ por %xmm4,%xmm1
+ pshufd $78,%xmm2,%xmm2
+ pshufd $147,%xmm1,%xmm1
+ pshufd $57,%xmm3,%xmm3
+ decl %edx
+ jnz .L012loop1x
+ paddd (%esp),%xmm0
+ paddd 16(%esp),%xmm1
+ paddd 32(%esp),%xmm2
+ paddd 48(%esp),%xmm3
+ cmpl $64,%ecx
+ jb .L014tail
+ movdqu (%esi),%xmm4
+ movdqu 16(%esi),%xmm5
+ pxor %xmm4,%xmm0
+ movdqu 32(%esi),%xmm4
+ pxor %xmm5,%xmm1
+ movdqu 48(%esi),%xmm5
+ pxor %xmm4,%xmm2
+ pxor %xmm5,%xmm3
+ leal 64(%esi),%esi
+ movdqu %xmm0,(%edi)
+ movdqu %xmm1,16(%edi)
+ movdqu %xmm2,32(%edi)
+ movdqu %xmm3,48(%edi)
+ leal 64(%edi),%edi
+ subl $64,%ecx
+ jnz .L013outer1x
+ jmp .L011done
+.L014tail:
+ movdqa %xmm0,(%esp)
+ movdqa %xmm1,16(%esp)
+ movdqa %xmm2,32(%esp)
+ movdqa %xmm3,48(%esp)
+ xorl %eax,%eax
+ xorl %edx,%edx
+ xorl %ebp,%ebp
+.L015tail_loop:
+ movb (%esp,%ebp,1),%al
+ movb (%esi,%ebp,1),%dl
+ leal 1(%ebp),%ebp
+ xorb %dl,%al
+ movb %al,-1(%edi,%ebp,1)
+ decl %ecx
+ jnz .L015tail_loop
+.L011done:
+ movl 512(%esp),%esp
+ popl %edi
+ popl %esi
+ popl %ebx
+ popl %ebp
+ ret
+.size ChaCha20_ssse3,.-.L_ChaCha20_ssse3_begin
+.align 64
+.Lssse3_data:
+.byte 2,3,0,1,6,7,4,5,10,11,8,9,14,15,12,13
+.byte 3,0,1,2,7,4,5,6,11,8,9,10,15,12,13,14
+.long 1634760805,857760878,2036477234,1797285236
+.long 0,1,2,3
+.long 4,4,4,4
+.long 1,0,0,0
+.long 4,0,0,0
+.long 0,-1,-1,-1
+.align 64
+.byte 67,104,97,67,104,97,50,48,32,102,111,114,32,120,56,54
+.byte 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
+.byte 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
+.byte 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 24a8dd4..0000000
--- 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/rc4/rc4-586.S b/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S
index a5cce47..d245589 100644
--- a/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S
+++ b/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S
@@ -347,39 +347,4 @@
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
index 808ccac..58d0bc1 100644
--- a/third_party/boringssl/linux-x86/crypto/sha/sha1-586.S
+++ b/third_party/boringssl/linux-x86/crypto/sha/sha1-586.S
@@ -23,8 +23,11 @@
movl 8(%esi),%ecx
testl $16777216,%eax
jz .L001x86
- testl $536870912,%ecx
- jnz .Lshaext_shortcut
+ andl $268435456,%edx
+ andl $1073741824,%eax
+ orl %edx,%eax
+ cmpl $1342177280,%eax
+ je .Lavx_shortcut
jmp .Lssse3_shortcut
.align 16
.L001x86:
@@ -1393,177 +1396,6 @@
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
@@ -1572,10 +1404,10 @@
pushl %ebx
pushl %esi
pushl %edi
- call .L005pic_point
-.L005pic_point:
+ call .L003pic_point
+.L003pic_point:
popl %ebp
- leal .LK_XX_XX-.L005pic_point(%ebp),%ebp
+ leal .LK_XX_XX-.L003pic_point(%ebp),%ebp
.Lssse3_shortcut:
movdqa (%ebp),%xmm7
movdqa 16(%ebp),%xmm0
@@ -1628,9 +1460,9 @@
xorl %edx,%ebp
pshufd $238,%xmm0,%xmm4
andl %ebp,%esi
- jmp .L006loop
+ jmp .L004loop
.align 16
-.L006loop:
+.L004loop:
rorl $2,%ebx
xorl %edx,%esi
movl %eax,%ebp
@@ -2533,7 +2365,7 @@
addl %edx,%ecx
movl 196(%esp),%ebp
cmpl 200(%esp),%ebp
- je .L007done
+ je .L005done
movdqa 160(%esp),%xmm7
movdqa 176(%esp),%xmm6
movdqu (%ebp),%xmm0
@@ -2668,9 +2500,9 @@
pshufd $238,%xmm0,%xmm4
andl %ebx,%esi
movl %ebp,%ebx
- jmp .L006loop
+ jmp .L004loop
.align 16
-.L007done:
+.L005done:
addl 16(%esp),%ebx
xorl %edi,%esi
movl %ecx,%ebp
@@ -2784,6 +2616,1177 @@
popl %ebp
ret
.size _sha1_block_data_order_ssse3,.-_sha1_block_data_order_ssse3
+.hidden _sha1_block_data_order_avx
+.type _sha1_block_data_order_avx,@function
+.align 16
+_sha1_block_data_order_avx:
+ pushl %ebp
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+ call .L006pic_point
+.L006pic_point:
+ popl %ebp
+ leal .LK_XX_XX-.L006pic_point(%ebp),%ebp
+.Lavx_shortcut:
+ vzeroall
+ vmovdqa (%ebp),%xmm7
+ vmovdqa 16(%ebp),%xmm0
+ vmovdqa 32(%ebp),%xmm1
+ vmovdqa 48(%ebp),%xmm2
+ vmovdqa 64(%ebp),%xmm6
+ movl 20(%esp),%edi
+ movl 24(%esp),%ebp
+ movl 28(%esp),%edx
+ movl %esp,%esi
+ subl $208,%esp
+ andl $-64,%esp
+ vmovdqa %xmm0,112(%esp)
+ vmovdqa %xmm1,128(%esp)
+ vmovdqa %xmm2,144(%esp)
+ shll $6,%edx
+ vmovdqa %xmm7,160(%esp)
+ addl %ebp,%edx
+ vmovdqa %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
+ vmovdqu -64(%ebp),%xmm0
+ vmovdqu -48(%ebp),%xmm1
+ vmovdqu -32(%ebp),%xmm2
+ vmovdqu -16(%ebp),%xmm3
+ vpshufb %xmm6,%xmm0,%xmm0
+ vpshufb %xmm6,%xmm1,%xmm1
+ vpshufb %xmm6,%xmm2,%xmm2
+ vmovdqa %xmm7,96(%esp)
+ vpshufb %xmm6,%xmm3,%xmm3
+ vpaddd %xmm7,%xmm0,%xmm4
+ vpaddd %xmm7,%xmm1,%xmm5
+ vpaddd %xmm7,%xmm2,%xmm6
+ vmovdqa %xmm4,(%esp)
+ movl %ecx,%ebp
+ vmovdqa %xmm5,16(%esp)
+ xorl %edx,%ebp
+ vmovdqa %xmm6,32(%esp)
+ andl %ebp,%esi
+ jmp .L007loop
+.align 16
+.L007loop:
+ shrdl $2,%ebx,%ebx
+ xorl %edx,%esi
+ vpalignr $8,%xmm0,%xmm1,%xmm4
+ movl %eax,%ebp
+ addl (%esp),%edi
+ vpaddd %xmm3,%xmm7,%xmm7
+ vmovdqa %xmm0,64(%esp)
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpsrldq $4,%xmm3,%xmm6
+ addl %esi,%edi
+ andl %ebx,%ebp
+ vpxor %xmm0,%xmm4,%xmm4
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ vpxor %xmm2,%xmm6,%xmm6
+ shrdl $7,%eax,%eax
+ xorl %ecx,%ebp
+ vmovdqa %xmm7,48(%esp)
+ movl %edi,%esi
+ addl 4(%esp),%edx
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ebx,%eax
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ andl %eax,%esi
+ vpsrld $31,%xmm4,%xmm6
+ xorl %ebx,%eax
+ addl %edi,%edx
+ shrdl $7,%edi,%edi
+ xorl %ebx,%esi
+ vpslldq $12,%xmm4,%xmm0
+ vpaddd %xmm4,%xmm4,%xmm4
+ movl %edx,%ebp
+ addl 8(%esp),%ecx
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ vpsrld $30,%xmm0,%xmm7
+ vpor %xmm6,%xmm4,%xmm4
+ addl %esi,%ecx
+ andl %edi,%ebp
+ xorl %eax,%edi
+ addl %edx,%ecx
+ vpslld $2,%xmm0,%xmm0
+ shrdl $7,%edx,%edx
+ xorl %eax,%ebp
+ vpxor %xmm7,%xmm4,%xmm4
+ movl %ecx,%esi
+ addl 12(%esp),%ebx
+ xorl %edi,%edx
+ shldl $5,%ecx,%ecx
+ vpxor %xmm0,%xmm4,%xmm4
+ addl %ebp,%ebx
+ andl %edx,%esi
+ vmovdqa 96(%esp),%xmm0
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ shrdl $7,%ecx,%ecx
+ xorl %edi,%esi
+ vpalignr $8,%xmm1,%xmm2,%xmm5
+ movl %ebx,%ebp
+ addl 16(%esp),%eax
+ vpaddd %xmm4,%xmm0,%xmm0
+ vmovdqa %xmm1,80(%esp)
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vpsrldq $4,%xmm4,%xmm7
+ addl %esi,%eax
+ andl %ecx,%ebp
+ vpxor %xmm1,%xmm5,%xmm5
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpxor %xmm3,%xmm7,%xmm7
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%ebp
+ vmovdqa %xmm0,(%esp)
+ movl %eax,%esi
+ addl 20(%esp),%edi
+ vpxor %xmm7,%xmm5,%xmm5
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ andl %ebx,%esi
+ vpsrld $31,%xmm5,%xmm7
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ shrdl $7,%eax,%eax
+ xorl %ecx,%esi
+ vpslldq $12,%xmm5,%xmm1
+ vpaddd %xmm5,%xmm5,%xmm5
+ movl %edi,%ebp
+ addl 24(%esp),%edx
+ xorl %ebx,%eax
+ shldl $5,%edi,%edi
+ vpsrld $30,%xmm1,%xmm0
+ vpor %xmm7,%xmm5,%xmm5
+ addl %esi,%edx
+ andl %eax,%ebp
+ xorl %ebx,%eax
+ addl %edi,%edx
+ vpslld $2,%xmm1,%xmm1
+ shrdl $7,%edi,%edi
+ xorl %ebx,%ebp
+ vpxor %xmm0,%xmm5,%xmm5
+ movl %edx,%esi
+ addl 28(%esp),%ecx
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ vpxor %xmm1,%xmm5,%xmm5
+ addl %ebp,%ecx
+ andl %edi,%esi
+ vmovdqa 112(%esp),%xmm1
+ xorl %eax,%edi
+ addl %edx,%ecx
+ shrdl $7,%edx,%edx
+ xorl %eax,%esi
+ vpalignr $8,%xmm2,%xmm3,%xmm6
+ movl %ecx,%ebp
+ addl 32(%esp),%ebx
+ vpaddd %xmm5,%xmm1,%xmm1
+ vmovdqa %xmm2,96(%esp)
+ xorl %edi,%edx
+ shldl $5,%ecx,%ecx
+ vpsrldq $4,%xmm5,%xmm0
+ addl %esi,%ebx
+ andl %edx,%ebp
+ vpxor %xmm2,%xmm6,%xmm6
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ vpxor %xmm4,%xmm0,%xmm0
+ shrdl $7,%ecx,%ecx
+ xorl %edi,%ebp
+ vmovdqa %xmm1,16(%esp)
+ movl %ebx,%esi
+ addl 36(%esp),%eax
+ vpxor %xmm0,%xmm6,%xmm6
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ andl %ecx,%esi
+ vpsrld $31,%xmm6,%xmm0
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%esi
+ vpslldq $12,%xmm6,%xmm2
+ vpaddd %xmm6,%xmm6,%xmm6
+ movl %eax,%ebp
+ addl 40(%esp),%edi
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpsrld $30,%xmm2,%xmm1
+ vpor %xmm0,%xmm6,%xmm6
+ addl %esi,%edi
+ andl %ebx,%ebp
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ vpslld $2,%xmm2,%xmm2
+ vmovdqa 64(%esp),%xmm0
+ shrdl $7,%eax,%eax
+ xorl %ecx,%ebp
+ vpxor %xmm1,%xmm6,%xmm6
+ movl %edi,%esi
+ addl 44(%esp),%edx
+ xorl %ebx,%eax
+ shldl $5,%edi,%edi
+ vpxor %xmm2,%xmm6,%xmm6
+ addl %ebp,%edx
+ andl %eax,%esi
+ vmovdqa 112(%esp),%xmm2
+ xorl %ebx,%eax
+ addl %edi,%edx
+ shrdl $7,%edi,%edi
+ xorl %ebx,%esi
+ vpalignr $8,%xmm3,%xmm4,%xmm7
+ movl %edx,%ebp
+ addl 48(%esp),%ecx
+ vpaddd %xmm6,%xmm2,%xmm2
+ vmovdqa %xmm3,64(%esp)
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ vpsrldq $4,%xmm6,%xmm1
+ addl %esi,%ecx
+ andl %edi,%ebp
+ vpxor %xmm3,%xmm7,%xmm7
+ xorl %eax,%edi
+ addl %edx,%ecx
+ vpxor %xmm5,%xmm1,%xmm1
+ shrdl $7,%edx,%edx
+ xorl %eax,%ebp
+ vmovdqa %xmm2,32(%esp)
+ movl %ecx,%esi
+ addl 52(%esp),%ebx
+ vpxor %xmm1,%xmm7,%xmm7
+ xorl %edi,%edx
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ andl %edx,%esi
+ vpsrld $31,%xmm7,%xmm1
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ shrdl $7,%ecx,%ecx
+ xorl %edi,%esi
+ vpslldq $12,%xmm7,%xmm3
+ vpaddd %xmm7,%xmm7,%xmm7
+ movl %ebx,%ebp
+ addl 56(%esp),%eax
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vpsrld $30,%xmm3,%xmm2
+ vpor %xmm1,%xmm7,%xmm7
+ addl %esi,%eax
+ andl %ecx,%ebp
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpslld $2,%xmm3,%xmm3
+ vmovdqa 80(%esp),%xmm1
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%ebp
+ vpxor %xmm2,%xmm7,%xmm7
+ movl %eax,%esi
+ addl 60(%esp),%edi
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpxor %xmm3,%xmm7,%xmm7
+ addl %ebp,%edi
+ andl %ebx,%esi
+ vmovdqa 112(%esp),%xmm3
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ vpalignr $8,%xmm6,%xmm7,%xmm2
+ vpxor %xmm4,%xmm0,%xmm0
+ shrdl $7,%eax,%eax
+ xorl %ecx,%esi
+ movl %edi,%ebp
+ addl (%esp),%edx
+ vpxor %xmm1,%xmm0,%xmm0
+ vmovdqa %xmm4,80(%esp)
+ xorl %ebx,%eax
+ shldl $5,%edi,%edi
+ vmovdqa %xmm3,%xmm4
+ vpaddd %xmm7,%xmm3,%xmm3
+ addl %esi,%edx
+ andl %eax,%ebp
+ vpxor %xmm2,%xmm0,%xmm0
+ xorl %ebx,%eax
+ addl %edi,%edx
+ shrdl $7,%edi,%edi
+ xorl %ebx,%ebp
+ vpsrld $30,%xmm0,%xmm2
+ vmovdqa %xmm3,48(%esp)
+ movl %edx,%esi
+ addl 4(%esp),%ecx
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ vpslld $2,%xmm0,%xmm0
+ addl %ebp,%ecx
+ andl %edi,%esi
+ xorl %eax,%edi
+ addl %edx,%ecx
+ shrdl $7,%edx,%edx
+ xorl %eax,%esi
+ movl %ecx,%ebp
+ addl 8(%esp),%ebx
+ vpor %xmm2,%xmm0,%xmm0
+ xorl %edi,%edx
+ shldl $5,%ecx,%ecx
+ vmovdqa 96(%esp),%xmm2
+ addl %esi,%ebx
+ andl %edx,%ebp
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ addl 12(%esp),%eax
+ xorl %edi,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpalignr $8,%xmm7,%xmm0,%xmm3
+ vpxor %xmm5,%xmm1,%xmm1
+ addl 16(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ vpxor %xmm2,%xmm1,%xmm1
+ vmovdqa %xmm5,96(%esp)
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ vmovdqa %xmm4,%xmm5
+ vpaddd %xmm0,%xmm4,%xmm4
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpxor %xmm3,%xmm1,%xmm1
+ addl 20(%esp),%edx
+ xorl %ebx,%ebp
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ vpsrld $30,%xmm1,%xmm3
+ vmovdqa %xmm4,(%esp)
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpslld $2,%xmm1,%xmm1
+ addl 24(%esp),%ecx
+ xorl %eax,%esi
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpor %xmm3,%xmm1,%xmm1
+ addl 28(%esp),%ebx
+ xorl %edi,%ebp
+ vmovdqa 64(%esp),%xmm3
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpalignr $8,%xmm0,%xmm1,%xmm4
+ vpxor %xmm6,%xmm2,%xmm2
+ addl 32(%esp),%eax
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ vpxor %xmm3,%xmm2,%xmm2
+ vmovdqa %xmm6,64(%esp)
+ addl %esi,%eax
+ xorl %edx,%ebp
+ vmovdqa 128(%esp),%xmm6
+ vpaddd %xmm1,%xmm5,%xmm5
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpxor %xmm4,%xmm2,%xmm2
+ addl 36(%esp),%edi
+ xorl %ecx,%ebp
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ vpsrld $30,%xmm2,%xmm4
+ vmovdqa %xmm5,16(%esp)
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpslld $2,%xmm2,%xmm2
+ addl 40(%esp),%edx
+ xorl %ebx,%esi
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpor %xmm4,%xmm2,%xmm2
+ addl 44(%esp),%ecx
+ xorl %eax,%ebp
+ vmovdqa 80(%esp),%xmm4
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpalignr $8,%xmm1,%xmm2,%xmm5
+ vpxor %xmm7,%xmm3,%xmm3
+ addl 48(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ vpxor %xmm4,%xmm3,%xmm3
+ vmovdqa %xmm7,80(%esp)
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ vmovdqa %xmm6,%xmm7
+ vpaddd %xmm2,%xmm6,%xmm6
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpxor %xmm5,%xmm3,%xmm3
+ addl 52(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ vpsrld $30,%xmm3,%xmm5
+ vmovdqa %xmm6,32(%esp)
+ addl %ebp,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpslld $2,%xmm3,%xmm3
+ addl 56(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpor %xmm5,%xmm3,%xmm3
+ addl 60(%esp),%edx
+ xorl %ebx,%ebp
+ vmovdqa 96(%esp),%xmm5
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpalignr $8,%xmm2,%xmm3,%xmm6
+ vpxor %xmm0,%xmm4,%xmm4
+ addl (%esp),%ecx
+ xorl %eax,%esi
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ vpxor %xmm5,%xmm4,%xmm4
+ vmovdqa %xmm0,96(%esp)
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ vmovdqa %xmm7,%xmm0
+ vpaddd %xmm3,%xmm7,%xmm7
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpxor %xmm6,%xmm4,%xmm4
+ addl 4(%esp),%ebx
+ xorl %edi,%ebp
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ vpsrld $30,%xmm4,%xmm6
+ vmovdqa %xmm7,48(%esp)
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpslld $2,%xmm4,%xmm4
+ addl 8(%esp),%eax
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%ebp
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpor %xmm6,%xmm4,%xmm4
+ addl 12(%esp),%edi
+ xorl %ecx,%ebp
+ vmovdqa 64(%esp),%xmm6
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpalignr $8,%xmm3,%xmm4,%xmm7
+ vpxor %xmm1,%xmm5,%xmm5
+ addl 16(%esp),%edx
+ xorl %ebx,%esi
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ vpxor %xmm6,%xmm5,%xmm5
+ vmovdqa %xmm1,64(%esp)
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ vmovdqa %xmm0,%xmm1
+ vpaddd %xmm4,%xmm0,%xmm0
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpxor %xmm7,%xmm5,%xmm5
+ addl 20(%esp),%ecx
+ xorl %eax,%ebp
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ vpsrld $30,%xmm5,%xmm7
+ vmovdqa %xmm0,(%esp)
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpslld $2,%xmm5,%xmm5
+ addl 24(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpor %xmm7,%xmm5,%xmm5
+ addl 28(%esp),%eax
+ vmovdqa 80(%esp),%xmm7
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ xorl %edx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %ecx,%esi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpalignr $8,%xmm4,%xmm5,%xmm0
+ vpxor %xmm2,%xmm6,%xmm6
+ addl 32(%esp),%edi
+ andl %ecx,%esi
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ vpxor %xmm7,%xmm6,%xmm6
+ vmovdqa %xmm2,80(%esp)
+ movl %eax,%ebp
+ xorl %ecx,%esi
+ vmovdqa %xmm1,%xmm2
+ vpaddd %xmm5,%xmm1,%xmm1
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ vpxor %xmm0,%xmm6,%xmm6
+ xorl %ebx,%ebp
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ addl 36(%esp),%edx
+ vpsrld $30,%xmm6,%xmm0
+ vmovdqa %xmm1,16(%esp)
+ andl %ebx,%ebp
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %edi,%esi
+ vpslld $2,%xmm6,%xmm6
+ xorl %ebx,%ebp
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %eax,%esi
+ xorl %ebx,%eax
+ addl %edi,%edx
+ addl 40(%esp),%ecx
+ andl %eax,%esi
+ vpor %xmm0,%xmm6,%xmm6
+ xorl %ebx,%eax
+ shrdl $7,%edi,%edi
+ vmovdqa 96(%esp),%xmm0
+ movl %edx,%ebp
+ xorl %eax,%esi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %edi,%ebp
+ xorl %eax,%edi
+ addl %edx,%ecx
+ addl 44(%esp),%ebx
+ andl %edi,%ebp
+ xorl %eax,%edi
+ shrdl $7,%edx,%edx
+ movl %ecx,%esi
+ xorl %edi,%ebp
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edx,%esi
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ vpalignr $8,%xmm5,%xmm6,%xmm1
+ vpxor %xmm3,%xmm7,%xmm7
+ addl 48(%esp),%eax
+ andl %edx,%esi
+ xorl %edi,%edx
+ shrdl $7,%ecx,%ecx
+ vpxor %xmm0,%xmm7,%xmm7
+ vmovdqa %xmm3,96(%esp)
+ movl %ebx,%ebp
+ xorl %edx,%esi
+ vmovdqa 144(%esp),%xmm3
+ vpaddd %xmm6,%xmm2,%xmm2
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ vpxor %xmm1,%xmm7,%xmm7
+ xorl %ecx,%ebp
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 52(%esp),%edi
+ vpsrld $30,%xmm7,%xmm1
+ vmovdqa %xmm2,32(%esp)
+ andl %ecx,%ebp
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%esi
+ vpslld $2,%xmm7,%xmm7
+ xorl %ecx,%ebp
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ addl 56(%esp),%edx
+ andl %ebx,%esi
+ vpor %xmm1,%xmm7,%xmm7
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ vmovdqa 64(%esp),%xmm1
+ movl %edi,%ebp
+ xorl %ebx,%esi
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ xorl %eax,%ebp
+ xorl %ebx,%eax
+ addl %edi,%edx
+ addl 60(%esp),%ecx
+ andl %eax,%ebp
+ xorl %ebx,%eax
+ shrdl $7,%edi,%edi
+ movl %edx,%esi
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %edi,%esi
+ xorl %eax,%edi
+ addl %edx,%ecx
+ vpalignr $8,%xmm6,%xmm7,%xmm2
+ vpxor %xmm4,%xmm0,%xmm0
+ addl (%esp),%ebx
+ andl %edi,%esi
+ xorl %eax,%edi
+ shrdl $7,%edx,%edx
+ vpxor %xmm1,%xmm0,%xmm0
+ vmovdqa %xmm4,64(%esp)
+ movl %ecx,%ebp
+ xorl %edi,%esi
+ vmovdqa %xmm3,%xmm4
+ vpaddd %xmm7,%xmm3,%xmm3
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ vpxor %xmm2,%xmm0,%xmm0
+ xorl %edx,%ebp
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ addl 4(%esp),%eax
+ vpsrld $30,%xmm0,%xmm2
+ vmovdqa %xmm3,48(%esp)
+ andl %edx,%ebp
+ xorl %edi,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ vpslld $2,%xmm0,%xmm0
+ xorl %edx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %ecx,%esi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 8(%esp),%edi
+ andl %ecx,%esi
+ vpor %xmm2,%xmm0,%xmm0
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ vmovdqa 80(%esp),%xmm2
+ movl %eax,%ebp
+ xorl %ecx,%esi
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ xorl %ebx,%ebp
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ addl 12(%esp),%edx
+ andl %ebx,%ebp
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %edi,%esi
+ xorl %ebx,%ebp
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %eax,%esi
+ xorl %ebx,%eax
+ addl %edi,%edx
+ vpalignr $8,%xmm7,%xmm0,%xmm3
+ vpxor %xmm5,%xmm1,%xmm1
+ addl 16(%esp),%ecx
+ andl %eax,%esi
+ xorl %ebx,%eax
+ shrdl $7,%edi,%edi
+ vpxor %xmm2,%xmm1,%xmm1
+ vmovdqa %xmm5,80(%esp)
+ movl %edx,%ebp
+ xorl %eax,%esi
+ vmovdqa %xmm4,%xmm5
+ vpaddd %xmm0,%xmm4,%xmm4
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ vpxor %xmm3,%xmm1,%xmm1
+ xorl %edi,%ebp
+ xorl %eax,%edi
+ addl %edx,%ecx
+ addl 20(%esp),%ebx
+ vpsrld $30,%xmm1,%xmm3
+ vmovdqa %xmm4,(%esp)
+ andl %edi,%ebp
+ xorl %eax,%edi
+ shrdl $7,%edx,%edx
+ movl %ecx,%esi
+ vpslld $2,%xmm1,%xmm1
+ xorl %edi,%ebp
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edx,%esi
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ addl 24(%esp),%eax
+ andl %edx,%esi
+ vpor %xmm3,%xmm1,%xmm1
+ xorl %edi,%edx
+ shrdl $7,%ecx,%ecx
+ vmovdqa 96(%esp),%xmm3
+ movl %ebx,%ebp
+ xorl %edx,%esi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %ecx,%ebp
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 28(%esp),%edi
+ andl %ecx,%ebp
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%esi
+ xorl %ecx,%ebp
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ vpalignr $8,%xmm0,%xmm1,%xmm4
+ vpxor %xmm6,%xmm2,%xmm2
+ addl 32(%esp),%edx
+ andl %ebx,%esi
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ vpxor %xmm3,%xmm2,%xmm2
+ vmovdqa %xmm6,96(%esp)
+ movl %edi,%ebp
+ xorl %ebx,%esi
+ vmovdqa %xmm5,%xmm6
+ vpaddd %xmm1,%xmm5,%xmm5
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ vpxor %xmm4,%xmm2,%xmm2
+ xorl %eax,%ebp
+ xorl %ebx,%eax
+ addl %edi,%edx
+ addl 36(%esp),%ecx
+ vpsrld $30,%xmm2,%xmm4
+ vmovdqa %xmm5,16(%esp)
+ andl %eax,%ebp
+ xorl %ebx,%eax
+ shrdl $7,%edi,%edi
+ movl %edx,%esi
+ vpslld $2,%xmm2,%xmm2
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %edi,%esi
+ xorl %eax,%edi
+ addl %edx,%ecx
+ addl 40(%esp),%ebx
+ andl %edi,%esi
+ vpor %xmm4,%xmm2,%xmm2
+ xorl %eax,%edi
+ shrdl $7,%edx,%edx
+ vmovdqa 64(%esp),%xmm4
+ movl %ecx,%ebp
+ xorl %edi,%esi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edx,%ebp
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ addl 44(%esp),%eax
+ andl %edx,%ebp
+ xorl %edi,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ xorl %edx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %edx,%esi
+ addl %ebx,%eax
+ vpalignr $8,%xmm1,%xmm2,%xmm5
+ vpxor %xmm7,%xmm3,%xmm3
+ addl 48(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ vpxor %xmm4,%xmm3,%xmm3
+ vmovdqa %xmm7,64(%esp)
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ vmovdqa %xmm6,%xmm7
+ vpaddd %xmm2,%xmm6,%xmm6
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpxor %xmm5,%xmm3,%xmm3
+ addl 52(%esp),%edx
+ xorl %ebx,%ebp
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ vpsrld $30,%xmm3,%xmm5
+ vmovdqa %xmm6,32(%esp)
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpslld $2,%xmm3,%xmm3
+ addl 56(%esp),%ecx
+ xorl %eax,%esi
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpor %xmm5,%xmm3,%xmm3
+ addl 60(%esp),%ebx
+ xorl %edi,%ebp
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl (%esp),%eax
+ vpaddd %xmm3,%xmm7,%xmm7
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ vmovdqa %xmm7,48(%esp)
+ xorl %edx,%ebp
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 4(%esp),%edi
+ xorl %ecx,%ebp
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 8(%esp),%edx
+ xorl %ebx,%esi
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ addl 12(%esp),%ecx
+ xorl %eax,%ebp
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ movl 196(%esp),%ebp
+ cmpl 200(%esp),%ebp
+ je .L008done
+ vmovdqa 160(%esp),%xmm7
+ vmovdqa 176(%esp),%xmm6
+ vmovdqu (%ebp),%xmm0
+ vmovdqu 16(%ebp),%xmm1
+ vmovdqu 32(%ebp),%xmm2
+ vmovdqu 48(%ebp),%xmm3
+ addl $64,%ebp
+ vpshufb %xmm6,%xmm0,%xmm0
+ movl %ebp,196(%esp)
+ vmovdqa %xmm7,96(%esp)
+ addl 16(%esp),%ebx
+ xorl %edi,%esi
+ vpshufb %xmm6,%xmm1,%xmm1
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ vpaddd %xmm7,%xmm0,%xmm4
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vmovdqa %xmm4,(%esp)
+ addl 20(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 24(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 28(%esp),%edx
+ xorl %ebx,%ebp
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ addl 32(%esp),%ecx
+ xorl %eax,%esi
+ vpshufb %xmm6,%xmm2,%xmm2
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ vpaddd %xmm7,%xmm1,%xmm5
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vmovdqa %xmm5,16(%esp)
+ addl 36(%esp),%ebx
+ xorl %edi,%ebp
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 40(%esp),%eax
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%ebp
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 44(%esp),%edi
+ xorl %ecx,%ebp
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 48(%esp),%edx
+ xorl %ebx,%esi
+ vpshufb %xmm6,%xmm3,%xmm3
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ vpaddd %xmm7,%xmm2,%xmm6
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vmovdqa %xmm6,32(%esp)
+ addl 52(%esp),%ecx
+ xorl %eax,%ebp
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ addl 56(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 60(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ shrdl $7,%ecx,%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,%ebx
+ movl %ecx,8(%ebp)
+ xorl %edx,%ebx
+ movl %edx,12(%ebp)
+ movl %edi,16(%ebp)
+ movl %esi,%ebp
+ andl %ebx,%esi
+ movl %ebp,%ebx
+ jmp .L007loop
+.align 16
+.L008done:
+ addl 16(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 20(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 24(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 28(%esp),%edx
+ xorl %ebx,%ebp
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ addl 32(%esp),%ecx
+ xorl %eax,%esi
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ addl 36(%esp),%ebx
+ xorl %edi,%ebp
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 40(%esp),%eax
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%ebp
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 44(%esp),%edi
+ xorl %ecx,%ebp
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 48(%esp),%edx
+ xorl %ebx,%esi
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ addl 52(%esp),%ecx
+ xorl %eax,%ebp
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ addl 56(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 60(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vzeroall
+ 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_avx,.-_sha1_block_data_order_avx
.align 64
.LK_XX_XX:
.long 1518500249,1518500249,1518500249,1518500249
diff --git a/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S b/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S
index 08d9484..38acbd8 100644
--- a/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S
+++ b/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S
@@ -37,11 +37,10 @@
jz .L003no_xmm
andl $1073741824,%ecx
andl $268435968,%ebx
- testl $536870912,%edx
- jnz .L004shaext
orl %ebx,%ecx
andl $1342177280,%ecx
cmpl $1342177280,%ecx
+ je .L004AVX
testl $512,%ebx
jnz .L005SSSE3
.L003no_xmm:
@@ -3167,204 +3166,6 @@
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
@@ -3384,9 +3185,9 @@
movl %ecx,24(%esp)
movl %esi,28(%esp)
movdqa 256(%ebp),%xmm7
- jmp .L011grand_ssse3
+ jmp .L010grand_ssse3
.align 16
-.L011grand_ssse3:
+.L010grand_ssse3:
movdqu (%edi),%xmm0
movdqu 16(%edi),%xmm1
movdqu 32(%edi),%xmm2
@@ -3409,9 +3210,9 @@
paddd %xmm3,%xmm7
movdqa %xmm6,64(%esp)
movdqa %xmm7,80(%esp)
- jmp .L012ssse3_00_47
+ jmp .L011ssse3_00_47
.align 16
-.L012ssse3_00_47:
+.L011ssse3_00_47:
addl $64,%ebp
movl %edx,%ecx
movdqa %xmm1,%xmm4
@@ -4054,7 +3855,7 @@
addl %ecx,%eax
movdqa %xmm6,80(%esp)
cmpl $66051,64(%ebp)
- jne .L012ssse3_00_47
+ jne .L011ssse3_00_47
movl %edx,%ecx
rorl $14,%edx
movl 20(%esp),%esi
@@ -4568,12 +4369,1193 @@
movdqa 64(%ebp),%xmm7
subl $192,%ebp
cmpl 104(%esp),%edi
- jb .L011grand_ssse3
+ jb .L010grand_ssse3
movl 108(%esp),%esp
popl %edi
popl %esi
popl %ebx
popl %ebp
ret
+.align 32
+.L004AVX:
+ leal -96(%esp),%esp
+ vzeroall
+ 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)
+ vmovdqa 256(%ebp),%xmm7
+ jmp .L012grand_avx
+.align 32
+.L012grand_avx:
+ vmovdqu (%edi),%xmm0
+ vmovdqu 16(%edi),%xmm1
+ vmovdqu 32(%edi),%xmm2
+ vmovdqu 48(%edi),%xmm3
+ addl $64,%edi
+ vpshufb %xmm7,%xmm0,%xmm0
+ movl %edi,100(%esp)
+ vpshufb %xmm7,%xmm1,%xmm1
+ vpshufb %xmm7,%xmm2,%xmm2
+ vpaddd (%ebp),%xmm0,%xmm4
+ vpshufb %xmm7,%xmm3,%xmm3
+ vpaddd 16(%ebp),%xmm1,%xmm5
+ vpaddd 32(%ebp),%xmm2,%xmm6
+ vpaddd 48(%ebp),%xmm3,%xmm7
+ vmovdqa %xmm4,32(%esp)
+ vmovdqa %xmm5,48(%esp)
+ vmovdqa %xmm6,64(%esp)
+ vmovdqa %xmm7,80(%esp)
+ jmp .L013avx_00_47
+.align 16
+.L013avx_00_47:
+ addl $64,%ebp
+ vpalignr $4,%xmm0,%xmm1,%xmm4
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 20(%esp),%esi
+ vpalignr $4,%xmm2,%xmm3,%xmm7
+ xorl %ecx,%edx
+ movl 24(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,16(%esp)
+ vpaddd %xmm7,%xmm0,%xmm0
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrld $3,%xmm4,%xmm7
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 4(%esp),%edi
+ vpslld $14,%xmm4,%xmm5
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,(%esp)
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 28(%esp),%edx
+ vpshufd $250,%xmm3,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpsrld $11,%xmm6,%xmm6
+ addl 32(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %edx,%ebx
+ addl 12(%esp),%edx
+ addl %ecx,%ebx
+ vpslld $11,%xmm5,%xmm5
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 16(%esp),%esi
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ecx,%edx
+ movl 20(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $10,%xmm7,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,12(%esp)
+ vpxor %xmm5,%xmm4,%xmm4
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl (%esp),%edi
+ vpaddd %xmm4,%xmm0,%xmm0
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,28(%esp)
+ vpxor %xmm5,%xmm6,%xmm6
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 24(%esp),%edx
+ vpsrlq $19,%xmm7,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ addl 36(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ vpshufd $132,%xmm6,%xmm7
+ addl %edx,%eax
+ addl 8(%esp),%edx
+ addl %ecx,%eax
+ vpsrldq $8,%xmm7,%xmm7
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 12(%esp),%esi
+ vpaddd %xmm7,%xmm0,%xmm0
+ xorl %ecx,%edx
+ movl 16(%esp),%edi
+ xorl %edi,%esi
+ vpshufd $80,%xmm0,%xmm7
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,8(%esp)
+ vpsrld $10,%xmm7,%xmm6
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 28(%esp),%edi
+ vpxor %xmm5,%xmm6,%xmm6
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,24(%esp)
+ vpsrlq $19,%xmm7,%xmm7
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 20(%esp),%edx
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpshufd $232,%xmm6,%xmm7
+ addl 40(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpslldq $8,%xmm7,%xmm7
+ addl %edx,%ebx
+ addl 4(%esp),%edx
+ addl %ecx,%ebx
+ vpaddd %xmm7,%xmm0,%xmm0
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 8(%esp),%esi
+ vpaddd (%ebp),%xmm0,%xmm6
+ xorl %ecx,%edx
+ movl 12(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,4(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 24(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,20(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 16(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 44(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl (%esp),%edx
+ addl %ecx,%eax
+ vmovdqa %xmm6,32(%esp)
+ vpalignr $4,%xmm1,%xmm2,%xmm4
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 4(%esp),%esi
+ vpalignr $4,%xmm3,%xmm0,%xmm7
+ xorl %ecx,%edx
+ movl 8(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,(%esp)
+ vpaddd %xmm7,%xmm1,%xmm1
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrld $3,%xmm4,%xmm7
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 20(%esp),%edi
+ vpslld $14,%xmm4,%xmm5
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,16(%esp)
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 12(%esp),%edx
+ vpshufd $250,%xmm0,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpsrld $11,%xmm6,%xmm6
+ addl 48(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %edx,%ebx
+ addl 28(%esp),%edx
+ addl %ecx,%ebx
+ vpslld $11,%xmm5,%xmm5
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl (%esp),%esi
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ecx,%edx
+ movl 4(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $10,%xmm7,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,28(%esp)
+ vpxor %xmm5,%xmm4,%xmm4
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 16(%esp),%edi
+ vpaddd %xmm4,%xmm1,%xmm1
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,12(%esp)
+ vpxor %xmm5,%xmm6,%xmm6
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 8(%esp),%edx
+ vpsrlq $19,%xmm7,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ addl 52(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ vpshufd $132,%xmm6,%xmm7
+ addl %edx,%eax
+ addl 24(%esp),%edx
+ addl %ecx,%eax
+ vpsrldq $8,%xmm7,%xmm7
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 28(%esp),%esi
+ vpaddd %xmm7,%xmm1,%xmm1
+ xorl %ecx,%edx
+ movl (%esp),%edi
+ xorl %edi,%esi
+ vpshufd $80,%xmm1,%xmm7
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,24(%esp)
+ vpsrld $10,%xmm7,%xmm6
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 12(%esp),%edi
+ vpxor %xmm5,%xmm6,%xmm6
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,8(%esp)
+ vpsrlq $19,%xmm7,%xmm7
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 4(%esp),%edx
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpshufd $232,%xmm6,%xmm7
+ addl 56(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpslldq $8,%xmm7,%xmm7
+ addl %edx,%ebx
+ addl 20(%esp),%edx
+ addl %ecx,%ebx
+ vpaddd %xmm7,%xmm1,%xmm1
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 24(%esp),%esi
+ vpaddd 16(%ebp),%xmm1,%xmm6
+ xorl %ecx,%edx
+ movl 28(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,20(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 8(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,4(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl (%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 60(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 16(%esp),%edx
+ addl %ecx,%eax
+ vmovdqa %xmm6,48(%esp)
+ vpalignr $4,%xmm2,%xmm3,%xmm4
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 20(%esp),%esi
+ vpalignr $4,%xmm0,%xmm1,%xmm7
+ xorl %ecx,%edx
+ movl 24(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,16(%esp)
+ vpaddd %xmm7,%xmm2,%xmm2
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrld $3,%xmm4,%xmm7
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 4(%esp),%edi
+ vpslld $14,%xmm4,%xmm5
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,(%esp)
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 28(%esp),%edx
+ vpshufd $250,%xmm1,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpsrld $11,%xmm6,%xmm6
+ addl 64(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %edx,%ebx
+ addl 12(%esp),%edx
+ addl %ecx,%ebx
+ vpslld $11,%xmm5,%xmm5
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 16(%esp),%esi
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ecx,%edx
+ movl 20(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $10,%xmm7,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,12(%esp)
+ vpxor %xmm5,%xmm4,%xmm4
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl (%esp),%edi
+ vpaddd %xmm4,%xmm2,%xmm2
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,28(%esp)
+ vpxor %xmm5,%xmm6,%xmm6
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 24(%esp),%edx
+ vpsrlq $19,%xmm7,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ addl 68(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ vpshufd $132,%xmm6,%xmm7
+ addl %edx,%eax
+ addl 8(%esp),%edx
+ addl %ecx,%eax
+ vpsrldq $8,%xmm7,%xmm7
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 12(%esp),%esi
+ vpaddd %xmm7,%xmm2,%xmm2
+ xorl %ecx,%edx
+ movl 16(%esp),%edi
+ xorl %edi,%esi
+ vpshufd $80,%xmm2,%xmm7
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,8(%esp)
+ vpsrld $10,%xmm7,%xmm6
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 28(%esp),%edi
+ vpxor %xmm5,%xmm6,%xmm6
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,24(%esp)
+ vpsrlq $19,%xmm7,%xmm7
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 20(%esp),%edx
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpshufd $232,%xmm6,%xmm7
+ addl 72(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpslldq $8,%xmm7,%xmm7
+ addl %edx,%ebx
+ addl 4(%esp),%edx
+ addl %ecx,%ebx
+ vpaddd %xmm7,%xmm2,%xmm2
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 8(%esp),%esi
+ vpaddd 32(%ebp),%xmm2,%xmm6
+ xorl %ecx,%edx
+ movl 12(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,4(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 24(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,20(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 16(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 76(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl (%esp),%edx
+ addl %ecx,%eax
+ vmovdqa %xmm6,64(%esp)
+ vpalignr $4,%xmm3,%xmm0,%xmm4
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 4(%esp),%esi
+ vpalignr $4,%xmm1,%xmm2,%xmm7
+ xorl %ecx,%edx
+ movl 8(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,(%esp)
+ vpaddd %xmm7,%xmm3,%xmm3
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrld $3,%xmm4,%xmm7
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 20(%esp),%edi
+ vpslld $14,%xmm4,%xmm5
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,16(%esp)
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 12(%esp),%edx
+ vpshufd $250,%xmm2,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpsrld $11,%xmm6,%xmm6
+ addl 80(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %edx,%ebx
+ addl 28(%esp),%edx
+ addl %ecx,%ebx
+ vpslld $11,%xmm5,%xmm5
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl (%esp),%esi
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ecx,%edx
+ movl 4(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $10,%xmm7,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,28(%esp)
+ vpxor %xmm5,%xmm4,%xmm4
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 16(%esp),%edi
+ vpaddd %xmm4,%xmm3,%xmm3
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,12(%esp)
+ vpxor %xmm5,%xmm6,%xmm6
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 8(%esp),%edx
+ vpsrlq $19,%xmm7,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ addl 84(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ vpshufd $132,%xmm6,%xmm7
+ addl %edx,%eax
+ addl 24(%esp),%edx
+ addl %ecx,%eax
+ vpsrldq $8,%xmm7,%xmm7
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 28(%esp),%esi
+ vpaddd %xmm7,%xmm3,%xmm3
+ xorl %ecx,%edx
+ movl (%esp),%edi
+ xorl %edi,%esi
+ vpshufd $80,%xmm3,%xmm7
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,24(%esp)
+ vpsrld $10,%xmm7,%xmm6
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 12(%esp),%edi
+ vpxor %xmm5,%xmm6,%xmm6
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,8(%esp)
+ vpsrlq $19,%xmm7,%xmm7
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 4(%esp),%edx
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpshufd $232,%xmm6,%xmm7
+ addl 88(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpslldq $8,%xmm7,%xmm7
+ addl %edx,%ebx
+ addl 20(%esp),%edx
+ addl %ecx,%ebx
+ vpaddd %xmm7,%xmm3,%xmm3
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 24(%esp),%esi
+ vpaddd 48(%ebp),%xmm3,%xmm6
+ xorl %ecx,%edx
+ movl 28(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,20(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 8(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,4(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl (%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 92(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 16(%esp),%edx
+ addl %ecx,%eax
+ vmovdqa %xmm6,80(%esp)
+ cmpl $66051,64(%ebp)
+ jne .L013avx_00_47
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 20(%esp),%esi
+ xorl %ecx,%edx
+ movl 24(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,16(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 4(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 28(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 32(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 12(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 16(%esp),%esi
+ xorl %ecx,%edx
+ movl 20(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,12(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl (%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,28(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 24(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 36(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 8(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 12(%esp),%esi
+ xorl %ecx,%edx
+ movl 16(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,8(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 28(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,24(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 20(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 40(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 4(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 8(%esp),%esi
+ xorl %ecx,%edx
+ movl 12(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,4(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 24(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,20(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 16(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 44(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl (%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 4(%esp),%esi
+ xorl %ecx,%edx
+ movl 8(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 20(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,16(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 12(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 48(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 28(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl (%esp),%esi
+ xorl %ecx,%edx
+ movl 4(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,28(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 16(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,12(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 8(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 52(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 24(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 28(%esp),%esi
+ xorl %ecx,%edx
+ movl (%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,24(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 12(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,8(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 4(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 56(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 20(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 24(%esp),%esi
+ xorl %ecx,%edx
+ movl 28(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,20(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 8(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,4(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl (%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 60(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 16(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 20(%esp),%esi
+ xorl %ecx,%edx
+ movl 24(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,16(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 4(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 28(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 64(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 12(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 16(%esp),%esi
+ xorl %ecx,%edx
+ movl 20(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,12(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl (%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,28(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 24(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 68(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 8(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 12(%esp),%esi
+ xorl %ecx,%edx
+ movl 16(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,8(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 28(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,24(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 20(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 72(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 4(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 8(%esp),%esi
+ xorl %ecx,%edx
+ movl 12(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,4(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 24(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,20(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 16(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 76(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl (%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 4(%esp),%esi
+ xorl %ecx,%edx
+ movl 8(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 20(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,16(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 12(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 80(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 28(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl (%esp),%esi
+ xorl %ecx,%edx
+ movl 4(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,28(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 16(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,12(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 8(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 84(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 24(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 28(%esp),%esi
+ xorl %ecx,%edx
+ movl (%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,24(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 12(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,8(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 4(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 88(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 20(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 24(%esp),%esi
+ xorl %ecx,%edx
+ movl 28(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,20(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 8(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,4(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl (%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 92(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%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
+ vmovdqa 64(%ebp),%xmm7
+ subl $192,%ebp
+ cmpl 104(%esp),%edi
+ jb .L012grand_avx
+ movl 108(%esp),%esp
+ vzeroall
+ 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_64/crypto/aes/aes-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/aes-x86_64.S
index 5f4b057..361e84c 100644
--- 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
@@ -82,8 +82,8 @@
movl 0(%r14,%rdi,8),%edi
movl 0(%r14,%rbp,8),%ebp
- andl $65280,%edi
- andl $65280,%ebp
+ andl $0x0000ff00,%edi
+ andl $0x0000ff00,%ebp
xorl %edi,%r10d
xorl %ebp,%r11d
@@ -95,8 +95,8 @@
movl 0(%r14,%rsi,8),%esi
movl 0(%r14,%rdi,8),%edi
- andl $65280,%esi
- andl $65280,%edi
+ andl $0x0000ff00,%esi
+ andl $0x0000ff00,%edi
shrl $16,%ebx
xorl %esi,%r12d
xorl %edi,%r8d
@@ -109,9 +109,9 @@
movl 0(%r14,%rdi,8),%edi
movl 0(%r14,%rbp,8),%ebp
- andl $16711680,%esi
- andl $16711680,%edi
- andl $16711680,%ebp
+ andl $0x00ff0000,%esi
+ andl $0x00ff0000,%edi
+ andl $0x00ff0000,%ebp
xorl %esi,%r10d
xorl %edi,%r11d
@@ -124,9 +124,9 @@
movl 2(%r14,%rdi,8),%edi
movl 2(%r14,%rbp,8),%ebp
- andl $16711680,%esi
- andl $4278190080,%edi
- andl $4278190080,%ebp
+ andl $0x00ff0000,%esi
+ andl $0xff000000,%edi
+ andl $0xff000000,%ebp
xorl %esi,%r8d
xorl %edi,%r10d
@@ -139,8 +139,8 @@
movl 2(%r14,%rdi,8),%edi
movl 16+0(%r15),%eax
- andl $4278190080,%esi
- andl $4278190080,%edi
+ andl $0xff000000,%esi
+ andl $0xff000000,%edi
xorl %esi,%r12d
xorl %edi,%r8d
@@ -242,8 +242,8 @@
xorl %r8d,%edx
cmpq 16(%rsp),%r15
je .Lenc_compact_done
- movl $2155905152,%r10d
- movl $2155905152,%r11d
+ movl $0x80808080,%r10d
+ movl $0x80808080,%r11d
andl %eax,%r10d
andl %ebx,%r11d
movl %r10d,%esi
@@ -254,10 +254,10 @@
leal (%rbx,%rbx,1),%r9d
subl %r10d,%esi
subl %r11d,%edi
- andl $4278124286,%r8d
- andl $4278124286,%r9d
- andl $454761243,%esi
- andl $454761243,%edi
+ andl $0xfefefefe,%r8d
+ andl $0xfefefefe,%r9d
+ andl $0x1b1b1b1b,%esi
+ andl $0x1b1b1b1b,%edi
movl %eax,%r10d
movl %ebx,%r11d
xorl %esi,%r8d
@@ -265,9 +265,9 @@
xorl %r8d,%eax
xorl %r9d,%ebx
- movl $2155905152,%r12d
+ movl $0x80808080,%r12d
roll $24,%eax
- movl $2155905152,%ebp
+ movl $0x80808080,%ebp
roll $24,%ebx
andl %ecx,%r12d
andl %edx,%ebp
@@ -290,10 +290,10 @@
xorl %r10d,%eax
xorl %r11d,%ebx
- andl $4278124286,%r8d
- andl $4278124286,%r9d
- andl $454761243,%esi
- andl $454761243,%edi
+ andl $0xfefefefe,%r8d
+ andl $0xfefefefe,%r9d
+ andl $0x1b1b1b1b,%esi
+ andl $0x1b1b1b1b,%edi
movl %ecx,%r12d
movl %edx,%ebp
xorl %esi,%r8d
@@ -345,7 +345,7 @@
andq $-64,%rsp
subq %rsp,%rcx
negq %rcx
- andq $960,%rcx
+ andq $0x3c0,%rcx
subq %rcx,%rsp
subq $32,%rsp
@@ -370,7 +370,7 @@
leaq .LAES_Te+2048(%rip),%r14
leaq 768(%rsp),%rbp
subq %r14,%rbp
- andq $768,%rbp
+ andq $0x300,%rbp
leaq (%r14,%rbp,1),%r14
call _x86_64_AES_encrypt_compact
@@ -791,7 +791,7 @@
andq $-64,%rsp
subq %rsp,%rcx
negq %rcx
- andq $960,%rcx
+ andq $0x3c0,%rcx
subq %rcx,%rsp
subq $32,%rsp
@@ -816,7 +816,7 @@
leaq .LAES_Td+2048(%rip),%r14
leaq 768(%rsp),%rbp
subq %r14,%rbp
- andq $768,%rbp
+ andq $0x300,%rbp
leaq (%r14,%rbp,1),%r14
shrq $3,%rbp
addq %rbp,%r14
@@ -1334,9 +1334,9 @@
movq %r14,%r10
leaq 2304(%r14),%r11
movq %r15,%r12
- andq $4095,%r10
- andq $4095,%r11
- andq $4095,%r12
+ andq $0xFFF,%r10
+ andq $0xFFF,%r11
+ andq $0xFFF,%r12
cmpq %r11,%r12
jb .Lcbc_te_break_out
@@ -1345,7 +1345,7 @@
jmp .Lcbc_te_ok
.Lcbc_te_break_out:
subq %r10,%r12
- andq $4095,%r12
+ andq $0xFFF,%r12
addq $320,%r12
subq %r12,%r15
.align 4
@@ -1371,7 +1371,7 @@
movq %r15,%r10
subq %r14,%r10
- andq $4095,%r10
+ andq $0xfff,%r10
cmpq $2304,%r10
jb .Lcbc_do_ecopy
cmpq $4096-248,%r10
@@ -1558,7 +1558,7 @@
leaq -88-63(%rcx),%r10
subq %rbp,%r10
negq %r10
- andq $960,%r10
+ andq $0x3c0,%r10
subq %r10,%rbp
xchgq %rsp,%rbp
@@ -1587,7 +1587,7 @@
leaq 2048(%r14),%r14
leaq 768-8(%rsp),%rax
subq %r14,%rax
- andq $768,%rax
+ andq $0x300,%rax
leaq (%r14,%rax,1),%r14
cmpq $0,%rbx
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
index 1d51d5b..5709a2d 100644
--- 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
@@ -508,7 +508,7 @@
testl %r8d,%r8d
jz .Lecb_decrypt
- cmpq $128,%rdx
+ cmpq $0x80,%rdx
jb .Lecb_enc_tail
movdqu (%rdi),%xmm2
@@ -520,7 +520,7 @@
movdqu 96(%rdi),%xmm8
movdqu 112(%rdi),%xmm9
leaq 128(%rdi),%rdi
- subq $128,%rdx
+ subq $0x80,%rdx
jmp .Lecb_enc_loop8_enter
.align 16
.Lecb_enc_loop8:
@@ -548,7 +548,7 @@
call _aesni_encrypt8
- subq $128,%rdx
+ subq $0x80,%rdx
jnc .Lecb_enc_loop8
movups %xmm2,(%rsi)
@@ -562,22 +562,22 @@
movups %xmm8,96(%rsi)
movups %xmm9,112(%rsi)
leaq 128(%rsi),%rsi
- addq $128,%rdx
+ addq $0x80,%rdx
jz .Lecb_ret
.Lecb_enc_tail:
movups (%rdi),%xmm2
- cmpq $32,%rdx
+ cmpq $0x20,%rdx
jb .Lecb_enc_one
movups 16(%rdi),%xmm3
je .Lecb_enc_two
movups 32(%rdi),%xmm4
- cmpq $64,%rdx
+ cmpq $0x40,%rdx
jb .Lecb_enc_three
movups 48(%rdi),%xmm5
je .Lecb_enc_four
movups 64(%rdi),%xmm6
- cmpq $96,%rdx
+ cmpq $0x60,%rdx
jb .Lecb_enc_five
movups 80(%rdi),%xmm7
je .Lecb_enc_six
@@ -651,7 +651,7 @@
.align 16
.Lecb_decrypt:
- cmpq $128,%rdx
+ cmpq $0x80,%rdx
jb .Lecb_dec_tail
movdqu (%rdi),%xmm2
@@ -663,7 +663,7 @@
movdqu 96(%rdi),%xmm8
movdqu 112(%rdi),%xmm9
leaq 128(%rdi),%rdi
- subq $128,%rdx
+ subq $0x80,%rdx
jmp .Lecb_dec_loop8_enter
.align 16
.Lecb_dec_loop8:
@@ -692,7 +692,7 @@
call _aesni_decrypt8
movups (%r11),%xmm0
- subq $128,%rdx
+ subq $0x80,%rdx
jnc .Lecb_dec_loop8
movups %xmm2,(%rsi)
@@ -714,22 +714,22 @@
movups %xmm9,112(%rsi)
pxor %xmm9,%xmm9
leaq 128(%rsi),%rsi
- addq $128,%rdx
+ addq $0x80,%rdx
jz .Lecb_ret
.Lecb_dec_tail:
movups (%rdi),%xmm2
- cmpq $32,%rdx
+ cmpq $0x20,%rdx
jb .Lecb_dec_one
movups 16(%rdi),%xmm3
je .Lecb_dec_two
movups 32(%rdi),%xmm4
- cmpq $64,%rdx
+ cmpq $0x40,%rdx
jb .Lecb_dec_three
movups 48(%rdi),%xmm5
je .Lecb_dec_four
movups 64(%rdi),%xmm6
- cmpq $96,%rdx
+ cmpq $0x60,%rdx
jb .Lecb_dec_five
movups 80(%rdi),%xmm7
je .Lecb_dec_six
@@ -1607,7 +1607,7 @@
movdqa .Lxts_magic(%rip),%xmm8
movdqa %xmm2,%xmm15
- pshufd $95,%xmm2,%xmm9
+ pshufd $0x5f,%xmm2,%xmm9
pxor %xmm0,%xmm1
movdqa %xmm9,%xmm14
paddd %xmm9,%xmm9
@@ -1706,7 +1706,7 @@
.byte 102,15,56,220,248
movups 64(%r11),%xmm0
movdqa %xmm8,80(%rsp)
- pshufd $95,%xmm15,%xmm9
+ pshufd $0x5f,%xmm15,%xmm9
jmp .Lxts_enc_loop6
.align 32
.Lxts_enc_loop6:
@@ -1845,13 +1845,13 @@
jz .Lxts_enc_done
pxor %xmm0,%xmm11
- cmpq $32,%rdx
+ cmpq $0x20,%rdx
jb .Lxts_enc_one
pxor %xmm0,%xmm12
je .Lxts_enc_two
pxor %xmm0,%xmm13
- cmpq $64,%rdx
+ cmpq $0x40,%rdx
jb .Lxts_enc_three
pxor %xmm0,%xmm14
je .Lxts_enc_four
@@ -2079,7 +2079,7 @@
movdqa .Lxts_magic(%rip),%xmm8
movdqa %xmm2,%xmm15
- pshufd $95,%xmm2,%xmm9
+ pshufd $0x5f,%xmm2,%xmm9
pxor %xmm0,%xmm1
movdqa %xmm9,%xmm14
paddd %xmm9,%xmm9
@@ -2178,7 +2178,7 @@
.byte 102,15,56,222,248
movups 64(%r11),%xmm0
movdqa %xmm8,80(%rsp)
- pshufd $95,%xmm15,%xmm9
+ pshufd $0x5f,%xmm15,%xmm9
jmp .Lxts_dec_loop6
.align 32
.Lxts_dec_loop6:
@@ -2318,13 +2318,13 @@
jz .Lxts_dec_done
pxor %xmm0,%xmm12
- cmpq $32,%rdx
+ cmpq $0x20,%rdx
jb .Lxts_dec_one
pxor %xmm0,%xmm13
je .Lxts_dec_two
pxor %xmm0,%xmm14
- cmpq $64,%rdx
+ cmpq $0x40,%rdx
jb .Lxts_dec_three
je .Lxts_dec_four
@@ -2355,7 +2355,7 @@
pcmpgtd %xmm15,%xmm14
movdqu %xmm6,64(%rsi)
leaq 80(%rsi),%rsi
- pshufd $19,%xmm14,%xmm11
+ pshufd $0x13,%xmm14,%xmm11
andq $15,%r9
jz .Lxts_dec_ret
@@ -2645,7 +2645,7 @@
leaq -8(%rax),%rbp
movups (%r8),%xmm10
movl %r10d,%eax
- cmpq $80,%rdx
+ cmpq $0x50,%rdx
jbe .Lcbc_dec_tail
movups (%rcx),%xmm0
@@ -2661,14 +2661,14 @@
movdqu 80(%rdi),%xmm7
movdqa %xmm6,%xmm15
movl OPENSSL_ia32cap_P+4(%rip),%r9d
- cmpq $112,%rdx
+ cmpq $0x70,%rdx
jbe .Lcbc_dec_six_or_seven
andl $71303168,%r9d
- subq $80,%rdx
+ subq $0x50,%rdx
cmpl $4194304,%r9d
je .Lcbc_dec_loop6_enter
- subq $32,%rdx
+ subq $0x20,%rdx
leaq 112(%rcx),%rcx
jmp .Lcbc_dec_loop8_enter
.align 16
@@ -2683,7 +2683,7 @@
movups 16-112(%rcx),%xmm1
pxor %xmm0,%xmm4
xorq %r11,%r11
- cmpq $112,%rdx
+ cmpq $0x70,%rdx
pxor %xmm0,%xmm5
pxor %xmm0,%xmm6
pxor %xmm0,%xmm7
@@ -2868,21 +2868,21 @@
movups %xmm8,96(%rsi)
leaq 112(%rsi),%rsi
- subq $128,%rdx
+ subq $0x80,%rdx
ja .Lcbc_dec_loop8
movaps %xmm9,%xmm2
leaq -112(%rcx),%rcx
- addq $112,%rdx
+ addq $0x70,%rdx
jle .Lcbc_dec_clear_tail_collected
movups %xmm9,(%rsi)
leaq 16(%rsi),%rsi
- cmpq $80,%rdx
+ cmpq $0x50,%rdx
jbe .Lcbc_dec_tail
movaps %xmm11,%xmm2
.Lcbc_dec_six_or_seven:
- cmpq $96,%rdx
+ cmpq $0x60,%rdx
ja .Lcbc_dec_seven
movaps %xmm7,%xmm8
@@ -2975,33 +2975,33 @@
movl %r10d,%eax
movdqu %xmm6,64(%rsi)
leaq 80(%rsi),%rsi
- subq $96,%rdx
+ subq $0x60,%rdx
ja .Lcbc_dec_loop6
movdqa %xmm7,%xmm2
- addq $80,%rdx
+ addq $0x50,%rdx
jle .Lcbc_dec_clear_tail_collected
movups %xmm7,(%rsi)
leaq 16(%rsi),%rsi
.Lcbc_dec_tail:
movups (%rdi),%xmm2
- subq $16,%rdx
+ subq $0x10,%rdx
jbe .Lcbc_dec_one
movups 16(%rdi),%xmm3
movaps %xmm2,%xmm11
- subq $16,%rdx
+ subq $0x10,%rdx
jbe .Lcbc_dec_two
movups 32(%rdi),%xmm4
movaps %xmm3,%xmm12
- subq $16,%rdx
+ subq $0x10,%rdx
jbe .Lcbc_dec_three
movups 48(%rdi),%xmm5
movaps %xmm4,%xmm13
- subq $16,%rdx
+ subq $0x10,%rdx
jbe .Lcbc_dec_four
movups 64(%rdi),%xmm6
@@ -3026,7 +3026,7 @@
movdqa %xmm6,%xmm2
pxor %xmm6,%xmm6
pxor %xmm7,%xmm7
- subq $16,%rdx
+ subq $0x10,%rdx
jmp .Lcbc_dec_tail_collected
.align 16
@@ -3345,7 +3345,7 @@
pslldq $4,%xmm0
pxor %xmm3,%xmm0
- pshufd $255,%xmm0,%xmm3
+ pshufd $0xff,%xmm0,%xmm3
pxor %xmm1,%xmm3
pslldq $4,%xmm1
pxor %xmm1,%xmm3
@@ -3432,7 +3432,7 @@
decl %r10d
jz .Ldone_key256
- pshufd $255,%xmm0,%xmm2
+ pshufd $0xff,%xmm0,%xmm2
pxor %xmm3,%xmm3
.byte 102,15,56,221,211
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
index 8cfa4df..c5491ce4 100644
--- 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
@@ -327,45 +327,45 @@
pxor %xmm2,%xmm5
decl %r10d
jl .Lenc_done
- pshufd $147,%xmm15,%xmm7
- pshufd $147,%xmm0,%xmm8
+ pshufd $0x93,%xmm15,%xmm7
+ pshufd $0x93,%xmm0,%xmm8
pxor %xmm7,%xmm15
- pshufd $147,%xmm3,%xmm9
+ pshufd $0x93,%xmm3,%xmm9
pxor %xmm8,%xmm0
- pshufd $147,%xmm5,%xmm10
+ pshufd $0x93,%xmm5,%xmm10
pxor %xmm9,%xmm3
- pshufd $147,%xmm2,%xmm11
+ pshufd $0x93,%xmm2,%xmm11
pxor %xmm10,%xmm5
- pshufd $147,%xmm6,%xmm12
+ pshufd $0x93,%xmm6,%xmm12
pxor %xmm11,%xmm2
- pshufd $147,%xmm1,%xmm13
+ pshufd $0x93,%xmm1,%xmm13
pxor %xmm12,%xmm6
- pshufd $147,%xmm4,%xmm14
+ pshufd $0x93,%xmm4,%xmm14
pxor %xmm13,%xmm1
pxor %xmm14,%xmm4
pxor %xmm15,%xmm8
pxor %xmm4,%xmm7
pxor %xmm4,%xmm8
- pshufd $78,%xmm15,%xmm15
+ pshufd $0x4E,%xmm15,%xmm15
pxor %xmm0,%xmm9
- pshufd $78,%xmm0,%xmm0
+ pshufd $0x4E,%xmm0,%xmm0
pxor %xmm2,%xmm12
pxor %xmm7,%xmm15
pxor %xmm6,%xmm13
pxor %xmm8,%xmm0
pxor %xmm5,%xmm11
- pshufd $78,%xmm2,%xmm7
+ pshufd $0x4E,%xmm2,%xmm7
pxor %xmm1,%xmm14
- pshufd $78,%xmm6,%xmm8
+ pshufd $0x4E,%xmm6,%xmm8
pxor %xmm3,%xmm10
- pshufd $78,%xmm5,%xmm2
+ pshufd $0x4E,%xmm5,%xmm2
pxor %xmm4,%xmm10
- pshufd $78,%xmm4,%xmm6
+ pshufd $0x4E,%xmm4,%xmm6
pxor %xmm4,%xmm11
- pshufd $78,%xmm1,%xmm5
+ pshufd $0x4E,%xmm1,%xmm5
pxor %xmm11,%xmm7
- pshufd $78,%xmm3,%xmm1
+ pshufd $0x4E,%xmm3,%xmm1
pxor %xmm12,%xmm8
pxor %xmm10,%xmm2
pxor %xmm14,%xmm6
@@ -799,24 +799,24 @@
decl %r10d
jl .Ldec_done
- pshufd $78,%xmm15,%xmm7
- pshufd $78,%xmm2,%xmm13
+ pshufd $0x4E,%xmm15,%xmm7
+ pshufd $0x4E,%xmm2,%xmm13
pxor %xmm15,%xmm7
- pshufd $78,%xmm4,%xmm14
+ pshufd $0x4E,%xmm4,%xmm14
pxor %xmm2,%xmm13
- pshufd $78,%xmm0,%xmm8
+ pshufd $0x4E,%xmm0,%xmm8
pxor %xmm4,%xmm14
- pshufd $78,%xmm5,%xmm9
+ pshufd $0x4E,%xmm5,%xmm9
pxor %xmm0,%xmm8
- pshufd $78,%xmm3,%xmm10
+ pshufd $0x4E,%xmm3,%xmm10
pxor %xmm5,%xmm9
pxor %xmm13,%xmm15
pxor %xmm13,%xmm0
- pshufd $78,%xmm1,%xmm11
+ pshufd $0x4E,%xmm1,%xmm11
pxor %xmm3,%xmm10
pxor %xmm7,%xmm5
pxor %xmm8,%xmm3
- pshufd $78,%xmm6,%xmm12
+ pshufd $0x4E,%xmm6,%xmm12
pxor %xmm1,%xmm11
pxor %xmm14,%xmm0
pxor %xmm9,%xmm1
@@ -830,45 +830,45 @@
pxor %xmm14,%xmm1
pxor %xmm14,%xmm6
pxor %xmm12,%xmm4
- pshufd $147,%xmm15,%xmm7
- pshufd $147,%xmm0,%xmm8
+ pshufd $0x93,%xmm15,%xmm7
+ pshufd $0x93,%xmm0,%xmm8
pxor %xmm7,%xmm15
- pshufd $147,%xmm5,%xmm9
+ pshufd $0x93,%xmm5,%xmm9
pxor %xmm8,%xmm0
- pshufd $147,%xmm3,%xmm10
+ pshufd $0x93,%xmm3,%xmm10
pxor %xmm9,%xmm5
- pshufd $147,%xmm1,%xmm11
+ pshufd $0x93,%xmm1,%xmm11
pxor %xmm10,%xmm3
- pshufd $147,%xmm6,%xmm12
+ pshufd $0x93,%xmm6,%xmm12
pxor %xmm11,%xmm1
- pshufd $147,%xmm2,%xmm13
+ pshufd $0x93,%xmm2,%xmm13
pxor %xmm12,%xmm6
- pshufd $147,%xmm4,%xmm14
+ pshufd $0x93,%xmm4,%xmm14
pxor %xmm13,%xmm2
pxor %xmm14,%xmm4
pxor %xmm15,%xmm8
pxor %xmm4,%xmm7
pxor %xmm4,%xmm8
- pshufd $78,%xmm15,%xmm15
+ pshufd $0x4E,%xmm15,%xmm15
pxor %xmm0,%xmm9
- pshufd $78,%xmm0,%xmm0
+ pshufd $0x4E,%xmm0,%xmm0
pxor %xmm1,%xmm12
pxor %xmm7,%xmm15
pxor %xmm6,%xmm13
pxor %xmm8,%xmm0
pxor %xmm3,%xmm11
- pshufd $78,%xmm1,%xmm7
+ pshufd $0x4E,%xmm1,%xmm7
pxor %xmm2,%xmm14
- pshufd $78,%xmm6,%xmm8
+ pshufd $0x4E,%xmm6,%xmm8
pxor %xmm5,%xmm10
- pshufd $78,%xmm3,%xmm1
+ pshufd $0x4E,%xmm3,%xmm1
pxor %xmm4,%xmm10
- pshufd $78,%xmm4,%xmm6
+ pshufd $0x4E,%xmm4,%xmm6
pxor %xmm4,%xmm11
- pshufd $78,%xmm2,%xmm3
+ pshufd $0x4E,%xmm2,%xmm3
pxor %xmm11,%xmm7
- pshufd $78,%xmm5,%xmm2
+ pshufd $0x4E,%xmm5,%xmm2
pxor %xmm12,%xmm8
pxor %xmm1,%xmm10
pxor %xmm14,%xmm6
@@ -1559,20 +1559,20 @@
movdqa %xmm7,(%rax)
andq $-16,%r14
- subq $128,%rsp
+ subq $0x80,%rsp
movdqa 32(%rbp),%xmm6
pxor %xmm14,%xmm14
movdqa .Lxts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- subq $128,%r14
+ subq $0x80,%r14
jc .Lxts_enc_short
jmp .Lxts_enc_loop
.align 16
.Lxts_enc_loop:
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm15
movdqa %xmm6,0(%rsp)
@@ -1580,7 +1580,7 @@
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm0
movdqa %xmm6,16(%rsp)
@@ -1589,7 +1589,7 @@
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
movdqu 0(%r12),%xmm7
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm1
movdqa %xmm6,32(%rsp)
@@ -1599,7 +1599,7 @@
pxor %xmm13,%xmm6
movdqu 16(%r12),%xmm8
pxor %xmm7,%xmm15
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm2
movdqa %xmm6,48(%rsp)
@@ -1609,7 +1609,7 @@
pxor %xmm13,%xmm6
movdqu 32(%r12),%xmm9
pxor %xmm8,%xmm0
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm3
movdqa %xmm6,64(%rsp)
@@ -1619,7 +1619,7 @@
pxor %xmm13,%xmm6
movdqu 48(%r12),%xmm10
pxor %xmm9,%xmm1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm4
movdqa %xmm6,80(%rsp)
@@ -1629,7 +1629,7 @@
pxor %xmm13,%xmm6
movdqu 64(%r12),%xmm11
pxor %xmm10,%xmm2
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm5
movdqa %xmm6,96(%rsp)
@@ -1673,20 +1673,20 @@
pxor %xmm14,%xmm14
movdqa .Lxts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
paddq %xmm6,%xmm6
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- subq $128,%r14
+ subq $0x80,%r14
jnc .Lxts_enc_loop
.Lxts_enc_short:
- addq $128,%r14
+ addq $0x80,%r14
jz .Lxts_enc_done
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm15
movdqa %xmm6,0(%rsp)
@@ -1694,7 +1694,7 @@
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm0
movdqa %xmm6,16(%rsp)
@@ -1705,7 +1705,7 @@
movdqu 0(%r12),%xmm7
cmpq $16,%r14
je .Lxts_enc_1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm1
movdqa %xmm6,32(%rsp)
@@ -1717,7 +1717,7 @@
cmpq $32,%r14
je .Lxts_enc_2
pxor %xmm7,%xmm15
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm2
movdqa %xmm6,48(%rsp)
@@ -1729,7 +1729,7 @@
cmpq $48,%r14
je .Lxts_enc_3
pxor %xmm8,%xmm0
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm3
movdqa %xmm6,64(%rsp)
@@ -1741,7 +1741,7 @@
cmpq $64,%r14
je .Lxts_enc_4
pxor %xmm9,%xmm1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm4
movdqa %xmm6,80(%rsp)
@@ -1753,7 +1753,7 @@
cmpq $80,%r14
je .Lxts_enc_5
pxor %xmm10,%xmm2
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm5
movdqa %xmm6,96(%rsp)
@@ -2019,20 +2019,20 @@
shlq $4,%rax
subq %rax,%r14
- subq $128,%rsp
+ subq $0x80,%rsp
movdqa 32(%rbp),%xmm6
pxor %xmm14,%xmm14
movdqa .Lxts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- subq $128,%r14
+ subq $0x80,%r14
jc .Lxts_dec_short
jmp .Lxts_dec_loop
.align 16
.Lxts_dec_loop:
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm15
movdqa %xmm6,0(%rsp)
@@ -2040,7 +2040,7 @@
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm0
movdqa %xmm6,16(%rsp)
@@ -2049,7 +2049,7 @@
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
movdqu 0(%r12),%xmm7
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm1
movdqa %xmm6,32(%rsp)
@@ -2059,7 +2059,7 @@
pxor %xmm13,%xmm6
movdqu 16(%r12),%xmm8
pxor %xmm7,%xmm15
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm2
movdqa %xmm6,48(%rsp)
@@ -2069,7 +2069,7 @@
pxor %xmm13,%xmm6
movdqu 32(%r12),%xmm9
pxor %xmm8,%xmm0
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm3
movdqa %xmm6,64(%rsp)
@@ -2079,7 +2079,7 @@
pxor %xmm13,%xmm6
movdqu 48(%r12),%xmm10
pxor %xmm9,%xmm1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm4
movdqa %xmm6,80(%rsp)
@@ -2089,7 +2089,7 @@
pxor %xmm13,%xmm6
movdqu 64(%r12),%xmm11
pxor %xmm10,%xmm2
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm5
movdqa %xmm6,96(%rsp)
@@ -2133,20 +2133,20 @@
pxor %xmm14,%xmm14
movdqa .Lxts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
paddq %xmm6,%xmm6
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- subq $128,%r14
+ subq $0x80,%r14
jnc .Lxts_dec_loop
.Lxts_dec_short:
- addq $128,%r14
+ addq $0x80,%r14
jz .Lxts_dec_done
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm15
movdqa %xmm6,0(%rsp)
@@ -2154,7 +2154,7 @@
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm0
movdqa %xmm6,16(%rsp)
@@ -2165,7 +2165,7 @@
movdqu 0(%r12),%xmm7
cmpq $16,%r14
je .Lxts_dec_1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm1
movdqa %xmm6,32(%rsp)
@@ -2177,7 +2177,7 @@
cmpq $32,%r14
je .Lxts_dec_2
pxor %xmm7,%xmm15
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm2
movdqa %xmm6,48(%rsp)
@@ -2189,7 +2189,7 @@
cmpq $48,%r14
je .Lxts_dec_3
pxor %xmm8,%xmm0
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm3
movdqa %xmm6,64(%rsp)
@@ -2201,7 +2201,7 @@
cmpq $64,%r14
je .Lxts_dec_4
pxor %xmm9,%xmm1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm4
movdqa %xmm6,80(%rsp)
@@ -2213,7 +2213,7 @@
cmpq $80,%r14
je .Lxts_dec_5
pxor %xmm10,%xmm2
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm5
movdqa %xmm6,96(%rsp)
@@ -2390,7 +2390,7 @@
pxor %xmm14,%xmm14
movdqa .Lxts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
movdqa %xmm6,%xmm5
paddq %xmm6,%xmm6
pand %xmm12,%xmm13
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
index 1d12424..4dfafa9 100644
--- 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
@@ -61,7 +61,7 @@
addq $16,%r11
pxor %xmm0,%xmm3
.byte 102,15,56,0,193
- andq $48,%r11
+ andq $0x30,%r11
subq $1,%rax
pxor %xmm3,%xmm0
@@ -121,10 +121,10 @@
pand %xmm9,%xmm0
.byte 102,15,56,0,208
movdqa .Lk_dipt+16(%rip),%xmm0
- xorq $48,%r11
+ xorq $0x30,%r11
leaq .Lk_dsbd(%rip),%r10
.byte 102,15,56,0,193
- andq $48,%r11
+ andq $0x30,%r11
pxor %xmm5,%xmm2
movdqa .Lk_mc_forward+48(%rip),%xmm5
pxor %xmm2,%xmm0
@@ -243,7 +243,7 @@
movdqa (%r8,%r10,1),%xmm1
.byte 102,15,56,0,217
movdqu %xmm3,(%rdx)
- xorq $48,%r8
+ xorq $0x30,%r8
.Lschedule_go:
cmpl $192,%esi
@@ -333,7 +333,7 @@
call _vpaes_schedule_mangle
- pshufd $255,%xmm0,%xmm0
+ pshufd $0xFF,%xmm0,%xmm0
movdqa %xmm7,%xmm5
movdqa %xmm6,%xmm7
call _vpaes_schedule_low_round
@@ -400,8 +400,8 @@
.type _vpaes_schedule_192_smear,@function
.align 16
_vpaes_schedule_192_smear:
- pshufd $128,%xmm6,%xmm1
- pshufd $254,%xmm7,%xmm0
+ pshufd $0x80,%xmm6,%xmm1
+ pshufd $0xFE,%xmm7,%xmm0
pxor %xmm1,%xmm6
pxor %xmm1,%xmm1
pxor %xmm0,%xmm6
@@ -438,7 +438,7 @@
pxor %xmm1,%xmm7
- pshufd $255,%xmm0,%xmm0
+ pshufd $0xFF,%xmm0,%xmm0
.byte 102,15,58,15,192,1
@@ -597,7 +597,7 @@
movdqa (%r8,%r10,1),%xmm1
.byte 102,15,56,0,217
addq $-16,%r8
- andq $48,%r8
+ andq $0x30,%r8
movdqu %xmm3,(%rdx)
.byte 0xf3,0xc3
.size _vpaes_schedule_mangle,.-_vpaes_schedule_mangle
@@ -616,7 +616,7 @@
movl %eax,240(%rdx)
movl $0,%ecx
- movl $48,%r8d
+ movl $0x30,%r8d
call _vpaes_schedule_core
xorl %eax,%eax
.byte 0xf3,0xc3
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
index dd3d310..21531d1 100644
--- 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
@@ -466,48 +466,94 @@
pushq %r14
pushq %r15
- movl %r9d,%r9d
- subq $128+24,%rsp
+ subq $152,%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)
+ movd %r9d,%xmm8
+ movdqa .Linc+16(%rip),%xmm1
+ movdqa .Linc(%rip),%xmm0
- shlq $32,%rax
- orq %rax,%rbx
+ pshufd $0,%xmm8,%xmm8
+ movdqa %xmm1,%xmm7
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm8,%xmm0
+ movdqa %xmm7,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm8,%xmm1
+ movdqa %xmm7,%xmm4
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm8,%xmm2
+ movdqa %xmm7,%xmm5
+ paddd %xmm3,%xmm4
+ pcmpeqd %xmm8,%xmm3
+ movdqa %xmm7,%xmm6
+ paddd %xmm4,%xmm5
+ pcmpeqd %xmm8,%xmm4
+ paddd %xmm5,%xmm6
+ pcmpeqd %xmm8,%xmm5
+ paddd %xmm6,%xmm7
+ pcmpeqd %xmm8,%xmm6
+ pcmpeqd %xmm8,%xmm7
+
+ movdqa 0(%rdx),%xmm8
+ movdqa 16(%rdx),%xmm9
+ movdqa 32(%rdx),%xmm10
+ movdqa 48(%rdx),%xmm11
+ pand %xmm0,%xmm8
+ movdqa 64(%rdx),%xmm12
+ pand %xmm1,%xmm9
+ movdqa 80(%rdx),%xmm13
+ pand %xmm2,%xmm10
+ movdqa 96(%rdx),%xmm14
+ pand %xmm3,%xmm11
+ movdqa 112(%rdx),%xmm15
+ leaq 128(%rdx),%rbp
+ pand %xmm4,%xmm12
+ pand %xmm5,%xmm13
+ pand %xmm6,%xmm14
+ pand %xmm7,%xmm15
+ por %xmm10,%xmm8
+ por %xmm11,%xmm9
+ por %xmm12,%xmm8
+ por %xmm13,%xmm9
+ por %xmm14,%xmm8
+ por %xmm15,%xmm9
+
+ por %xmm9,%xmm8
+ pshufd $0x4e,%xmm8,%xmm9
+ por %xmm9,%xmm8
+.byte 102,76,15,126,195
+
+ movq %r8,128(%rsp)
+ movq %rdi,128+8(%rsp)
+ movq %rcx,128+16(%rsp)
+
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
@@ -520,14 +566,12 @@
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
@@ -539,6 +583,35 @@
.align 32
.Loop_mul_gather:
+ movdqa 0(%rbp),%xmm8
+ movdqa 16(%rbp),%xmm9
+ movdqa 32(%rbp),%xmm10
+ movdqa 48(%rbp),%xmm11
+ pand %xmm0,%xmm8
+ movdqa 64(%rbp),%xmm12
+ pand %xmm1,%xmm9
+ movdqa 80(%rbp),%xmm13
+ pand %xmm2,%xmm10
+ movdqa 96(%rbp),%xmm14
+ pand %xmm3,%xmm11
+ movdqa 112(%rbp),%xmm15
+ leaq 128(%rbp),%rbp
+ pand %xmm4,%xmm12
+ pand %xmm5,%xmm13
+ pand %xmm6,%xmm14
+ pand %xmm7,%xmm15
+ por %xmm10,%xmm8
+ por %xmm11,%xmm9
+ por %xmm12,%xmm8
+ por %xmm13,%xmm9
+ por %xmm14,%xmm8
+ por %xmm15,%xmm9
+
+ por %xmm9,%xmm8
+ pshufd $0x4e,%xmm8,%xmm9
+ por %xmm9,%xmm8
+.byte 102,76,15,126,195
+
mulq %rbx
addq %rax,%r8
movq 8(%rsi),%rax
@@ -547,7 +620,6 @@
adcq $0,%r8
mulq %rbx
- movd (%rbp),%xmm4
addq %rax,%r9
movq 16(%rsi),%rax
adcq $0,%rdx
@@ -556,7 +628,6 @@
adcq $0,%r9
mulq %rbx
- movd 64(%rbp),%xmm5
addq %rax,%r10
movq 24(%rsi),%rax
adcq $0,%rdx
@@ -565,7 +636,6 @@
adcq $0,%r10
mulq %rbx
- pslldq $4,%xmm5
addq %rax,%r11
movq 32(%rsi),%rax
adcq $0,%rdx
@@ -574,7 +644,6 @@
adcq $0,%r11
mulq %rbx
- por %xmm5,%xmm4
addq %rax,%r12
movq 40(%rsi),%rax
adcq $0,%rdx
@@ -599,7 +668,6 @@
adcq $0,%r14
mulq %rbx
-.byte 102,72,15,126,227
addq %rax,%r15
movq (%rsi),%rax
adcq $0,%rdx
@@ -607,7 +675,6 @@
movq %rdx,%r15
adcq $0,%r15
- leaq 128(%rbp),%rbp
leaq 8(%rdi),%rdi
decl %ecx
@@ -622,8 +689,8 @@
movq %r14,48(%rdi)
movq %r15,56(%rdi)
-.byte 102,72,15,126,199
-.byte 102,72,15,126,205
+ movq 128+8(%rsp),%rdi
+ movq 128+16(%rsp),%rbp
movq (%rsp),%r8
movq 8(%rsp),%r9
@@ -673,7 +740,7 @@
movl %r9d,%r9d
subq $128+24,%rsp
.Lmul_scatter4_body:
- leaq (%r8,%r9,4),%r8
+ leaq (%r8,%r9,8),%r8
.byte 102,72,15,110,199
.byte 102,72,15,110,202
.byte 102,73,15,110,208
@@ -709,30 +776,14 @@
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)
+ movq %r8,0(%rsi)
+ movq %r9,128(%rsi)
+ movq %r10,256(%rsi)
+ movq %r11,384(%rsi)
+ movq %r12,512(%rsi)
+ movq %r13,640(%rsi)
+ movq %r14,768(%rsi)
+ movq %r15,896(%rsi)
leaq 128+24+48(%rsp),%rax
movq -48(%rax),%r15
@@ -1087,16 +1138,14 @@
.type rsaz_512_scatter4,@function
.align 16
rsaz_512_scatter4:
- leaq (%rdi,%rdx,4),%rdi
+ leaq (%rdi,%rdx,8),%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)
+ movq %rax,(%rdi)
leaq 128(%rdi),%rdi
decl %r9d
jnz .Loop_scatter
@@ -1108,20 +1157,73 @@
.type rsaz_512_gather4,@function
.align 16
rsaz_512_gather4:
- leaq (%rsi,%rdx,4),%rsi
+ movd %edx,%xmm8
+ movdqa .Linc+16(%rip),%xmm1
+ movdqa .Linc(%rip),%xmm0
+
+ pshufd $0,%xmm8,%xmm8
+ movdqa %xmm1,%xmm7
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm8,%xmm0
+ movdqa %xmm7,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm8,%xmm1
+ movdqa %xmm7,%xmm4
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm8,%xmm2
+ movdqa %xmm7,%xmm5
+ paddd %xmm3,%xmm4
+ pcmpeqd %xmm8,%xmm3
+ movdqa %xmm7,%xmm6
+ paddd %xmm4,%xmm5
+ pcmpeqd %xmm8,%xmm4
+ paddd %xmm5,%xmm6
+ pcmpeqd %xmm8,%xmm5
+ paddd %xmm6,%xmm7
+ pcmpeqd %xmm8,%xmm6
+ pcmpeqd %xmm8,%xmm7
movl $8,%r9d
jmp .Loop_gather
.align 16
.Loop_gather:
- movl (%rsi),%eax
- movl 64(%rsi),%r8d
+ movdqa 0(%rsi),%xmm8
+ movdqa 16(%rsi),%xmm9
+ movdqa 32(%rsi),%xmm10
+ movdqa 48(%rsi),%xmm11
+ pand %xmm0,%xmm8
+ movdqa 64(%rsi),%xmm12
+ pand %xmm1,%xmm9
+ movdqa 80(%rsi),%xmm13
+ pand %xmm2,%xmm10
+ movdqa 96(%rsi),%xmm14
+ pand %xmm3,%xmm11
+ movdqa 112(%rsi),%xmm15
leaq 128(%rsi),%rsi
- shlq $32,%r8
- orq %r8,%rax
- movq %rax,(%rdi)
+ pand %xmm4,%xmm12
+ pand %xmm5,%xmm13
+ pand %xmm6,%xmm14
+ pand %xmm7,%xmm15
+ por %xmm10,%xmm8
+ por %xmm11,%xmm9
+ por %xmm12,%xmm8
+ por %xmm13,%xmm9
+ por %xmm14,%xmm8
+ por %xmm15,%xmm9
+
+ por %xmm9,%xmm8
+ pshufd $0x4e,%xmm8,%xmm9
+ por %xmm9,%xmm8
+ movq %xmm8,(%rdi)
leaq 8(%rdi),%rdi
decl %r9d
jnz .Loop_gather
.byte 0xf3,0xc3
+.LSEH_end_rsaz_512_gather4:
.size rsaz_512_gather4,.-rsaz_512_gather4
+
+.align 64
+.Linc:
+.long 0,0, 1,1
+.long 2,2, 2,2
#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
index 4d401c6..83926ad 100644
--- 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
@@ -636,20 +636,20 @@
- leaq -64(%rsp,%r9,4),%r11
+ leaq -64(%rsp,%r9,2),%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
+ leaq -64(%rsp,%r9,2),%rsp
jmp .Lsqr8x_sp_done
.align 32
.Lsqr8x_sp_alt:
- leaq 4096-64(,%r9,4),%r10
- leaq -64(%rsp,%r9,4),%rsp
+ leaq 4096-64(,%r9,2),%r10
+ leaq -64(%rsp,%r9,2),%rsp
subq %r10,%r11
movq $0,%r10
cmovcq %r10,%r11
@@ -659,58 +659,80 @@
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
-
+.byte 102,72,15,110,209
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
+
+
+
+ leaq (%rdi,%r9,1),%rbx
+ movq %r9,%rcx
+ movq %r9,%rdx
+.byte 102,72,15,126,207
+ sarq $3+2,%rcx
+ jmp .Lsqr8x_sub
.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
+.Lsqr8x_sub:
+ movq 0(%rbx),%r12
+ movq 8(%rbx),%r13
+ movq 16(%rbx),%r14
+ movq 24(%rbx),%r15
+ leaq 32(%rbx),%rbx
+ sbbq 0(%rbp),%r12
+ sbbq 8(%rbp),%r13
+ sbbq 16(%rbp),%r14
+ sbbq 24(%rbp),%r15
+ leaq 32(%rbp),%rbp
+ movq %r12,0(%rdi)
+ movq %r13,8(%rdi)
+ movq %r14,16(%rdi)
+ movq %r15,24(%rdi)
+ leaq 32(%rdi),%rdi
+ incq %rcx
+ jnz .Lsqr8x_sub
+
+ sbbq $0,%rax
+ leaq (%rbx,%r9,1),%rbx
+ leaq (%rdi,%r9,1),%rdi
+
+.byte 102,72,15,110,200
+ pxor %xmm0,%xmm0
+ pshufd $0,%xmm1,%xmm1
+ movq 40(%rsp),%rsi
+ jmp .Lsqr8x_cond_copy
+
+.align 32
+.Lsqr8x_cond_copy:
+ movdqa 0(%rbx),%xmm2
+ movdqa 16(%rbx),%xmm3
+ leaq 32(%rbx),%rbx
+ movdqu 0(%rdi),%xmm4
+ movdqu 16(%rdi),%xmm5
+ leaq 32(%rdi),%rdi
+ movdqa %xmm0,-32(%rbx)
+ movdqa %xmm0,-16(%rbx)
+ movdqa %xmm0,-32(%rbx,%rdx,1)
+ movdqa %xmm0,-16(%rbx,%rdx,1)
+ pcmpeqd %xmm1,%xmm0
+ pand %xmm1,%xmm2
+ pand %xmm1,%xmm3
+ pand %xmm0,%xmm4
+ pand %xmm0,%xmm5
+ pxor %xmm0,%xmm0
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqu %xmm4,-32(%rdi)
+ movdqu %xmm5,-16(%rdi)
+ addq $32,%r9
+ jnz .Lsqr8x_cond_copy
movq $1,%rax
movq -48(%rsi),%r15
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
index 02edc69..554df1f 100644
--- 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
@@ -17,46 +17,151 @@
.Lmul_enter:
movl %r9d,%r9d
movq %rsp,%rax
- movl 8(%rsp),%r10d
+ movd 8(%rsp),%xmm5
+ leaq .Linc(%rip),%r10
pushq %rbx
pushq %rbp
pushq %r12
pushq %r13
pushq %r14
pushq %r15
+
leaq 2(%r9),%r11
negq %r11
- leaq (%rsp,%r11,8),%rsp
+ leaq -264(%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
+ leaq 128(%rdx),%r12
+ movdqa 0(%r10),%xmm0
+ movdqa 16(%r10),%xmm1
+ leaq 24-112(%rsp,%r9,8),%r10
+ andq $-16,%r10
- 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
+ pshufd $0,%xmm5,%xmm5
+ movdqa %xmm1,%xmm4
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+.byte 0x67
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,112(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,128(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,144(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,160(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,176(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,192(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,208(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,224(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,240(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,256(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,272(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,288(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,304(%r10)
+
+ paddd %xmm2,%xmm3
+.byte 0x67
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,320(%r10)
+
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,336(%r10)
+ pand 64(%r12),%xmm0
+
+ pand 80(%r12),%xmm1
+ pand 96(%r12),%xmm2
+ movdqa %xmm3,352(%r10)
+ pand 112(%r12),%xmm3
por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa -128(%r12),%xmm4
+ movdqa -112(%r12),%xmm5
+ movdqa -96(%r12),%xmm2
+ pand 112(%r10),%xmm4
+ movdqa -80(%r12),%xmm3
+ pand 128(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 144(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 160(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa -64(%r12),%xmm4
+ movdqa -48(%r12),%xmm5
+ movdqa -32(%r12),%xmm2
+ pand 176(%r10),%xmm4
+ movdqa -16(%r12),%xmm3
+ pand 192(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 208(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 224(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa 0(%r12),%xmm4
+ movdqa 16(%r12),%xmm5
+ movdqa 32(%r12),%xmm2
+ pand 240(%r10),%xmm4
+ movdqa 48(%r12),%xmm3
+ pand 256(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 272(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 288(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ por %xmm1,%xmm0
+ pshufd $0x4e,%xmm0,%xmm1
+ por %xmm1,%xmm0
leaq 256(%r12),%r12
- por %xmm3,%xmm0
-
.byte 102,72,15,126,195
movq (%r8),%r8
@@ -65,29 +170,14 @@
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
@@ -120,14 +210,12 @@
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 %r13,-16(%rsp,%r9,8)
movq %rdx,%r13
movq %r10,%r11
@@ -141,33 +229,78 @@
jmp .Louter
.align 16
.Louter:
+ leaq 24+128(%rsp,%r9,8),%rdx
+ andq $-16,%rdx
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+ movdqa -128(%r12),%xmm0
+ movdqa -112(%r12),%xmm1
+ movdqa -96(%r12),%xmm2
+ movdqa -80(%r12),%xmm3
+ pand -128(%rdx),%xmm0
+ pand -112(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand -96(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand -80(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa -64(%r12),%xmm0
+ movdqa -48(%r12),%xmm1
+ movdqa -32(%r12),%xmm2
+ movdqa -16(%r12),%xmm3
+ pand -64(%rdx),%xmm0
+ pand -48(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand -32(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand -16(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 0(%r12),%xmm0
+ movdqa 16(%r12),%xmm1
+ movdqa 32(%r12),%xmm2
+ movdqa 48(%r12),%xmm3
+ pand 0(%rdx),%xmm0
+ pand 16(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand 32(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand 48(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 64(%r12),%xmm0
+ movdqa 80(%r12),%xmm1
+ movdqa 96(%r12),%xmm2
+ movdqa 112(%r12),%xmm3
+ pand 64(%rdx),%xmm0
+ pand 80(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand 96(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand 112(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ por %xmm5,%xmm4
+ pshufd $0x4e,%xmm4,%xmm0
+ por %xmm4,%xmm0
+ leaq 256(%r12),%r12
+
+ movq (%rsi),%rax
+.byte 102,72,15,126,195
+
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
@@ -203,15 +336,12 @@
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
+ movq (%rsp,%r9,8),%r10
adcq $0,%rdx
- movq %r13,-16(%rsp,%r15,8)
+ movq %r13,-16(%rsp,%r9,8)
movq %rdx,%r13
xorq %rdx,%rdx
@@ -257,6 +387,7 @@
movq 8(%rsp,%r9,8),%rsi
movq $1,%rax
+
movq -48(%rsi),%r15
movq -40(%rsi),%r14
movq -32(%rsi),%r13
@@ -279,10 +410,10 @@
pushq %r13
pushq %r14
pushq %r15
+
.byte 0x67
- movl %r9d,%r10d
shll $3,%r9d
- shll $3+2,%r10d
+ leaq (%r9,%r9,2),%r10
negq %r9
@@ -292,19 +423,21 @@
- leaq -64(%rsp,%r9,2),%r11
- subq %rsi,%r11
+
+
+ leaq -320(%rsp,%r9,2),%r11
+ subq %rdi,%r11
andq $4095,%r11
cmpq %r11,%r10
jb .Lmul4xsp_alt
subq %r11,%rsp
- leaq -64(%rsp,%r9,2),%rsp
+ leaq -320(%rsp,%r9,2),%rsp
jmp .Lmul4xsp_done
.align 32
.Lmul4xsp_alt:
- leaq 4096-64(,%r9,2),%r10
- leaq -64(%rsp,%r9,2),%rsp
+ leaq 4096-320(,%r9,2),%r10
+ leaq -320(%rsp,%r9,2),%rsp
subq %r10,%r11
movq $0,%r10
cmovcq %r10,%r11
@@ -320,6 +453,7 @@
movq 40(%rsp),%rsi
movq $1,%rax
+
movq -48(%rsi),%r15
movq -40(%rsi),%r14
movq -32(%rsi),%r13
@@ -335,47 +469,141 @@
.align 32
mul4x_internal:
shlq $5,%r9
- movl 8(%rax),%r10d
- leaq 256(%rdx,%r9,1),%r13
+ movd 8(%rax),%xmm5
+ leaq .Linc(%rip),%rax
+ leaq 128(%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
+ movdqa 0(%rax),%xmm0
+ movdqa 16(%rax),%xmm1
+ leaq 88-112(%rsp,%r9,1),%r10
+ leaq 128(%rdx),%r12
- 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
+ pshufd $0,%xmm5,%xmm5
+ movdqa %xmm1,%xmm4
+.byte 0x67,0x67
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
.byte 0x67
- por %xmm1,%xmm0
- movq -96(%r14),%xmm1
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,112(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,128(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,144(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,160(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,176(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,192(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,208(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,224(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,240(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,256(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,272(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,288(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,304(%r10)
+
+ paddd %xmm2,%xmm3
.byte 0x67
- pand %xmm7,%xmm3
-.byte 0x67
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,320(%r10)
+
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,336(%r10)
+ pand 64(%r12),%xmm0
+
+ pand 80(%r12),%xmm1
+ pand 96(%r12),%xmm2
+ movdqa %xmm3,352(%r10)
+ pand 112(%r12),%xmm3
por %xmm2,%xmm0
- movq -32(%r14),%xmm2
-.byte 0x67
- pand %xmm4,%xmm1
-.byte 0x67
- por %xmm3,%xmm0
- movq 32(%r14),%xmm3
-
+ por %xmm3,%xmm1
+ movdqa -128(%r12),%xmm4
+ movdqa -112(%r12),%xmm5
+ movdqa -96(%r12),%xmm2
+ pand 112(%r10),%xmm4
+ movdqa -80(%r12),%xmm3
+ pand 128(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 144(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 160(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa -64(%r12),%xmm4
+ movdqa -48(%r12),%xmm5
+ movdqa -32(%r12),%xmm2
+ pand 176(%r10),%xmm4
+ movdqa -16(%r12),%xmm3
+ pand 192(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 208(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 224(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa 0(%r12),%xmm4
+ movdqa 16(%r12),%xmm5
+ movdqa 32(%r12),%xmm2
+ pand 240(%r10),%xmm4
+ movdqa 48(%r12),%xmm3
+ pand 256(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 272(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 288(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ por %xmm1,%xmm0
+ pshufd $0x4e,%xmm0,%xmm1
+ por %xmm1,%xmm0
+ leaq 256(%r12),%r12
.byte 102,72,15,126,195
- movq 96(%r14),%xmm0
+
movq %r13,16+8(%rsp)
movq %rdi,56+8(%rsp)
@@ -389,26 +617,10 @@
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
+ leaq 64+8(%rsp),%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
@@ -417,7 +629,7 @@
mulq %rbx
addq %rax,%r11
- movq 16(%rcx),%rax
+ movq 8(%rcx),%rax
adcq $0,%rdx
movq %rdx,%r10
@@ -427,7 +639,7 @@
adcq $0,%rdx
addq %r11,%rdi
leaq 32(%r9),%r15
- leaq 64(%rcx),%rcx
+ leaq 32(%rcx),%rcx
adcq $0,%rdx
movq %rdi,(%r14)
movq %rdx,%r13
@@ -437,7 +649,7 @@
.L1st4x:
mulq %rbx
addq %rax,%r10
- movq -32(%rcx),%rax
+ movq -16(%rcx),%rax
leaq 32(%r14),%r14
adcq $0,%rdx
movq %rdx,%r11
@@ -453,7 +665,7 @@
mulq %rbx
addq %rax,%r11
- movq -16(%rcx),%rax
+ movq -8(%rcx),%rax
adcq $0,%rdx
movq %rdx,%r10
@@ -483,7 +695,7 @@
mulq %rbx
addq %rax,%r11
- movq 16(%rcx),%rax
+ movq 8(%rcx),%rax
adcq $0,%rdx
movq %rdx,%r10
@@ -492,7 +704,7 @@
movq 16(%rsi,%r15,1),%rax
adcq $0,%rdx
addq %r11,%rdi
- leaq 64(%rcx),%rcx
+ leaq 32(%rcx),%rcx
adcq $0,%rdx
movq %rdi,(%r14)
movq %rdx,%r13
@@ -502,7 +714,7 @@
mulq %rbx
addq %rax,%r10
- movq -32(%rcx),%rax
+ movq -16(%rcx),%rax
leaq 32(%r14),%r14
adcq $0,%rdx
movq %rdx,%r11
@@ -518,7 +730,7 @@
mulq %rbx
addq %rax,%r11
- movq -16(%rcx),%rax
+ movq -8(%rcx),%rax
adcq $0,%rdx
movq %rdx,%r10
@@ -531,8 +743,7 @@
movq %rdi,-16(%r14)
movq %rdx,%r13
-.byte 102,72,15,126,195
- leaq (%rcx,%r9,2),%rcx
+ leaq (%rcx,%r9,1),%rcx
xorq %rdi,%rdi
addq %r10,%r13
@@ -543,6 +754,63 @@
.align 32
.Louter4x:
+ leaq 16+128(%r14),%rdx
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+ movdqa -128(%r12),%xmm0
+ movdqa -112(%r12),%xmm1
+ movdqa -96(%r12),%xmm2
+ movdqa -80(%r12),%xmm3
+ pand -128(%rdx),%xmm0
+ pand -112(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand -96(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand -80(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa -64(%r12),%xmm0
+ movdqa -48(%r12),%xmm1
+ movdqa -32(%r12),%xmm2
+ movdqa -16(%r12),%xmm3
+ pand -64(%rdx),%xmm0
+ pand -48(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand -32(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand -16(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 0(%r12),%xmm0
+ movdqa 16(%r12),%xmm1
+ movdqa 32(%r12),%xmm2
+ movdqa 48(%r12),%xmm3
+ pand 0(%rdx),%xmm0
+ pand 16(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand 32(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand 48(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 64(%r12),%xmm0
+ movdqa 80(%r12),%xmm1
+ movdqa 96(%r12),%xmm2
+ movdqa 112(%r12),%xmm3
+ pand 64(%rdx),%xmm0
+ pand 80(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand 96(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand 112(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ por %xmm5,%xmm4
+ pshufd $0x4e,%xmm4,%xmm0
+ por %xmm4,%xmm0
+ leaq 256(%r12),%r12
+.byte 102,72,15,126,195
+
movq (%r14,%r9,1),%r10
movq %r8,%rbp
mulq %rbx
@@ -550,25 +818,11 @@
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
@@ -578,7 +832,7 @@
mulq %rbx
addq %rax,%r11
- movq 16(%rcx),%rax
+ movq 8(%rcx),%rax
adcq $0,%rdx
addq 8(%r14),%r11
adcq $0,%rdx
@@ -590,7 +844,7 @@
adcq $0,%rdx
addq %r11,%rdi
leaq 32(%r9),%r15
- leaq 64(%rcx),%rcx
+ leaq 32(%rcx),%rcx
adcq $0,%rdx
movq %rdx,%r13
jmp .Linner4x
@@ -599,7 +853,7 @@
.Linner4x:
mulq %rbx
addq %rax,%r10
- movq -32(%rcx),%rax
+ movq -16(%rcx),%rax
adcq $0,%rdx
addq 16(%r14),%r10
leaq 32(%r14),%r14
@@ -617,7 +871,7 @@
mulq %rbx
addq %rax,%r11
- movq -16(%rcx),%rax
+ movq -8(%rcx),%rax
adcq $0,%rdx
addq -8(%r14),%r11
adcq $0,%rdx
@@ -651,7 +905,7 @@
mulq %rbx
addq %rax,%r11
- movq 16(%rcx),%rax
+ movq 8(%rcx),%rax
adcq $0,%rdx
addq 8(%r14),%r11
adcq $0,%rdx
@@ -662,7 +916,7 @@
movq 16(%rsi,%r15,1),%rax
adcq $0,%rdx
addq %r11,%rdi
- leaq 64(%rcx),%rcx
+ leaq 32(%rcx),%rcx
adcq $0,%rdx
movq %r13,-8(%r14)
movq %rdx,%r13
@@ -672,7 +926,7 @@
mulq %rbx
addq %rax,%r10
- movq -32(%rcx),%rax
+ movq -16(%rcx),%rax
adcq $0,%rdx
addq 16(%r14),%r10
leaq 32(%r14),%r14
@@ -691,7 +945,7 @@
mulq %rbx
addq %rax,%r11
movq %rbp,%rax
- movq -16(%rcx),%rbp
+ movq -8(%rcx),%rbp
adcq $0,%rdx
addq -8(%r14),%r11
adcq $0,%rdx
@@ -706,9 +960,8 @@
movq %r13,-24(%r14)
movq %rdx,%r13
-.byte 102,72,15,126,195
movq %rdi,-16(%r14)
- leaq (%rcx,%r9,2),%rcx
+ leaq (%rcx,%r9,1),%rcx
xorq %rdi,%rdi
addq %r10,%r13
@@ -719,16 +972,23 @@
cmpq 16+8(%rsp),%r12
jb .Louter4x
+ xorq %rax,%rax
subq %r13,%rbp
adcq %r15,%r15
orq %r15,%rdi
- xorq $1,%rdi
+ subq %rdi,%rax
leaq (%r14,%r9,1),%rbx
- leaq (%rcx,%rdi,8),%rbp
+ movq (%rcx),%r12
+ leaq (%rcx),%rbp
movq %r9,%rcx
sarq $3+2,%rcx
movq 56+8(%rsp),%rdi
- jmp .Lsqr4x_sub
+ decq %r12
+ xorq %r10,%r10
+ movq 8(%rbp),%r13
+ movq 16(%rbp),%r14
+ movq 24(%rbp),%r15
+ jmp .Lsqr4x_sub_entry
.size mul4x_internal,.-mul4x_internal
.globl bn_power5
.hidden bn_power5
@@ -742,9 +1002,9 @@
pushq %r13
pushq %r14
pushq %r15
- movl %r9d,%r10d
+
shll $3,%r9d
- shll $3+2,%r10d
+ leal (%r9,%r9,2),%r10d
negq %r9
movq (%r8),%r8
@@ -754,19 +1014,20 @@
- leaq -64(%rsp,%r9,2),%r11
- subq %rsi,%r11
+
+ leaq -320(%rsp,%r9,2),%r11
+ subq %rdi,%r11
andq $4095,%r11
cmpq %r11,%r10
jb .Lpwr_sp_alt
subq %r11,%rsp
- leaq -64(%rsp,%r9,2),%rsp
+ leaq -320(%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
+ leaq 4096-320(,%r9,2),%r10
+ leaq -320(%rsp,%r9,2),%rsp
subq %r10,%r11
movq $0,%r10
cmovcq %r10,%r11
@@ -794,10 +1055,15 @@
.byte 102,72,15,110,226
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
.byte 102,72,15,126,209
.byte 102,72,15,126,226
@@ -1342,9 +1608,9 @@
movq %rbx,-16(%rdi)
movq %r8,-8(%rdi)
.byte 102,72,15,126,213
-sqr8x_reduction:
+__bn_sqr8x_reduction:
xorq %rax,%rax
- leaq (%rbp,%r9,2),%rcx
+ leaq (%r9,%rbp,1),%rcx
leaq 48+8(%rsp,%r9,2),%rdx
movq %rcx,0+8(%rsp)
leaq 48+8(%rsp,%r9,1),%rdi
@@ -1377,14 +1643,14 @@
.align 32
.L8x_reduce:
mulq %rbx
- movq 16(%rbp),%rax
+ movq 8(%rbp),%rax
negq %r8
movq %rdx,%r8
adcq $0,%r8
mulq %rbx
addq %rax,%r9
- movq 32(%rbp),%rax
+ movq 16(%rbp),%rax
adcq $0,%rdx
addq %r9,%r8
movq %rbx,48-8+8(%rsp,%rcx,8)
@@ -1393,7 +1659,7 @@
mulq %rbx
addq %rax,%r10
- movq 48(%rbp),%rax
+ movq 24(%rbp),%rax
adcq $0,%rdx
addq %r10,%r9
movq 32+8(%rsp),%rsi
@@ -1402,7 +1668,7 @@
mulq %rbx
addq %rax,%r11
- movq 64(%rbp),%rax
+ movq 32(%rbp),%rax
adcq $0,%rdx
imulq %r8,%rsi
addq %r11,%r10
@@ -1411,7 +1677,7 @@
mulq %rbx
addq %rax,%r12
- movq 80(%rbp),%rax
+ movq 40(%rbp),%rax
adcq $0,%rdx
addq %r12,%r11
movq %rdx,%r12
@@ -1419,7 +1685,7 @@
mulq %rbx
addq %rax,%r13
- movq 96(%rbp),%rax
+ movq 48(%rbp),%rax
adcq $0,%rdx
addq %r13,%r12
movq %rdx,%r13
@@ -1427,7 +1693,7 @@
mulq %rbx
addq %rax,%r14
- movq 112(%rbp),%rax
+ movq 56(%rbp),%rax
adcq $0,%rdx
addq %r14,%r13
movq %rdx,%r14
@@ -1445,7 +1711,7 @@
decl %ecx
jnz .L8x_reduce
- leaq 128(%rbp),%rbp
+ leaq 64(%rbp),%rbp
xorq %rax,%rax
movq 8+8(%rsp),%rdx
cmpq 0+8(%rsp),%rbp
@@ -1471,14 +1737,14 @@
.L8x_tail:
mulq %rbx
addq %rax,%r8
- movq 16(%rbp),%rax
+ movq 8(%rbp),%rax
movq %r8,(%rdi)
movq %rdx,%r8
adcq $0,%r8
mulq %rbx
addq %rax,%r9
- movq 32(%rbp),%rax
+ movq 16(%rbp),%rax
adcq $0,%rdx
addq %r9,%r8
leaq 8(%rdi),%rdi
@@ -1487,7 +1753,7 @@
mulq %rbx
addq %rax,%r10
- movq 48(%rbp),%rax
+ movq 24(%rbp),%rax
adcq $0,%rdx
addq %r10,%r9
movq %rdx,%r10
@@ -1495,7 +1761,7 @@
mulq %rbx
addq %rax,%r11
- movq 64(%rbp),%rax
+ movq 32(%rbp),%rax
adcq $0,%rdx
addq %r11,%r10
movq %rdx,%r11
@@ -1503,7 +1769,7 @@
mulq %rbx
addq %rax,%r12
- movq 80(%rbp),%rax
+ movq 40(%rbp),%rax
adcq $0,%rdx
addq %r12,%r11
movq %rdx,%r12
@@ -1511,7 +1777,7 @@
mulq %rbx
addq %rax,%r13
- movq 96(%rbp),%rax
+ movq 48(%rbp),%rax
adcq $0,%rdx
addq %r13,%r12
movq %rdx,%r13
@@ -1519,7 +1785,7 @@
mulq %rbx
addq %rax,%r14
- movq 112(%rbp),%rax
+ movq 56(%rbp),%rax
adcq $0,%rdx
addq %r14,%r13
movq %rdx,%r14
@@ -1537,7 +1803,7 @@
decl %ecx
jnz .L8x_tail
- leaq 128(%rbp),%rbp
+ leaq 64(%rbp),%rbp
movq 8+8(%rsp),%rdx
cmpq 0+8(%rsp),%rbp
jae .L8x_tail_done
@@ -1561,6 +1827,15 @@
.align 32
.L8x_tail_done:
addq (%rdx),%r8
+ adcq $0,%r9
+ adcq $0,%r10
+ adcq $0,%r11
+ adcq $0,%r12
+ adcq $0,%r13
+ adcq $0,%r14
+ adcq $0,%r15
+
+
xorq %rax,%rax
negq %rsi
@@ -1574,7 +1849,7 @@
adcq 48(%rdi),%r14
adcq 56(%rdi),%r15
adcq $0,%rax
- movq -16(%rbp),%rcx
+ movq -8(%rbp),%rcx
xorq %rsi,%rsi
.byte 102,72,15,126,213
@@ -1592,44 +1867,62 @@
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
-
+ .byte 0xf3,0xc3
+.size bn_sqr8x_internal,.-bn_sqr8x_internal
+.type __bn_post4x_internal,@function
.align 32
+__bn_post4x_internal:
+ movq 0(%rbp),%r12
+ leaq (%rdi,%r9,1),%rbx
+ movq %r9,%rcx
+.byte 102,72,15,126,207
+ negq %rax
+.byte 102,72,15,126,206
+ sarq $3+2,%rcx
+ decq %r12
+ xorq %r10,%r10
+ movq 8(%rbp),%r13
+ movq 16(%rbp),%r14
+ movq 24(%rbp),%r15
+ jmp .Lsqr4x_sub_entry
+
+.align 16
.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 0(%rbp),%r12
+ movq 8(%rbp),%r13
+ movq 16(%rbp),%r14
+ movq 24(%rbp),%r15
+.Lsqr4x_sub_entry:
+ leaq 32(%rbp),%rbp
+ notq %r12
+ notq %r13
+ notq %r14
+ notq %r15
+ andq %rax,%r12
+ andq %rax,%r13
+ andq %rax,%r14
+ andq %rax,%r15
+
+ negq %r10
+ adcq 0(%rbx),%r12
+ adcq 8(%rbx),%r13
+ adcq 16(%rbx),%r14
+ adcq 24(%rbx),%r15
movq %r12,0(%rdi)
- sbbq 48(%rbp),%r15
- leaq 64(%rbp),%rbp
+ leaq 32(%rbx),%rbx
movq %r13,8(%rdi)
+ sbbq %r10,%r10
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
+.size __bn_post4x_internal,.-__bn_post4x_internal
.globl bn_from_montgomery
.hidden bn_from_montgomery
.type bn_from_montgomery,@function
@@ -1652,10 +1945,9 @@
pushq %r13
pushq %r14
pushq %r15
-.byte 0x67
- movl %r9d,%r10d
+
shll $3,%r9d
- shll $3+2,%r10d
+ leaq (%r9,%r9,2),%r10
negq %r9
movq (%r8),%r8
@@ -1665,19 +1957,20 @@
- leaq -64(%rsp,%r9,2),%r11
- subq %rsi,%r11
+
+ leaq -320(%rsp,%r9,2),%r11
+ subq %rdi,%r11
andq $4095,%r11
cmpq %r11,%r10
jb .Lfrom_sp_alt
subq %r11,%rsp
- leaq -64(%rsp,%r9,2),%rsp
+ leaq -320(%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
+ leaq 4096-320(,%r9,2),%r10
+ leaq -320(%rsp,%r9,2),%rsp
subq %r10,%r11
movq $0,%r10
cmovcq %r10,%r11
@@ -1728,7 +2021,8 @@
.byte 0x67
movq %rcx,%rbp
.byte 102,73,15,110,218
- call sqr8x_reduction
+ call __bn_sqr8x_reduction
+ call __bn_post4x_internal
pxor %xmm0,%xmm0
leaq 48(%rsp),%rax
@@ -1778,46 +2072,170 @@
.globl bn_gather5
.hidden bn_gather5
.type bn_gather5,@function
-.align 16
+.align 32
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
+.LSEH_begin_bn_gather5:
+.byte 0x4c,0x8d,0x14,0x24
+.byte 0x48,0x81,0xec,0x08,0x01,0x00,0x00
+ leaq .Linc(%rip),%rax
+ andq $-16,%rsp
+
+ movd %ecx,%xmm5
+ movdqa 0(%rax),%xmm0
+ movdqa 16(%rax),%xmm1
+ leaq 128(%rdx),%r11
+ leaq 128(%rsp),%rax
+
+ pshufd $0,%xmm5,%xmm5
+ movdqa %xmm1,%xmm4
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm4,%xmm3
+
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,-128(%rax)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,-112(%rax)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,-96(%rax)
+ movdqa %xmm4,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,-80(%rax)
+ movdqa %xmm4,%xmm3
+
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,-64(%rax)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,-48(%rax)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,-32(%rax)
+ movdqa %xmm4,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,-16(%rax)
+ movdqa %xmm4,%xmm3
+
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,0(%rax)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,16(%rax)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,32(%rax)
+ movdqa %xmm4,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,48(%rax)
+ movdqa %xmm4,%xmm3
+
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,64(%rax)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,80(%rax)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,96(%rax)
+ movdqa %xmm4,%xmm2
+ movdqa %xmm3,112(%rax)
+ jmp .Lgather
+
+.align 32
+.Lgather:
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+ movdqa -128(%r11),%xmm0
+ movdqa -112(%r11),%xmm1
+ movdqa -96(%r11),%xmm2
+ pand -128(%rax),%xmm0
+ movdqa -80(%r11),%xmm3
+ pand -112(%rax),%xmm1
+ por %xmm0,%xmm4
+ pand -96(%rax),%xmm2
+ por %xmm1,%xmm5
+ pand -80(%rax),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa -64(%r11),%xmm0
+ movdqa -48(%r11),%xmm1
+ movdqa -32(%r11),%xmm2
+ pand -64(%rax),%xmm0
+ movdqa -16(%r11),%xmm3
+ pand -48(%rax),%xmm1
+ por %xmm0,%xmm4
+ pand -32(%rax),%xmm2
+ por %xmm1,%xmm5
+ pand -16(%rax),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 0(%r11),%xmm0
+ movdqa 16(%r11),%xmm1
+ movdqa 32(%r11),%xmm2
+ pand 0(%rax),%xmm0
+ movdqa 48(%r11),%xmm3
+ pand 16(%rax),%xmm1
+ por %xmm0,%xmm4
+ pand 32(%rax),%xmm2
+ por %xmm1,%xmm5
+ pand 48(%rax),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 64(%r11),%xmm0
+ movdqa 80(%r11),%xmm1
+ movdqa 96(%r11),%xmm2
+ pand 64(%rax),%xmm0
+ movdqa 112(%r11),%xmm3
+ pand 80(%rax),%xmm1
+ por %xmm0,%xmm4
+ pand 96(%rax),%xmm2
+ por %xmm1,%xmm5
+ pand 112(%rax),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ por %xmm5,%xmm4
+ leaq 256(%r11),%r11
+ pshufd $0x4e,%xmm4,%xmm0
+ por %xmm4,%xmm0
movq %xmm0,(%rdi)
leaq 8(%rdi),%rdi
subl $1,%esi
jnz .Lgather
+
+ leaq (%r10),%rsp
.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
+.Linc:
+.long 0,0, 1,1
+.long 2,2, 2,2
.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/chacha/chacha-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S
new file mode 100644
index 0000000..e994940
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/chacha/chacha-x86_64.S
@@ -0,0 +1,1585 @@
+#if defined(__x86_64__)
+.text
+
+.extern OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+
+.align 64
+.Lzero:
+.long 0,0,0,0
+.Lone:
+.long 1,0,0,0
+.Linc:
+.long 0,1,2,3
+.Lfour:
+.long 4,4,4,4
+.Lincy:
+.long 0,2,4,6,1,3,5,7
+.Leight:
+.long 8,8,8,8,8,8,8,8
+.Lrot16:
+.byte 0x2,0x3,0x0,0x1, 0x6,0x7,0x4,0x5, 0xa,0xb,0x8,0x9, 0xe,0xf,0xc,0xd
+.Lrot24:
+.byte 0x3,0x0,0x1,0x2, 0x7,0x4,0x5,0x6, 0xb,0x8,0x9,0xa, 0xf,0xc,0xd,0xe
+.Lsigma:
+.byte 101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107,0
+.byte 67,104,97,67,104,97,50,48,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
+.globl ChaCha20_ctr32
+.hidden ChaCha20_ctr32
+.type ChaCha20_ctr32,@function
+.align 64
+ChaCha20_ctr32:
+ cmpq $0,%rdx
+ je .Lno_data
+ movq OPENSSL_ia32cap_P+4(%rip),%r10
+ testl $512,%r10d
+ jnz .LChaCha20_ssse3
+
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ subq $64+24,%rsp
+
+
+ movdqu (%rcx),%xmm1
+ movdqu 16(%rcx),%xmm2
+ movdqu (%r8),%xmm3
+ movdqa .Lone(%rip),%xmm4
+
+
+ movdqa %xmm1,16(%rsp)
+ movdqa %xmm2,32(%rsp)
+ movdqa %xmm3,48(%rsp)
+ movq %rdx,%rbp
+ jmp .Loop_outer
+
+.align 32
+.Loop_outer:
+ movl $0x61707865,%eax
+ movl $0x3320646e,%ebx
+ movl $0x79622d32,%ecx
+ movl $0x6b206574,%edx
+ movl 16(%rsp),%r8d
+ movl 20(%rsp),%r9d
+ movl 24(%rsp),%r10d
+ movl 28(%rsp),%r11d
+ movd %xmm3,%r12d
+ movl 52(%rsp),%r13d
+ movl 56(%rsp),%r14d
+ movl 60(%rsp),%r15d
+
+ movq %rbp,64+0(%rsp)
+ movl $10,%ebp
+ movq %rsi,64+8(%rsp)
+.byte 102,72,15,126,214
+ movq %rdi,64+16(%rsp)
+ movq %rsi,%rdi
+ shrq $32,%rdi
+ jmp .Loop
+
+.align 32
+.Loop:
+ addl %r8d,%eax
+ xorl %eax,%r12d
+ roll $16,%r12d
+ addl %r9d,%ebx
+ xorl %ebx,%r13d
+ roll $16,%r13d
+ addl %r12d,%esi
+ xorl %esi,%r8d
+ roll $12,%r8d
+ addl %r13d,%edi
+ xorl %edi,%r9d
+ roll $12,%r9d
+ addl %r8d,%eax
+ xorl %eax,%r12d
+ roll $8,%r12d
+ addl %r9d,%ebx
+ xorl %ebx,%r13d
+ roll $8,%r13d
+ addl %r12d,%esi
+ xorl %esi,%r8d
+ roll $7,%r8d
+ addl %r13d,%edi
+ xorl %edi,%r9d
+ roll $7,%r9d
+ movl %esi,32(%rsp)
+ movl %edi,36(%rsp)
+ movl 40(%rsp),%esi
+ movl 44(%rsp),%edi
+ addl %r10d,%ecx
+ xorl %ecx,%r14d
+ roll $16,%r14d
+ addl %r11d,%edx
+ xorl %edx,%r15d
+ roll $16,%r15d
+ addl %r14d,%esi
+ xorl %esi,%r10d
+ roll $12,%r10d
+ addl %r15d,%edi
+ xorl %edi,%r11d
+ roll $12,%r11d
+ addl %r10d,%ecx
+ xorl %ecx,%r14d
+ roll $8,%r14d
+ addl %r11d,%edx
+ xorl %edx,%r15d
+ roll $8,%r15d
+ addl %r14d,%esi
+ xorl %esi,%r10d
+ roll $7,%r10d
+ addl %r15d,%edi
+ xorl %edi,%r11d
+ roll $7,%r11d
+ addl %r9d,%eax
+ xorl %eax,%r15d
+ roll $16,%r15d
+ addl %r10d,%ebx
+ xorl %ebx,%r12d
+ roll $16,%r12d
+ addl %r15d,%esi
+ xorl %esi,%r9d
+ roll $12,%r9d
+ addl %r12d,%edi
+ xorl %edi,%r10d
+ roll $12,%r10d
+ addl %r9d,%eax
+ xorl %eax,%r15d
+ roll $8,%r15d
+ addl %r10d,%ebx
+ xorl %ebx,%r12d
+ roll $8,%r12d
+ addl %r15d,%esi
+ xorl %esi,%r9d
+ roll $7,%r9d
+ addl %r12d,%edi
+ xorl %edi,%r10d
+ roll $7,%r10d
+ movl %esi,40(%rsp)
+ movl %edi,44(%rsp)
+ movl 32(%rsp),%esi
+ movl 36(%rsp),%edi
+ addl %r11d,%ecx
+ xorl %ecx,%r13d
+ roll $16,%r13d
+ addl %r8d,%edx
+ xorl %edx,%r14d
+ roll $16,%r14d
+ addl %r13d,%esi
+ xorl %esi,%r11d
+ roll $12,%r11d
+ addl %r14d,%edi
+ xorl %edi,%r8d
+ roll $12,%r8d
+ addl %r11d,%ecx
+ xorl %ecx,%r13d
+ roll $8,%r13d
+ addl %r8d,%edx
+ xorl %edx,%r14d
+ roll $8,%r14d
+ addl %r13d,%esi
+ xorl %esi,%r11d
+ roll $7,%r11d
+ addl %r14d,%edi
+ xorl %edi,%r8d
+ roll $7,%r8d
+ decl %ebp
+ jnz .Loop
+ movl %edi,36(%rsp)
+ movl %esi,32(%rsp)
+ movq 64(%rsp),%rbp
+ movdqa %xmm2,%xmm1
+ movq 64+8(%rsp),%rsi
+ paddd %xmm4,%xmm3
+ movq 64+16(%rsp),%rdi
+
+ addl $0x61707865,%eax
+ addl $0x3320646e,%ebx
+ addl $0x79622d32,%ecx
+ addl $0x6b206574,%edx
+ addl 16(%rsp),%r8d
+ addl 20(%rsp),%r9d
+ addl 24(%rsp),%r10d
+ addl 28(%rsp),%r11d
+ addl 48(%rsp),%r12d
+ addl 52(%rsp),%r13d
+ addl 56(%rsp),%r14d
+ addl 60(%rsp),%r15d
+ paddd 32(%rsp),%xmm1
+
+ cmpq $64,%rbp
+ jb .Ltail
+
+ xorl 0(%rsi),%eax
+ xorl 4(%rsi),%ebx
+ xorl 8(%rsi),%ecx
+ xorl 12(%rsi),%edx
+ xorl 16(%rsi),%r8d
+ xorl 20(%rsi),%r9d
+ xorl 24(%rsi),%r10d
+ xorl 28(%rsi),%r11d
+ movdqu 32(%rsi),%xmm0
+ xorl 48(%rsi),%r12d
+ xorl 52(%rsi),%r13d
+ xorl 56(%rsi),%r14d
+ xorl 60(%rsi),%r15d
+ leaq 64(%rsi),%rsi
+ pxor %xmm1,%xmm0
+
+ movdqa %xmm2,32(%rsp)
+ movd %xmm3,48(%rsp)
+
+ 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)
+ movdqu %xmm0,32(%rdi)
+ movl %r12d,48(%rdi)
+ movl %r13d,52(%rdi)
+ movl %r14d,56(%rdi)
+ movl %r15d,60(%rdi)
+ leaq 64(%rdi),%rdi
+
+ subq $64,%rbp
+ jnz .Loop_outer
+
+ jmp .Ldone
+
+.align 16
+.Ltail:
+ movl %eax,0(%rsp)
+ movl %ebx,4(%rsp)
+ xorq %rbx,%rbx
+ movl %ecx,8(%rsp)
+ movl %edx,12(%rsp)
+ movl %r8d,16(%rsp)
+ movl %r9d,20(%rsp)
+ movl %r10d,24(%rsp)
+ movl %r11d,28(%rsp)
+ movdqa %xmm1,32(%rsp)
+ movl %r12d,48(%rsp)
+ movl %r13d,52(%rsp)
+ movl %r14d,56(%rsp)
+ movl %r15d,60(%rsp)
+
+.Loop_tail:
+ movzbl (%rsi,%rbx,1),%eax
+ movzbl (%rsp,%rbx,1),%edx
+ leaq 1(%rbx),%rbx
+ xorl %edx,%eax
+ movb %al,-1(%rdi,%rbx,1)
+ decq %rbp
+ jnz .Loop_tail
+
+.Ldone:
+ addq $64+24,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbp
+ popq %rbx
+.Lno_data:
+ .byte 0xf3,0xc3
+.size ChaCha20_ctr32,.-ChaCha20_ctr32
+.type ChaCha20_ssse3,@function
+.align 32
+ChaCha20_ssse3:
+.LChaCha20_ssse3:
+ cmpq $128,%rdx
+ ja .LChaCha20_4x
+
+.Ldo_sse3_after_all:
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+
+ subq $64+24,%rsp
+ movdqa .Lsigma(%rip),%xmm0
+ movdqu (%rcx),%xmm1
+ movdqu 16(%rcx),%xmm2
+ movdqu (%r8),%xmm3
+ movdqa .Lrot16(%rip),%xmm6
+ movdqa .Lrot24(%rip),%xmm7
+
+ movdqa %xmm0,0(%rsp)
+ movdqa %xmm1,16(%rsp)
+ movdqa %xmm2,32(%rsp)
+ movdqa %xmm3,48(%rsp)
+ movl $10,%ebp
+ jmp .Loop_ssse3
+
+.align 32
+.Loop_outer_ssse3:
+ movdqa .Lone(%rip),%xmm3
+ movdqa 0(%rsp),%xmm0
+ movdqa 16(%rsp),%xmm1
+ movdqa 32(%rsp),%xmm2
+ paddd 48(%rsp),%xmm3
+ movl $10,%ebp
+ movdqa %xmm3,48(%rsp)
+ jmp .Loop_ssse3
+
+.align 32
+.Loop_ssse3:
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,222
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $20,%xmm1
+ pslld $12,%xmm4
+ por %xmm4,%xmm1
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,223
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $25,%xmm1
+ pslld $7,%xmm4
+ por %xmm4,%xmm1
+ pshufd $78,%xmm2,%xmm2
+ pshufd $57,%xmm1,%xmm1
+ pshufd $147,%xmm3,%xmm3
+ nop
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,222
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $20,%xmm1
+ pslld $12,%xmm4
+ por %xmm4,%xmm1
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,223
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $25,%xmm1
+ pslld $7,%xmm4
+ por %xmm4,%xmm1
+ pshufd $78,%xmm2,%xmm2
+ pshufd $147,%xmm1,%xmm1
+ pshufd $57,%xmm3,%xmm3
+ decl %ebp
+ jnz .Loop_ssse3
+ paddd 0(%rsp),%xmm0
+ paddd 16(%rsp),%xmm1
+ paddd 32(%rsp),%xmm2
+ paddd 48(%rsp),%xmm3
+
+ cmpq $64,%rdx
+ jb .Ltail_ssse3
+
+ movdqu 0(%rsi),%xmm4
+ movdqu 16(%rsi),%xmm5
+ pxor %xmm4,%xmm0
+ movdqu 32(%rsi),%xmm4
+ pxor %xmm5,%xmm1
+ movdqu 48(%rsi),%xmm5
+ leaq 64(%rsi),%rsi
+ pxor %xmm4,%xmm2
+ pxor %xmm5,%xmm3
+
+ movdqu %xmm0,0(%rdi)
+ movdqu %xmm1,16(%rdi)
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm3,48(%rdi)
+ leaq 64(%rdi),%rdi
+
+ subq $64,%rdx
+ jnz .Loop_outer_ssse3
+
+ jmp .Ldone_ssse3
+
+.align 16
+.Ltail_ssse3:
+ movdqa %xmm0,0(%rsp)
+ movdqa %xmm1,16(%rsp)
+ movdqa %xmm2,32(%rsp)
+ movdqa %xmm3,48(%rsp)
+ xorq %rbx,%rbx
+
+.Loop_tail_ssse3:
+ movzbl (%rsi,%rbx,1),%eax
+ movzbl (%rsp,%rbx,1),%ecx
+ leaq 1(%rbx),%rbx
+ xorl %ecx,%eax
+ movb %al,-1(%rdi,%rbx,1)
+ decq %rdx
+ jnz .Loop_tail_ssse3
+
+.Ldone_ssse3:
+ addq $64+24,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbp
+ popq %rbx
+ .byte 0xf3,0xc3
+.size ChaCha20_ssse3,.-ChaCha20_ssse3
+.type ChaCha20_4x,@function
+.align 32
+ChaCha20_4x:
+.LChaCha20_4x:
+ movq %r10,%r11
+ shrq $32,%r10
+ testq $32,%r10
+ jnz .LChaCha20_8x
+ cmpq $192,%rdx
+ ja .Lproceed4x
+
+ andq $71303168,%r11
+ cmpq $4194304,%r11
+ je .Ldo_sse3_after_all
+
+.Lproceed4x:
+ leaq -120(%rsp),%r11
+ subq $0x148+0,%rsp
+ movdqa .Lsigma(%rip),%xmm11
+ movdqu (%rcx),%xmm15
+ movdqu 16(%rcx),%xmm7
+ movdqu (%r8),%xmm3
+ leaq 256(%rsp),%rcx
+ leaq .Lrot16(%rip),%r10
+ leaq .Lrot24(%rip),%r11
+
+ pshufd $0x00,%xmm11,%xmm8
+ pshufd $0x55,%xmm11,%xmm9
+ movdqa %xmm8,64(%rsp)
+ pshufd $0xaa,%xmm11,%xmm10
+ movdqa %xmm9,80(%rsp)
+ pshufd $0xff,%xmm11,%xmm11
+ movdqa %xmm10,96(%rsp)
+ movdqa %xmm11,112(%rsp)
+
+ pshufd $0x00,%xmm15,%xmm12
+ pshufd $0x55,%xmm15,%xmm13
+ movdqa %xmm12,128-256(%rcx)
+ pshufd $0xaa,%xmm15,%xmm14
+ movdqa %xmm13,144-256(%rcx)
+ pshufd $0xff,%xmm15,%xmm15
+ movdqa %xmm14,160-256(%rcx)
+ movdqa %xmm15,176-256(%rcx)
+
+ pshufd $0x00,%xmm7,%xmm4
+ pshufd $0x55,%xmm7,%xmm5
+ movdqa %xmm4,192-256(%rcx)
+ pshufd $0xaa,%xmm7,%xmm6
+ movdqa %xmm5,208-256(%rcx)
+ pshufd $0xff,%xmm7,%xmm7
+ movdqa %xmm6,224-256(%rcx)
+ movdqa %xmm7,240-256(%rcx)
+
+ pshufd $0x00,%xmm3,%xmm0
+ pshufd $0x55,%xmm3,%xmm1
+ paddd .Linc(%rip),%xmm0
+ pshufd $0xaa,%xmm3,%xmm2
+ movdqa %xmm1,272-256(%rcx)
+ pshufd $0xff,%xmm3,%xmm3
+ movdqa %xmm2,288-256(%rcx)
+ movdqa %xmm3,304-256(%rcx)
+
+ jmp .Loop_enter4x
+
+.align 32
+.Loop_outer4x:
+ movdqa 64(%rsp),%xmm8
+ movdqa 80(%rsp),%xmm9
+ movdqa 96(%rsp),%xmm10
+ movdqa 112(%rsp),%xmm11
+ movdqa 128-256(%rcx),%xmm12
+ movdqa 144-256(%rcx),%xmm13
+ movdqa 160-256(%rcx),%xmm14
+ movdqa 176-256(%rcx),%xmm15
+ movdqa 192-256(%rcx),%xmm4
+ movdqa 208-256(%rcx),%xmm5
+ movdqa 224-256(%rcx),%xmm6
+ movdqa 240-256(%rcx),%xmm7
+ movdqa 256-256(%rcx),%xmm0
+ movdqa 272-256(%rcx),%xmm1
+ movdqa 288-256(%rcx),%xmm2
+ movdqa 304-256(%rcx),%xmm3
+ paddd .Lfour(%rip),%xmm0
+
+.Loop_enter4x:
+ movdqa %xmm6,32(%rsp)
+ movdqa %xmm7,48(%rsp)
+ movdqa (%r10),%xmm7
+ movl $10,%eax
+ movdqa %xmm0,256-256(%rcx)
+ jmp .Loop4x
+
+.align 32
+.Loop4x:
+ paddd %xmm12,%xmm8
+ paddd %xmm13,%xmm9
+ pxor %xmm8,%xmm0
+ pxor %xmm9,%xmm1
+.byte 102,15,56,0,199
+.byte 102,15,56,0,207
+ paddd %xmm0,%xmm4
+ paddd %xmm1,%xmm5
+ pxor %xmm4,%xmm12
+ pxor %xmm5,%xmm13
+ movdqa %xmm12,%xmm6
+ pslld $12,%xmm12
+ psrld $20,%xmm6
+ movdqa %xmm13,%xmm7
+ pslld $12,%xmm13
+ por %xmm6,%xmm12
+ psrld $20,%xmm7
+ movdqa (%r11),%xmm6
+ por %xmm7,%xmm13
+ paddd %xmm12,%xmm8
+ paddd %xmm13,%xmm9
+ pxor %xmm8,%xmm0
+ pxor %xmm9,%xmm1
+.byte 102,15,56,0,198
+.byte 102,15,56,0,206
+ paddd %xmm0,%xmm4
+ paddd %xmm1,%xmm5
+ pxor %xmm4,%xmm12
+ pxor %xmm5,%xmm13
+ movdqa %xmm12,%xmm7
+ pslld $7,%xmm12
+ psrld $25,%xmm7
+ movdqa %xmm13,%xmm6
+ pslld $7,%xmm13
+ por %xmm7,%xmm12
+ psrld $25,%xmm6
+ movdqa (%r10),%xmm7
+ por %xmm6,%xmm13
+ movdqa %xmm4,0(%rsp)
+ movdqa %xmm5,16(%rsp)
+ movdqa 32(%rsp),%xmm4
+ movdqa 48(%rsp),%xmm5
+ paddd %xmm14,%xmm10
+ paddd %xmm15,%xmm11
+ pxor %xmm10,%xmm2
+ pxor %xmm11,%xmm3
+.byte 102,15,56,0,215
+.byte 102,15,56,0,223
+ paddd %xmm2,%xmm4
+ paddd %xmm3,%xmm5
+ pxor %xmm4,%xmm14
+ pxor %xmm5,%xmm15
+ movdqa %xmm14,%xmm6
+ pslld $12,%xmm14
+ psrld $20,%xmm6
+ movdqa %xmm15,%xmm7
+ pslld $12,%xmm15
+ por %xmm6,%xmm14
+ psrld $20,%xmm7
+ movdqa (%r11),%xmm6
+ por %xmm7,%xmm15
+ paddd %xmm14,%xmm10
+ paddd %xmm15,%xmm11
+ pxor %xmm10,%xmm2
+ pxor %xmm11,%xmm3
+.byte 102,15,56,0,214
+.byte 102,15,56,0,222
+ paddd %xmm2,%xmm4
+ paddd %xmm3,%xmm5
+ pxor %xmm4,%xmm14
+ pxor %xmm5,%xmm15
+ movdqa %xmm14,%xmm7
+ pslld $7,%xmm14
+ psrld $25,%xmm7
+ movdqa %xmm15,%xmm6
+ pslld $7,%xmm15
+ por %xmm7,%xmm14
+ psrld $25,%xmm6
+ movdqa (%r10),%xmm7
+ por %xmm6,%xmm15
+ paddd %xmm13,%xmm8
+ paddd %xmm14,%xmm9
+ pxor %xmm8,%xmm3
+ pxor %xmm9,%xmm0
+.byte 102,15,56,0,223
+.byte 102,15,56,0,199
+ paddd %xmm3,%xmm4
+ paddd %xmm0,%xmm5
+ pxor %xmm4,%xmm13
+ pxor %xmm5,%xmm14
+ movdqa %xmm13,%xmm6
+ pslld $12,%xmm13
+ psrld $20,%xmm6
+ movdqa %xmm14,%xmm7
+ pslld $12,%xmm14
+ por %xmm6,%xmm13
+ psrld $20,%xmm7
+ movdqa (%r11),%xmm6
+ por %xmm7,%xmm14
+ paddd %xmm13,%xmm8
+ paddd %xmm14,%xmm9
+ pxor %xmm8,%xmm3
+ pxor %xmm9,%xmm0
+.byte 102,15,56,0,222
+.byte 102,15,56,0,198
+ paddd %xmm3,%xmm4
+ paddd %xmm0,%xmm5
+ pxor %xmm4,%xmm13
+ pxor %xmm5,%xmm14
+ movdqa %xmm13,%xmm7
+ pslld $7,%xmm13
+ psrld $25,%xmm7
+ movdqa %xmm14,%xmm6
+ pslld $7,%xmm14
+ por %xmm7,%xmm13
+ psrld $25,%xmm6
+ movdqa (%r10),%xmm7
+ por %xmm6,%xmm14
+ movdqa %xmm4,32(%rsp)
+ movdqa %xmm5,48(%rsp)
+ movdqa 0(%rsp),%xmm4
+ movdqa 16(%rsp),%xmm5
+ paddd %xmm15,%xmm10
+ paddd %xmm12,%xmm11
+ pxor %xmm10,%xmm1
+ pxor %xmm11,%xmm2
+.byte 102,15,56,0,207
+.byte 102,15,56,0,215
+ paddd %xmm1,%xmm4
+ paddd %xmm2,%xmm5
+ pxor %xmm4,%xmm15
+ pxor %xmm5,%xmm12
+ movdqa %xmm15,%xmm6
+ pslld $12,%xmm15
+ psrld $20,%xmm6
+ movdqa %xmm12,%xmm7
+ pslld $12,%xmm12
+ por %xmm6,%xmm15
+ psrld $20,%xmm7
+ movdqa (%r11),%xmm6
+ por %xmm7,%xmm12
+ paddd %xmm15,%xmm10
+ paddd %xmm12,%xmm11
+ pxor %xmm10,%xmm1
+ pxor %xmm11,%xmm2
+.byte 102,15,56,0,206
+.byte 102,15,56,0,214
+ paddd %xmm1,%xmm4
+ paddd %xmm2,%xmm5
+ pxor %xmm4,%xmm15
+ pxor %xmm5,%xmm12
+ movdqa %xmm15,%xmm7
+ pslld $7,%xmm15
+ psrld $25,%xmm7
+ movdqa %xmm12,%xmm6
+ pslld $7,%xmm12
+ por %xmm7,%xmm15
+ psrld $25,%xmm6
+ movdqa (%r10),%xmm7
+ por %xmm6,%xmm12
+ decl %eax
+ jnz .Loop4x
+
+ paddd 64(%rsp),%xmm8
+ paddd 80(%rsp),%xmm9
+ paddd 96(%rsp),%xmm10
+ paddd 112(%rsp),%xmm11
+
+ movdqa %xmm8,%xmm6
+ punpckldq %xmm9,%xmm8
+ movdqa %xmm10,%xmm7
+ punpckldq %xmm11,%xmm10
+ punpckhdq %xmm9,%xmm6
+ punpckhdq %xmm11,%xmm7
+ movdqa %xmm8,%xmm9
+ punpcklqdq %xmm10,%xmm8
+ movdqa %xmm6,%xmm11
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm10,%xmm9
+ punpckhqdq %xmm7,%xmm11
+ paddd 128-256(%rcx),%xmm12
+ paddd 144-256(%rcx),%xmm13
+ paddd 160-256(%rcx),%xmm14
+ paddd 176-256(%rcx),%xmm15
+
+ movdqa %xmm8,0(%rsp)
+ movdqa %xmm9,16(%rsp)
+ movdqa 32(%rsp),%xmm8
+ movdqa 48(%rsp),%xmm9
+
+ movdqa %xmm12,%xmm10
+ punpckldq %xmm13,%xmm12
+ movdqa %xmm14,%xmm7
+ punpckldq %xmm15,%xmm14
+ punpckhdq %xmm13,%xmm10
+ punpckhdq %xmm15,%xmm7
+ movdqa %xmm12,%xmm13
+ punpcklqdq %xmm14,%xmm12
+ movdqa %xmm10,%xmm15
+ punpcklqdq %xmm7,%xmm10
+ punpckhqdq %xmm14,%xmm13
+ punpckhqdq %xmm7,%xmm15
+ paddd 192-256(%rcx),%xmm4
+ paddd 208-256(%rcx),%xmm5
+ paddd 224-256(%rcx),%xmm8
+ paddd 240-256(%rcx),%xmm9
+
+ movdqa %xmm6,32(%rsp)
+ movdqa %xmm11,48(%rsp)
+
+ movdqa %xmm4,%xmm14
+ punpckldq %xmm5,%xmm4
+ movdqa %xmm8,%xmm7
+ punpckldq %xmm9,%xmm8
+ punpckhdq %xmm5,%xmm14
+ punpckhdq %xmm9,%xmm7
+ movdqa %xmm4,%xmm5
+ punpcklqdq %xmm8,%xmm4
+ movdqa %xmm14,%xmm9
+ punpcklqdq %xmm7,%xmm14
+ punpckhqdq %xmm8,%xmm5
+ punpckhqdq %xmm7,%xmm9
+ paddd 256-256(%rcx),%xmm0
+ paddd 272-256(%rcx),%xmm1
+ paddd 288-256(%rcx),%xmm2
+ paddd 304-256(%rcx),%xmm3
+
+ movdqa %xmm0,%xmm8
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm8
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm8,%xmm3
+ punpcklqdq %xmm7,%xmm8
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ cmpq $256,%rdx
+ jb .Ltail4x
+
+ movdqu 0(%rsi),%xmm6
+ movdqu 16(%rsi),%xmm11
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm7
+ pxor 0(%rsp),%xmm6
+ pxor %xmm12,%xmm11
+ pxor %xmm4,%xmm2
+ pxor %xmm0,%xmm7
+
+ movdqu %xmm6,0(%rdi)
+ movdqu 64(%rsi),%xmm6
+ movdqu %xmm11,16(%rdi)
+ movdqu 80(%rsi),%xmm11
+ movdqu %xmm2,32(%rdi)
+ movdqu 96(%rsi),%xmm2
+ movdqu %xmm7,48(%rdi)
+ movdqu 112(%rsi),%xmm7
+ leaq 128(%rsi),%rsi
+ pxor 16(%rsp),%xmm6
+ pxor %xmm13,%xmm11
+ pxor %xmm5,%xmm2
+ pxor %xmm1,%xmm7
+
+ movdqu %xmm6,64(%rdi)
+ movdqu 0(%rsi),%xmm6
+ movdqu %xmm11,80(%rdi)
+ movdqu 16(%rsi),%xmm11
+ movdqu %xmm2,96(%rdi)
+ movdqu 32(%rsi),%xmm2
+ movdqu %xmm7,112(%rdi)
+ leaq 128(%rdi),%rdi
+ movdqu 48(%rsi),%xmm7
+ pxor 32(%rsp),%xmm6
+ pxor %xmm10,%xmm11
+ pxor %xmm14,%xmm2
+ pxor %xmm8,%xmm7
+
+ movdqu %xmm6,0(%rdi)
+ movdqu 64(%rsi),%xmm6
+ movdqu %xmm11,16(%rdi)
+ movdqu 80(%rsi),%xmm11
+ movdqu %xmm2,32(%rdi)
+ movdqu 96(%rsi),%xmm2
+ movdqu %xmm7,48(%rdi)
+ movdqu 112(%rsi),%xmm7
+ leaq 128(%rsi),%rsi
+ pxor 48(%rsp),%xmm6
+ pxor %xmm15,%xmm11
+ pxor %xmm9,%xmm2
+ pxor %xmm3,%xmm7
+ movdqu %xmm6,64(%rdi)
+ movdqu %xmm11,80(%rdi)
+ movdqu %xmm2,96(%rdi)
+ movdqu %xmm7,112(%rdi)
+ leaq 128(%rdi),%rdi
+
+ subq $256,%rdx
+ jnz .Loop_outer4x
+
+ jmp .Ldone4x
+
+.Ltail4x:
+ cmpq $192,%rdx
+ jae .L192_or_more4x
+ cmpq $128,%rdx
+ jae .L128_or_more4x
+ cmpq $64,%rdx
+ jae .L64_or_more4x
+
+
+ xorq %r10,%r10
+
+ movdqa %xmm12,16(%rsp)
+ movdqa %xmm4,32(%rsp)
+ movdqa %xmm0,48(%rsp)
+ jmp .Loop_tail4x
+
+.align 32
+.L64_or_more4x:
+ movdqu 0(%rsi),%xmm6
+ movdqu 16(%rsi),%xmm11
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm7
+ pxor 0(%rsp),%xmm6
+ pxor %xmm12,%xmm11
+ pxor %xmm4,%xmm2
+ pxor %xmm0,%xmm7
+ movdqu %xmm6,0(%rdi)
+ movdqu %xmm11,16(%rdi)
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm7,48(%rdi)
+ je .Ldone4x
+
+ movdqa 16(%rsp),%xmm6
+ leaq 64(%rsi),%rsi
+ xorq %r10,%r10
+ movdqa %xmm6,0(%rsp)
+ movdqa %xmm13,16(%rsp)
+ leaq 64(%rdi),%rdi
+ movdqa %xmm5,32(%rsp)
+ subq $64,%rdx
+ movdqa %xmm1,48(%rsp)
+ jmp .Loop_tail4x
+
+.align 32
+.L128_or_more4x:
+ movdqu 0(%rsi),%xmm6
+ movdqu 16(%rsi),%xmm11
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm7
+ pxor 0(%rsp),%xmm6
+ pxor %xmm12,%xmm11
+ pxor %xmm4,%xmm2
+ pxor %xmm0,%xmm7
+
+ movdqu %xmm6,0(%rdi)
+ movdqu 64(%rsi),%xmm6
+ movdqu %xmm11,16(%rdi)
+ movdqu 80(%rsi),%xmm11
+ movdqu %xmm2,32(%rdi)
+ movdqu 96(%rsi),%xmm2
+ movdqu %xmm7,48(%rdi)
+ movdqu 112(%rsi),%xmm7
+ pxor 16(%rsp),%xmm6
+ pxor %xmm13,%xmm11
+ pxor %xmm5,%xmm2
+ pxor %xmm1,%xmm7
+ movdqu %xmm6,64(%rdi)
+ movdqu %xmm11,80(%rdi)
+ movdqu %xmm2,96(%rdi)
+ movdqu %xmm7,112(%rdi)
+ je .Ldone4x
+
+ movdqa 32(%rsp),%xmm6
+ leaq 128(%rsi),%rsi
+ xorq %r10,%r10
+ movdqa %xmm6,0(%rsp)
+ movdqa %xmm10,16(%rsp)
+ leaq 128(%rdi),%rdi
+ movdqa %xmm14,32(%rsp)
+ subq $128,%rdx
+ movdqa %xmm8,48(%rsp)
+ jmp .Loop_tail4x
+
+.align 32
+.L192_or_more4x:
+ movdqu 0(%rsi),%xmm6
+ movdqu 16(%rsi),%xmm11
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm7
+ pxor 0(%rsp),%xmm6
+ pxor %xmm12,%xmm11
+ pxor %xmm4,%xmm2
+ pxor %xmm0,%xmm7
+
+ movdqu %xmm6,0(%rdi)
+ movdqu 64(%rsi),%xmm6
+ movdqu %xmm11,16(%rdi)
+ movdqu 80(%rsi),%xmm11
+ movdqu %xmm2,32(%rdi)
+ movdqu 96(%rsi),%xmm2
+ movdqu %xmm7,48(%rdi)
+ movdqu 112(%rsi),%xmm7
+ leaq 128(%rsi),%rsi
+ pxor 16(%rsp),%xmm6
+ pxor %xmm13,%xmm11
+ pxor %xmm5,%xmm2
+ pxor %xmm1,%xmm7
+
+ movdqu %xmm6,64(%rdi)
+ movdqu 0(%rsi),%xmm6
+ movdqu %xmm11,80(%rdi)
+ movdqu 16(%rsi),%xmm11
+ movdqu %xmm2,96(%rdi)
+ movdqu 32(%rsi),%xmm2
+ movdqu %xmm7,112(%rdi)
+ leaq 128(%rdi),%rdi
+ movdqu 48(%rsi),%xmm7
+ pxor 32(%rsp),%xmm6
+ pxor %xmm10,%xmm11
+ pxor %xmm14,%xmm2
+ pxor %xmm8,%xmm7
+ movdqu %xmm6,0(%rdi)
+ movdqu %xmm11,16(%rdi)
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm7,48(%rdi)
+ je .Ldone4x
+
+ movdqa 48(%rsp),%xmm6
+ leaq 64(%rsi),%rsi
+ xorq %r10,%r10
+ movdqa %xmm6,0(%rsp)
+ movdqa %xmm15,16(%rsp)
+ leaq 64(%rdi),%rdi
+ movdqa %xmm9,32(%rsp)
+ subq $192,%rdx
+ movdqa %xmm3,48(%rsp)
+
+.Loop_tail4x:
+ movzbl (%rsi,%r10,1),%eax
+ movzbl (%rsp,%r10,1),%ecx
+ leaq 1(%r10),%r10
+ xorl %ecx,%eax
+ movb %al,-1(%rdi,%r10,1)
+ decq %rdx
+ jnz .Loop_tail4x
+
+.Ldone4x:
+ addq $0x148+0,%rsp
+ .byte 0xf3,0xc3
+.size ChaCha20_4x,.-ChaCha20_4x
+.type ChaCha20_8x,@function
+.align 32
+ChaCha20_8x:
+.LChaCha20_8x:
+ movq %rsp,%r10
+ subq $0x280+8,%rsp
+ andq $-32,%rsp
+ vzeroupper
+ movq %r10,640(%rsp)
+
+
+
+
+
+
+
+
+
+
+ vbroadcasti128 .Lsigma(%rip),%ymm11
+ vbroadcasti128 (%rcx),%ymm3
+ vbroadcasti128 16(%rcx),%ymm15
+ vbroadcasti128 (%r8),%ymm7
+ leaq 256(%rsp),%rcx
+ leaq 512(%rsp),%rax
+ leaq .Lrot16(%rip),%r10
+ leaq .Lrot24(%rip),%r11
+
+ vpshufd $0x00,%ymm11,%ymm8
+ vpshufd $0x55,%ymm11,%ymm9
+ vmovdqa %ymm8,128-256(%rcx)
+ vpshufd $0xaa,%ymm11,%ymm10
+ vmovdqa %ymm9,160-256(%rcx)
+ vpshufd $0xff,%ymm11,%ymm11
+ vmovdqa %ymm10,192-256(%rcx)
+ vmovdqa %ymm11,224-256(%rcx)
+
+ vpshufd $0x00,%ymm3,%ymm0
+ vpshufd $0x55,%ymm3,%ymm1
+ vmovdqa %ymm0,256-256(%rcx)
+ vpshufd $0xaa,%ymm3,%ymm2
+ vmovdqa %ymm1,288-256(%rcx)
+ vpshufd $0xff,%ymm3,%ymm3
+ vmovdqa %ymm2,320-256(%rcx)
+ vmovdqa %ymm3,352-256(%rcx)
+
+ vpshufd $0x00,%ymm15,%ymm12
+ vpshufd $0x55,%ymm15,%ymm13
+ vmovdqa %ymm12,384-512(%rax)
+ vpshufd $0xaa,%ymm15,%ymm14
+ vmovdqa %ymm13,416-512(%rax)
+ vpshufd $0xff,%ymm15,%ymm15
+ vmovdqa %ymm14,448-512(%rax)
+ vmovdqa %ymm15,480-512(%rax)
+
+ vpshufd $0x00,%ymm7,%ymm4
+ vpshufd $0x55,%ymm7,%ymm5
+ vpaddd .Lincy(%rip),%ymm4,%ymm4
+ vpshufd $0xaa,%ymm7,%ymm6
+ vmovdqa %ymm5,544-512(%rax)
+ vpshufd $0xff,%ymm7,%ymm7
+ vmovdqa %ymm6,576-512(%rax)
+ vmovdqa %ymm7,608-512(%rax)
+
+ jmp .Loop_enter8x
+
+.align 32
+.Loop_outer8x:
+ vmovdqa 128-256(%rcx),%ymm8
+ vmovdqa 160-256(%rcx),%ymm9
+ vmovdqa 192-256(%rcx),%ymm10
+ vmovdqa 224-256(%rcx),%ymm11
+ vmovdqa 256-256(%rcx),%ymm0
+ vmovdqa 288-256(%rcx),%ymm1
+ vmovdqa 320-256(%rcx),%ymm2
+ vmovdqa 352-256(%rcx),%ymm3
+ vmovdqa 384-512(%rax),%ymm12
+ vmovdqa 416-512(%rax),%ymm13
+ vmovdqa 448-512(%rax),%ymm14
+ vmovdqa 480-512(%rax),%ymm15
+ vmovdqa 512-512(%rax),%ymm4
+ vmovdqa 544-512(%rax),%ymm5
+ vmovdqa 576-512(%rax),%ymm6
+ vmovdqa 608-512(%rax),%ymm7
+ vpaddd .Leight(%rip),%ymm4,%ymm4
+
+.Loop_enter8x:
+ vmovdqa %ymm14,64(%rsp)
+ vmovdqa %ymm15,96(%rsp)
+ vbroadcasti128 (%r10),%ymm15
+ vmovdqa %ymm4,512-512(%rax)
+ movl $10,%eax
+ jmp .Loop8x
+
+.align 32
+.Loop8x:
+ vpaddd %ymm0,%ymm8,%ymm8
+ vpxor %ymm4,%ymm8,%ymm4
+ vpshufb %ymm15,%ymm4,%ymm4
+ vpaddd %ymm1,%ymm9,%ymm9
+ vpxor %ymm5,%ymm9,%ymm5
+ vpshufb %ymm15,%ymm5,%ymm5
+ vpaddd %ymm4,%ymm12,%ymm12
+ vpxor %ymm0,%ymm12,%ymm0
+ vpslld $12,%ymm0,%ymm14
+ vpsrld $20,%ymm0,%ymm0
+ vpor %ymm0,%ymm14,%ymm0
+ vbroadcasti128 (%r11),%ymm14
+ vpaddd %ymm5,%ymm13,%ymm13
+ vpxor %ymm1,%ymm13,%ymm1
+ vpslld $12,%ymm1,%ymm15
+ vpsrld $20,%ymm1,%ymm1
+ vpor %ymm1,%ymm15,%ymm1
+ vpaddd %ymm0,%ymm8,%ymm8
+ vpxor %ymm4,%ymm8,%ymm4
+ vpshufb %ymm14,%ymm4,%ymm4
+ vpaddd %ymm1,%ymm9,%ymm9
+ vpxor %ymm5,%ymm9,%ymm5
+ vpshufb %ymm14,%ymm5,%ymm5
+ vpaddd %ymm4,%ymm12,%ymm12
+ vpxor %ymm0,%ymm12,%ymm0
+ vpslld $7,%ymm0,%ymm15
+ vpsrld $25,%ymm0,%ymm0
+ vpor %ymm0,%ymm15,%ymm0
+ vbroadcasti128 (%r10),%ymm15
+ vpaddd %ymm5,%ymm13,%ymm13
+ vpxor %ymm1,%ymm13,%ymm1
+ vpslld $7,%ymm1,%ymm14
+ vpsrld $25,%ymm1,%ymm1
+ vpor %ymm1,%ymm14,%ymm1
+ vmovdqa %ymm12,0(%rsp)
+ vmovdqa %ymm13,32(%rsp)
+ vmovdqa 64(%rsp),%ymm12
+ vmovdqa 96(%rsp),%ymm13
+ vpaddd %ymm2,%ymm10,%ymm10
+ vpxor %ymm6,%ymm10,%ymm6
+ vpshufb %ymm15,%ymm6,%ymm6
+ vpaddd %ymm3,%ymm11,%ymm11
+ vpxor %ymm7,%ymm11,%ymm7
+ vpshufb %ymm15,%ymm7,%ymm7
+ vpaddd %ymm6,%ymm12,%ymm12
+ vpxor %ymm2,%ymm12,%ymm2
+ vpslld $12,%ymm2,%ymm14
+ vpsrld $20,%ymm2,%ymm2
+ vpor %ymm2,%ymm14,%ymm2
+ vbroadcasti128 (%r11),%ymm14
+ vpaddd %ymm7,%ymm13,%ymm13
+ vpxor %ymm3,%ymm13,%ymm3
+ vpslld $12,%ymm3,%ymm15
+ vpsrld $20,%ymm3,%ymm3
+ vpor %ymm3,%ymm15,%ymm3
+ vpaddd %ymm2,%ymm10,%ymm10
+ vpxor %ymm6,%ymm10,%ymm6
+ vpshufb %ymm14,%ymm6,%ymm6
+ vpaddd %ymm3,%ymm11,%ymm11
+ vpxor %ymm7,%ymm11,%ymm7
+ vpshufb %ymm14,%ymm7,%ymm7
+ vpaddd %ymm6,%ymm12,%ymm12
+ vpxor %ymm2,%ymm12,%ymm2
+ vpslld $7,%ymm2,%ymm15
+ vpsrld $25,%ymm2,%ymm2
+ vpor %ymm2,%ymm15,%ymm2
+ vbroadcasti128 (%r10),%ymm15
+ vpaddd %ymm7,%ymm13,%ymm13
+ vpxor %ymm3,%ymm13,%ymm3
+ vpslld $7,%ymm3,%ymm14
+ vpsrld $25,%ymm3,%ymm3
+ vpor %ymm3,%ymm14,%ymm3
+ vpaddd %ymm1,%ymm8,%ymm8
+ vpxor %ymm7,%ymm8,%ymm7
+ vpshufb %ymm15,%ymm7,%ymm7
+ vpaddd %ymm2,%ymm9,%ymm9
+ vpxor %ymm4,%ymm9,%ymm4
+ vpshufb %ymm15,%ymm4,%ymm4
+ vpaddd %ymm7,%ymm12,%ymm12
+ vpxor %ymm1,%ymm12,%ymm1
+ vpslld $12,%ymm1,%ymm14
+ vpsrld $20,%ymm1,%ymm1
+ vpor %ymm1,%ymm14,%ymm1
+ vbroadcasti128 (%r11),%ymm14
+ vpaddd %ymm4,%ymm13,%ymm13
+ vpxor %ymm2,%ymm13,%ymm2
+ vpslld $12,%ymm2,%ymm15
+ vpsrld $20,%ymm2,%ymm2
+ vpor %ymm2,%ymm15,%ymm2
+ vpaddd %ymm1,%ymm8,%ymm8
+ vpxor %ymm7,%ymm8,%ymm7
+ vpshufb %ymm14,%ymm7,%ymm7
+ vpaddd %ymm2,%ymm9,%ymm9
+ vpxor %ymm4,%ymm9,%ymm4
+ vpshufb %ymm14,%ymm4,%ymm4
+ vpaddd %ymm7,%ymm12,%ymm12
+ vpxor %ymm1,%ymm12,%ymm1
+ vpslld $7,%ymm1,%ymm15
+ vpsrld $25,%ymm1,%ymm1
+ vpor %ymm1,%ymm15,%ymm1
+ vbroadcasti128 (%r10),%ymm15
+ vpaddd %ymm4,%ymm13,%ymm13
+ vpxor %ymm2,%ymm13,%ymm2
+ vpslld $7,%ymm2,%ymm14
+ vpsrld $25,%ymm2,%ymm2
+ vpor %ymm2,%ymm14,%ymm2
+ vmovdqa %ymm12,64(%rsp)
+ vmovdqa %ymm13,96(%rsp)
+ vmovdqa 0(%rsp),%ymm12
+ vmovdqa 32(%rsp),%ymm13
+ vpaddd %ymm3,%ymm10,%ymm10
+ vpxor %ymm5,%ymm10,%ymm5
+ vpshufb %ymm15,%ymm5,%ymm5
+ vpaddd %ymm0,%ymm11,%ymm11
+ vpxor %ymm6,%ymm11,%ymm6
+ vpshufb %ymm15,%ymm6,%ymm6
+ vpaddd %ymm5,%ymm12,%ymm12
+ vpxor %ymm3,%ymm12,%ymm3
+ vpslld $12,%ymm3,%ymm14
+ vpsrld $20,%ymm3,%ymm3
+ vpor %ymm3,%ymm14,%ymm3
+ vbroadcasti128 (%r11),%ymm14
+ vpaddd %ymm6,%ymm13,%ymm13
+ vpxor %ymm0,%ymm13,%ymm0
+ vpslld $12,%ymm0,%ymm15
+ vpsrld $20,%ymm0,%ymm0
+ vpor %ymm0,%ymm15,%ymm0
+ vpaddd %ymm3,%ymm10,%ymm10
+ vpxor %ymm5,%ymm10,%ymm5
+ vpshufb %ymm14,%ymm5,%ymm5
+ vpaddd %ymm0,%ymm11,%ymm11
+ vpxor %ymm6,%ymm11,%ymm6
+ vpshufb %ymm14,%ymm6,%ymm6
+ vpaddd %ymm5,%ymm12,%ymm12
+ vpxor %ymm3,%ymm12,%ymm3
+ vpslld $7,%ymm3,%ymm15
+ vpsrld $25,%ymm3,%ymm3
+ vpor %ymm3,%ymm15,%ymm3
+ vbroadcasti128 (%r10),%ymm15
+ vpaddd %ymm6,%ymm13,%ymm13
+ vpxor %ymm0,%ymm13,%ymm0
+ vpslld $7,%ymm0,%ymm14
+ vpsrld $25,%ymm0,%ymm0
+ vpor %ymm0,%ymm14,%ymm0
+ decl %eax
+ jnz .Loop8x
+
+ leaq 512(%rsp),%rax
+ vpaddd 128-256(%rcx),%ymm8,%ymm8
+ vpaddd 160-256(%rcx),%ymm9,%ymm9
+ vpaddd 192-256(%rcx),%ymm10,%ymm10
+ vpaddd 224-256(%rcx),%ymm11,%ymm11
+
+ vpunpckldq %ymm9,%ymm8,%ymm14
+ vpunpckldq %ymm11,%ymm10,%ymm15
+ vpunpckhdq %ymm9,%ymm8,%ymm8
+ vpunpckhdq %ymm11,%ymm10,%ymm10
+ vpunpcklqdq %ymm15,%ymm14,%ymm9
+ vpunpckhqdq %ymm15,%ymm14,%ymm14
+ vpunpcklqdq %ymm10,%ymm8,%ymm11
+ vpunpckhqdq %ymm10,%ymm8,%ymm8
+ vpaddd 256-256(%rcx),%ymm0,%ymm0
+ vpaddd 288-256(%rcx),%ymm1,%ymm1
+ vpaddd 320-256(%rcx),%ymm2,%ymm2
+ vpaddd 352-256(%rcx),%ymm3,%ymm3
+
+ vpunpckldq %ymm1,%ymm0,%ymm10
+ vpunpckldq %ymm3,%ymm2,%ymm15
+ vpunpckhdq %ymm1,%ymm0,%ymm0
+ vpunpckhdq %ymm3,%ymm2,%ymm2
+ vpunpcklqdq %ymm15,%ymm10,%ymm1
+ vpunpckhqdq %ymm15,%ymm10,%ymm10
+ vpunpcklqdq %ymm2,%ymm0,%ymm3
+ vpunpckhqdq %ymm2,%ymm0,%ymm0
+ vperm2i128 $0x20,%ymm1,%ymm9,%ymm15
+ vperm2i128 $0x31,%ymm1,%ymm9,%ymm1
+ vperm2i128 $0x20,%ymm10,%ymm14,%ymm9
+ vperm2i128 $0x31,%ymm10,%ymm14,%ymm10
+ vperm2i128 $0x20,%ymm3,%ymm11,%ymm14
+ vperm2i128 $0x31,%ymm3,%ymm11,%ymm3
+ vperm2i128 $0x20,%ymm0,%ymm8,%ymm11
+ vperm2i128 $0x31,%ymm0,%ymm8,%ymm0
+ vmovdqa %ymm15,0(%rsp)
+ vmovdqa %ymm9,32(%rsp)
+ vmovdqa 64(%rsp),%ymm15
+ vmovdqa 96(%rsp),%ymm9
+
+ vpaddd 384-512(%rax),%ymm12,%ymm12
+ vpaddd 416-512(%rax),%ymm13,%ymm13
+ vpaddd 448-512(%rax),%ymm15,%ymm15
+ vpaddd 480-512(%rax),%ymm9,%ymm9
+
+ vpunpckldq %ymm13,%ymm12,%ymm2
+ vpunpckldq %ymm9,%ymm15,%ymm8
+ vpunpckhdq %ymm13,%ymm12,%ymm12
+ vpunpckhdq %ymm9,%ymm15,%ymm15
+ vpunpcklqdq %ymm8,%ymm2,%ymm13
+ vpunpckhqdq %ymm8,%ymm2,%ymm2
+ vpunpcklqdq %ymm15,%ymm12,%ymm9
+ vpunpckhqdq %ymm15,%ymm12,%ymm12
+ vpaddd 512-512(%rax),%ymm4,%ymm4
+ vpaddd 544-512(%rax),%ymm5,%ymm5
+ vpaddd 576-512(%rax),%ymm6,%ymm6
+ vpaddd 608-512(%rax),%ymm7,%ymm7
+
+ vpunpckldq %ymm5,%ymm4,%ymm15
+ vpunpckldq %ymm7,%ymm6,%ymm8
+ vpunpckhdq %ymm5,%ymm4,%ymm4
+ vpunpckhdq %ymm7,%ymm6,%ymm6
+ vpunpcklqdq %ymm8,%ymm15,%ymm5
+ vpunpckhqdq %ymm8,%ymm15,%ymm15
+ vpunpcklqdq %ymm6,%ymm4,%ymm7
+ vpunpckhqdq %ymm6,%ymm4,%ymm4
+ vperm2i128 $0x20,%ymm5,%ymm13,%ymm8
+ vperm2i128 $0x31,%ymm5,%ymm13,%ymm5
+ vperm2i128 $0x20,%ymm15,%ymm2,%ymm13
+ vperm2i128 $0x31,%ymm15,%ymm2,%ymm15
+ vperm2i128 $0x20,%ymm7,%ymm9,%ymm2
+ vperm2i128 $0x31,%ymm7,%ymm9,%ymm7
+ vperm2i128 $0x20,%ymm4,%ymm12,%ymm9
+ vperm2i128 $0x31,%ymm4,%ymm12,%ymm4
+ vmovdqa 0(%rsp),%ymm6
+ vmovdqa 32(%rsp),%ymm12
+
+ cmpq $512,%rdx
+ jb .Ltail8x
+
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ leaq 128(%rsi),%rsi
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ leaq 128(%rdi),%rdi
+
+ vpxor 0(%rsi),%ymm12,%ymm12
+ vpxor 32(%rsi),%ymm13,%ymm13
+ vpxor 64(%rsi),%ymm10,%ymm10
+ vpxor 96(%rsi),%ymm15,%ymm15
+ leaq 128(%rsi),%rsi
+ vmovdqu %ymm12,0(%rdi)
+ vmovdqu %ymm13,32(%rdi)
+ vmovdqu %ymm10,64(%rdi)
+ vmovdqu %ymm15,96(%rdi)
+ leaq 128(%rdi),%rdi
+
+ vpxor 0(%rsi),%ymm14,%ymm14
+ vpxor 32(%rsi),%ymm2,%ymm2
+ vpxor 64(%rsi),%ymm3,%ymm3
+ vpxor 96(%rsi),%ymm7,%ymm7
+ leaq 128(%rsi),%rsi
+ vmovdqu %ymm14,0(%rdi)
+ vmovdqu %ymm2,32(%rdi)
+ vmovdqu %ymm3,64(%rdi)
+ vmovdqu %ymm7,96(%rdi)
+ leaq 128(%rdi),%rdi
+
+ vpxor 0(%rsi),%ymm11,%ymm11
+ vpxor 32(%rsi),%ymm9,%ymm9
+ vpxor 64(%rsi),%ymm0,%ymm0
+ vpxor 96(%rsi),%ymm4,%ymm4
+ leaq 128(%rsi),%rsi
+ vmovdqu %ymm11,0(%rdi)
+ vmovdqu %ymm9,32(%rdi)
+ vmovdqu %ymm0,64(%rdi)
+ vmovdqu %ymm4,96(%rdi)
+ leaq 128(%rdi),%rdi
+
+ subq $512,%rdx
+ jnz .Loop_outer8x
+
+ jmp .Ldone8x
+
+.Ltail8x:
+ cmpq $448,%rdx
+ jae .L448_or_more8x
+ cmpq $384,%rdx
+ jae .L384_or_more8x
+ cmpq $320,%rdx
+ jae .L320_or_more8x
+ cmpq $256,%rdx
+ jae .L256_or_more8x
+ cmpq $192,%rdx
+ jae .L192_or_more8x
+ cmpq $128,%rdx
+ jae .L128_or_more8x
+ cmpq $64,%rdx
+ jae .L64_or_more8x
+
+ xorq %r10,%r10
+ vmovdqa %ymm6,0(%rsp)
+ vmovdqa %ymm8,32(%rsp)
+ jmp .Loop_tail8x
+
+.align 32
+.L64_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ je .Ldone8x
+
+ leaq 64(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm1,0(%rsp)
+ leaq 64(%rdi),%rdi
+ subq $64,%rdx
+ vmovdqa %ymm5,32(%rsp)
+ jmp .Loop_tail8x
+
+.align 32
+.L128_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ je .Ldone8x
+
+ leaq 128(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm12,0(%rsp)
+ leaq 128(%rdi),%rdi
+ subq $128,%rdx
+ vmovdqa %ymm13,32(%rsp)
+ jmp .Loop_tail8x
+
+.align 32
+.L192_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ je .Ldone8x
+
+ leaq 192(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm10,0(%rsp)
+ leaq 192(%rdi),%rdi
+ subq $192,%rdx
+ vmovdqa %ymm15,32(%rsp)
+ jmp .Loop_tail8x
+
+.align 32
+.L256_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vpxor 192(%rsi),%ymm10,%ymm10
+ vpxor 224(%rsi),%ymm15,%ymm15
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ vmovdqu %ymm10,192(%rdi)
+ vmovdqu %ymm15,224(%rdi)
+ je .Ldone8x
+
+ leaq 256(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm14,0(%rsp)
+ leaq 256(%rdi),%rdi
+ subq $256,%rdx
+ vmovdqa %ymm2,32(%rsp)
+ jmp .Loop_tail8x
+
+.align 32
+.L320_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vpxor 192(%rsi),%ymm10,%ymm10
+ vpxor 224(%rsi),%ymm15,%ymm15
+ vpxor 256(%rsi),%ymm14,%ymm14
+ vpxor 288(%rsi),%ymm2,%ymm2
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ vmovdqu %ymm10,192(%rdi)
+ vmovdqu %ymm15,224(%rdi)
+ vmovdqu %ymm14,256(%rdi)
+ vmovdqu %ymm2,288(%rdi)
+ je .Ldone8x
+
+ leaq 320(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm3,0(%rsp)
+ leaq 320(%rdi),%rdi
+ subq $320,%rdx
+ vmovdqa %ymm7,32(%rsp)
+ jmp .Loop_tail8x
+
+.align 32
+.L384_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vpxor 192(%rsi),%ymm10,%ymm10
+ vpxor 224(%rsi),%ymm15,%ymm15
+ vpxor 256(%rsi),%ymm14,%ymm14
+ vpxor 288(%rsi),%ymm2,%ymm2
+ vpxor 320(%rsi),%ymm3,%ymm3
+ vpxor 352(%rsi),%ymm7,%ymm7
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ vmovdqu %ymm10,192(%rdi)
+ vmovdqu %ymm15,224(%rdi)
+ vmovdqu %ymm14,256(%rdi)
+ vmovdqu %ymm2,288(%rdi)
+ vmovdqu %ymm3,320(%rdi)
+ vmovdqu %ymm7,352(%rdi)
+ je .Ldone8x
+
+ leaq 384(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm11,0(%rsp)
+ leaq 384(%rdi),%rdi
+ subq $384,%rdx
+ vmovdqa %ymm9,32(%rsp)
+ jmp .Loop_tail8x
+
+.align 32
+.L448_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vpxor 192(%rsi),%ymm10,%ymm10
+ vpxor 224(%rsi),%ymm15,%ymm15
+ vpxor 256(%rsi),%ymm14,%ymm14
+ vpxor 288(%rsi),%ymm2,%ymm2
+ vpxor 320(%rsi),%ymm3,%ymm3
+ vpxor 352(%rsi),%ymm7,%ymm7
+ vpxor 384(%rsi),%ymm11,%ymm11
+ vpxor 416(%rsi),%ymm9,%ymm9
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ vmovdqu %ymm10,192(%rdi)
+ vmovdqu %ymm15,224(%rdi)
+ vmovdqu %ymm14,256(%rdi)
+ vmovdqu %ymm2,288(%rdi)
+ vmovdqu %ymm3,320(%rdi)
+ vmovdqu %ymm7,352(%rdi)
+ vmovdqu %ymm11,384(%rdi)
+ vmovdqu %ymm9,416(%rdi)
+ je .Ldone8x
+
+ leaq 448(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm0,0(%rsp)
+ leaq 448(%rdi),%rdi
+ subq $448,%rdx
+ vmovdqa %ymm4,32(%rsp)
+
+.Loop_tail8x:
+ movzbl (%rsi,%r10,1),%eax
+ movzbl (%rsp,%r10,1),%ecx
+ leaq 1(%r10),%r10
+ xorl %ecx,%eax
+ movb %al,-1(%rdi,%r10,1)
+ decq %rdx
+ jnz .Loop_tail8x
+
+.Ldone8x:
+ vzeroall
+ movq 640(%rsp),%rsp
+ .byte 0xf3,0xc3
+.size ChaCha20_8x,.-ChaCha20_8x
+#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 9eef154..0000000
--- 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/ec/p256-x86_64-asm.S b/third_party/boringssl/linux-x86_64/crypto/ec/p256-x86_64-asm.S
new file mode 100644
index 0000000..4abce6f
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/ec/p256-x86_64-asm.S
@@ -0,0 +1,1789 @@
+#if defined(__x86_64__)
+.text
+.extern OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+
+
+.align 64
+.Lpoly:
+.quad 0xffffffffffffffff, 0x00000000ffffffff, 0x0000000000000000, 0xffffffff00000001
+
+.LOne:
+.long 1,1,1,1,1,1,1,1
+.LTwo:
+.long 2,2,2,2,2,2,2,2
+.LThree:
+.long 3,3,3,3,3,3,3,3
+.LONE_mont:
+.quad 0x0000000000000001, 0xffffffff00000000, 0xffffffffffffffff, 0x00000000fffffffe
+
+.type ecp_nistz256_mul_by_2,@function
+.align 64
+ecp_nistz256_mul_by_2:
+ pushq %r12
+ pushq %r13
+
+ movq 0(%rsi),%r8
+ movq 8(%rsi),%r9
+ addq %r8,%r8
+ movq 16(%rsi),%r10
+ adcq %r9,%r9
+ movq 24(%rsi),%r11
+ leaq .Lpoly(%rip),%rsi
+ movq %r8,%rax
+ adcq %r10,%r10
+ adcq %r11,%r11
+ movq %r9,%rdx
+ sbbq %r13,%r13
+
+ subq 0(%rsi),%r8
+ movq %r10,%rcx
+ sbbq 8(%rsi),%r9
+ sbbq 16(%rsi),%r10
+ movq %r11,%r12
+ sbbq 24(%rsi),%r11
+ testq %r13,%r13
+
+ cmovzq %rax,%r8
+ cmovzq %rdx,%r9
+ movq %r8,0(%rdi)
+ cmovzq %rcx,%r10
+ movq %r9,8(%rdi)
+ cmovzq %r12,%r11
+ movq %r10,16(%rdi)
+ movq %r11,24(%rdi)
+
+ popq %r13
+ popq %r12
+ .byte 0xf3,0xc3
+.size ecp_nistz256_mul_by_2,.-ecp_nistz256_mul_by_2
+
+
+
+.globl ecp_nistz256_neg
+.hidden ecp_nistz256_neg
+.type ecp_nistz256_neg,@function
+.align 32
+ecp_nistz256_neg:
+ pushq %r12
+ pushq %r13
+
+ xorq %r8,%r8
+ xorq %r9,%r9
+ xorq %r10,%r10
+ xorq %r11,%r11
+ xorq %r13,%r13
+
+ subq 0(%rsi),%r8
+ sbbq 8(%rsi),%r9
+ sbbq 16(%rsi),%r10
+ movq %r8,%rax
+ sbbq 24(%rsi),%r11
+ leaq .Lpoly(%rip),%rsi
+ movq %r9,%rdx
+ sbbq $0,%r13
+
+ addq 0(%rsi),%r8
+ movq %r10,%rcx
+ adcq 8(%rsi),%r9
+ adcq 16(%rsi),%r10
+ movq %r11,%r12
+ adcq 24(%rsi),%r11
+ testq %r13,%r13
+
+ cmovzq %rax,%r8
+ cmovzq %rdx,%r9
+ movq %r8,0(%rdi)
+ cmovzq %rcx,%r10
+ movq %r9,8(%rdi)
+ cmovzq %r12,%r11
+ movq %r10,16(%rdi)
+ movq %r11,24(%rdi)
+
+ popq %r13
+ popq %r12
+ .byte 0xf3,0xc3
+.size ecp_nistz256_neg,.-ecp_nistz256_neg
+
+
+
+
+
+
+.globl ecp_nistz256_mul_mont
+.hidden ecp_nistz256_mul_mont
+.type ecp_nistz256_mul_mont,@function
+.align 32
+ecp_nistz256_mul_mont:
+.Lmul_mont:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq %rdx,%rbx
+ movq 0(%rdx),%rax
+ movq 0(%rsi),%r9
+ movq 8(%rsi),%r10
+ movq 16(%rsi),%r11
+ movq 24(%rsi),%r12
+
+ call __ecp_nistz256_mul_montq
+.Lmul_mont_done:
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+.size ecp_nistz256_mul_mont,.-ecp_nistz256_mul_mont
+
+.type __ecp_nistz256_mul_montq,@function
+.align 32
+__ecp_nistz256_mul_montq:
+
+
+ movq %rax,%rbp
+ mulq %r9
+ movq .Lpoly+8(%rip),%r14
+ movq %rax,%r8
+ movq %rbp,%rax
+ movq %rdx,%r9
+
+ mulq %r10
+ movq .Lpoly+24(%rip),%r15
+ addq %rax,%r9
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%r10
+
+ mulq %r11
+ addq %rax,%r10
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%r11
+
+ mulq %r12
+ addq %rax,%r11
+ movq %r8,%rax
+ adcq $0,%rdx
+ xorq %r13,%r13
+ movq %rdx,%r12
+
+
+
+
+
+
+
+
+
+
+ movq %r8,%rbp
+ shlq $32,%r8
+ mulq %r15
+ shrq $32,%rbp
+ addq %r8,%r9
+ adcq %rbp,%r10
+ adcq %rax,%r11
+ movq 8(%rbx),%rax
+ adcq %rdx,%r12
+ adcq $0,%r13
+ xorq %r8,%r8
+
+
+
+ movq %rax,%rbp
+ mulq 0(%rsi)
+ addq %rax,%r9
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 8(%rsi)
+ addq %rcx,%r10
+ adcq $0,%rdx
+ addq %rax,%r10
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 16(%rsi)
+ addq %rcx,%r11
+ adcq $0,%rdx
+ addq %rax,%r11
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 24(%rsi)
+ addq %rcx,%r12
+ adcq $0,%rdx
+ addq %rax,%r12
+ movq %r9,%rax
+ adcq %rdx,%r13
+ adcq $0,%r8
+
+
+
+ movq %r9,%rbp
+ shlq $32,%r9
+ mulq %r15
+ shrq $32,%rbp
+ addq %r9,%r10
+ adcq %rbp,%r11
+ adcq %rax,%r12
+ movq 16(%rbx),%rax
+ adcq %rdx,%r13
+ adcq $0,%r8
+ xorq %r9,%r9
+
+
+
+ movq %rax,%rbp
+ mulq 0(%rsi)
+ addq %rax,%r10
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 8(%rsi)
+ addq %rcx,%r11
+ adcq $0,%rdx
+ addq %rax,%r11
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 16(%rsi)
+ addq %rcx,%r12
+ adcq $0,%rdx
+ addq %rax,%r12
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 24(%rsi)
+ addq %rcx,%r13
+ adcq $0,%rdx
+ addq %rax,%r13
+ movq %r10,%rax
+ adcq %rdx,%r8
+ adcq $0,%r9
+
+
+
+ movq %r10,%rbp
+ shlq $32,%r10
+ mulq %r15
+ shrq $32,%rbp
+ addq %r10,%r11
+ adcq %rbp,%r12
+ adcq %rax,%r13
+ movq 24(%rbx),%rax
+ adcq %rdx,%r8
+ adcq $0,%r9
+ xorq %r10,%r10
+
+
+
+ movq %rax,%rbp
+ mulq 0(%rsi)
+ addq %rax,%r11
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 8(%rsi)
+ addq %rcx,%r12
+ adcq $0,%rdx
+ addq %rax,%r12
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 16(%rsi)
+ addq %rcx,%r13
+ adcq $0,%rdx
+ addq %rax,%r13
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 24(%rsi)
+ addq %rcx,%r8
+ adcq $0,%rdx
+ addq %rax,%r8
+ movq %r11,%rax
+ adcq %rdx,%r9
+ adcq $0,%r10
+
+
+
+ movq %r11,%rbp
+ shlq $32,%r11
+ mulq %r15
+ shrq $32,%rbp
+ addq %r11,%r12
+ adcq %rbp,%r13
+ movq %r12,%rcx
+ adcq %rax,%r8
+ adcq %rdx,%r9
+ movq %r13,%rbp
+ adcq $0,%r10
+
+
+
+ subq $-1,%r12
+ movq %r8,%rbx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%rdx
+ sbbq %r15,%r9
+ sbbq $0,%r10
+
+ cmovcq %rcx,%r12
+ cmovcq %rbp,%r13
+ movq %r12,0(%rdi)
+ cmovcq %rbx,%r8
+ movq %r13,8(%rdi)
+ cmovcq %rdx,%r9
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+
+ .byte 0xf3,0xc3
+.size __ecp_nistz256_mul_montq,.-__ecp_nistz256_mul_montq
+
+
+
+
+
+
+
+
+.globl ecp_nistz256_sqr_mont
+.hidden ecp_nistz256_sqr_mont
+.type ecp_nistz256_sqr_mont,@function
+.align 32
+ecp_nistz256_sqr_mont:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq 0(%rsi),%rax
+ movq 8(%rsi),%r14
+ movq 16(%rsi),%r15
+ movq 24(%rsi),%r8
+
+ call __ecp_nistz256_sqr_montq
+.Lsqr_mont_done:
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+.size ecp_nistz256_sqr_mont,.-ecp_nistz256_sqr_mont
+
+.type __ecp_nistz256_sqr_montq,@function
+.align 32
+__ecp_nistz256_sqr_montq:
+ movq %rax,%r13
+ mulq %r14
+ movq %rax,%r9
+ movq %r15,%rax
+ movq %rdx,%r10
+
+ mulq %r13
+ addq %rax,%r10
+ movq %r8,%rax
+ adcq $0,%rdx
+ movq %rdx,%r11
+
+ mulq %r13
+ addq %rax,%r11
+ movq %r15,%rax
+ adcq $0,%rdx
+ movq %rdx,%r12
+
+
+ mulq %r14
+ addq %rax,%r11
+ movq %r8,%rax
+ adcq $0,%rdx
+ movq %rdx,%rbp
+
+ mulq %r14
+ addq %rax,%r12
+ movq %r8,%rax
+ adcq $0,%rdx
+ addq %rbp,%r12
+ movq %rdx,%r13
+ adcq $0,%r13
+
+
+ mulq %r15
+ xorq %r15,%r15
+ addq %rax,%r13
+ movq 0(%rsi),%rax
+ movq %rdx,%r14
+ adcq $0,%r14
+
+ addq %r9,%r9
+ adcq %r10,%r10
+ adcq %r11,%r11
+ adcq %r12,%r12
+ adcq %r13,%r13
+ adcq %r14,%r14
+ adcq $0,%r15
+
+ mulq %rax
+ movq %rax,%r8
+ movq 8(%rsi),%rax
+ movq %rdx,%rcx
+
+ mulq %rax
+ addq %rcx,%r9
+ adcq %rax,%r10
+ movq 16(%rsi),%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq %rax
+ addq %rcx,%r11
+ adcq %rax,%r12
+ movq 24(%rsi),%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq %rax
+ addq %rcx,%r13
+ adcq %rax,%r14
+ movq %r8,%rax
+ adcq %rdx,%r15
+
+ movq .Lpoly+8(%rip),%rsi
+ movq .Lpoly+24(%rip),%rbp
+
+
+
+
+ movq %r8,%rcx
+ shlq $32,%r8
+ mulq %rbp
+ shrq $32,%rcx
+ addq %r8,%r9
+ adcq %rcx,%r10
+ adcq %rax,%r11
+ movq %r9,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r9,%rcx
+ shlq $32,%r9
+ movq %rdx,%r8
+ mulq %rbp
+ shrq $32,%rcx
+ addq %r9,%r10
+ adcq %rcx,%r11
+ adcq %rax,%r8
+ movq %r10,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r10,%rcx
+ shlq $32,%r10
+ movq %rdx,%r9
+ mulq %rbp
+ shrq $32,%rcx
+ addq %r10,%r11
+ adcq %rcx,%r8
+ adcq %rax,%r9
+ movq %r11,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r11,%rcx
+ shlq $32,%r11
+ movq %rdx,%r10
+ mulq %rbp
+ shrq $32,%rcx
+ addq %r11,%r8
+ adcq %rcx,%r9
+ adcq %rax,%r10
+ adcq $0,%rdx
+ xorq %r11,%r11
+
+
+
+ addq %r8,%r12
+ adcq %r9,%r13
+ movq %r12,%r8
+ adcq %r10,%r14
+ adcq %rdx,%r15
+ movq %r13,%r9
+ adcq $0,%r11
+
+ subq $-1,%r12
+ movq %r14,%r10
+ sbbq %rsi,%r13
+ sbbq $0,%r14
+ movq %r15,%rcx
+ sbbq %rbp,%r15
+ sbbq $0,%r11
+
+ cmovcq %r8,%r12
+ cmovcq %r9,%r13
+ movq %r12,0(%rdi)
+ cmovcq %r10,%r14
+ movq %r13,8(%rdi)
+ cmovcq %rcx,%r15
+ movq %r14,16(%rdi)
+ movq %r15,24(%rdi)
+
+ .byte 0xf3,0xc3
+.size __ecp_nistz256_sqr_montq,.-__ecp_nistz256_sqr_montq
+
+
+
+
+
+
+.globl ecp_nistz256_from_mont
+.hidden ecp_nistz256_from_mont
+.type ecp_nistz256_from_mont,@function
+.align 32
+ecp_nistz256_from_mont:
+ pushq %r12
+ pushq %r13
+
+ movq 0(%rsi),%rax
+ movq .Lpoly+24(%rip),%r13
+ movq 8(%rsi),%r9
+ movq 16(%rsi),%r10
+ movq 24(%rsi),%r11
+ movq %rax,%r8
+ movq .Lpoly+8(%rip),%r12
+
+
+
+ movq %rax,%rcx
+ shlq $32,%r8
+ mulq %r13
+ shrq $32,%rcx
+ addq %r8,%r9
+ adcq %rcx,%r10
+ adcq %rax,%r11
+ movq %r9,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r9,%rcx
+ shlq $32,%r9
+ movq %rdx,%r8
+ mulq %r13
+ shrq $32,%rcx
+ addq %r9,%r10
+ adcq %rcx,%r11
+ adcq %rax,%r8
+ movq %r10,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r10,%rcx
+ shlq $32,%r10
+ movq %rdx,%r9
+ mulq %r13
+ shrq $32,%rcx
+ addq %r10,%r11
+ adcq %rcx,%r8
+ adcq %rax,%r9
+ movq %r11,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r11,%rcx
+ shlq $32,%r11
+ movq %rdx,%r10
+ mulq %r13
+ shrq $32,%rcx
+ addq %r11,%r8
+ adcq %rcx,%r9
+ movq %r8,%rcx
+ adcq %rax,%r10
+ movq %r9,%rsi
+ adcq $0,%rdx
+
+ subq $-1,%r8
+ movq %r10,%rax
+ sbbq %r12,%r9
+ sbbq $0,%r10
+ movq %rdx,%r11
+ sbbq %r13,%rdx
+ sbbq %r13,%r13
+
+ cmovnzq %rcx,%r8
+ cmovnzq %rsi,%r9
+ movq %r8,0(%rdi)
+ cmovnzq %rax,%r10
+ movq %r9,8(%rdi)
+ cmovzq %rdx,%r11
+ movq %r10,16(%rdi)
+ movq %r11,24(%rdi)
+
+ popq %r13
+ popq %r12
+ .byte 0xf3,0xc3
+.size ecp_nistz256_from_mont,.-ecp_nistz256_from_mont
+
+
+.globl ecp_nistz256_select_w5
+.hidden ecp_nistz256_select_w5
+.type ecp_nistz256_select_w5,@function
+.align 32
+ecp_nistz256_select_w5:
+ movdqa .LOne(%rip),%xmm0
+ movd %edx,%xmm1
+
+ pxor %xmm2,%xmm2
+ pxor %xmm3,%xmm3
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+ pxor %xmm6,%xmm6
+ pxor %xmm7,%xmm7
+
+ movdqa %xmm0,%xmm8
+ pshufd $0,%xmm1,%xmm1
+
+ movq $16,%rax
+.Lselect_loop_sse_w5:
+
+ movdqa %xmm8,%xmm15
+ paddd %xmm0,%xmm8
+ pcmpeqd %xmm1,%xmm15
+
+ movdqa 0(%rsi),%xmm9
+ movdqa 16(%rsi),%xmm10
+ movdqa 32(%rsi),%xmm11
+ movdqa 48(%rsi),%xmm12
+ movdqa 64(%rsi),%xmm13
+ movdqa 80(%rsi),%xmm14
+ leaq 96(%rsi),%rsi
+
+ pand %xmm15,%xmm9
+ pand %xmm15,%xmm10
+ por %xmm9,%xmm2
+ pand %xmm15,%xmm11
+ por %xmm10,%xmm3
+ pand %xmm15,%xmm12
+ por %xmm11,%xmm4
+ pand %xmm15,%xmm13
+ por %xmm12,%xmm5
+ pand %xmm15,%xmm14
+ por %xmm13,%xmm6
+ por %xmm14,%xmm7
+
+ decq %rax
+ jnz .Lselect_loop_sse_w5
+
+ movdqu %xmm2,0(%rdi)
+ movdqu %xmm3,16(%rdi)
+ movdqu %xmm4,32(%rdi)
+ movdqu %xmm5,48(%rdi)
+ movdqu %xmm6,64(%rdi)
+ movdqu %xmm7,80(%rdi)
+ .byte 0xf3,0xc3
+.size ecp_nistz256_select_w5,.-ecp_nistz256_select_w5
+
+
+
+.globl ecp_nistz256_select_w7
+.hidden ecp_nistz256_select_w7
+.type ecp_nistz256_select_w7,@function
+.align 32
+ecp_nistz256_select_w7:
+ movdqa .LOne(%rip),%xmm8
+ movd %edx,%xmm1
+
+ pxor %xmm2,%xmm2
+ pxor %xmm3,%xmm3
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+
+ movdqa %xmm8,%xmm0
+ pshufd $0,%xmm1,%xmm1
+ movq $64,%rax
+
+.Lselect_loop_sse_w7:
+ movdqa %xmm8,%xmm15
+ paddd %xmm0,%xmm8
+ movdqa 0(%rsi),%xmm9
+ movdqa 16(%rsi),%xmm10
+ pcmpeqd %xmm1,%xmm15
+ movdqa 32(%rsi),%xmm11
+ movdqa 48(%rsi),%xmm12
+ leaq 64(%rsi),%rsi
+
+ pand %xmm15,%xmm9
+ pand %xmm15,%xmm10
+ por %xmm9,%xmm2
+ pand %xmm15,%xmm11
+ por %xmm10,%xmm3
+ pand %xmm15,%xmm12
+ por %xmm11,%xmm4
+ prefetcht0 255(%rsi)
+ por %xmm12,%xmm5
+
+ decq %rax
+ jnz .Lselect_loop_sse_w7
+
+ movdqu %xmm2,0(%rdi)
+ movdqu %xmm3,16(%rdi)
+ movdqu %xmm4,32(%rdi)
+ movdqu %xmm5,48(%rdi)
+ .byte 0xf3,0xc3
+.size ecp_nistz256_select_w7,.-ecp_nistz256_select_w7
+.globl ecp_nistz256_avx2_select_w7
+.hidden ecp_nistz256_avx2_select_w7
+.type ecp_nistz256_avx2_select_w7,@function
+.align 32
+ecp_nistz256_avx2_select_w7:
+.byte 0x0f,0x0b
+ .byte 0xf3,0xc3
+.size ecp_nistz256_avx2_select_w7,.-ecp_nistz256_avx2_select_w7
+.type __ecp_nistz256_add_toq,@function
+.align 32
+__ecp_nistz256_add_toq:
+ addq 0(%rbx),%r12
+ adcq 8(%rbx),%r13
+ movq %r12,%rax
+ adcq 16(%rbx),%r8
+ adcq 24(%rbx),%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ subq $-1,%r12
+ movq %r8,%rcx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%r10
+ sbbq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ cmovzq %rbp,%r13
+ movq %r12,0(%rdi)
+ cmovzq %rcx,%r8
+ movq %r13,8(%rdi)
+ cmovzq %r10,%r9
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+
+ .byte 0xf3,0xc3
+.size __ecp_nistz256_add_toq,.-__ecp_nistz256_add_toq
+
+.type __ecp_nistz256_sub_fromq,@function
+.align 32
+__ecp_nistz256_sub_fromq:
+ subq 0(%rbx),%r12
+ sbbq 8(%rbx),%r13
+ movq %r12,%rax
+ sbbq 16(%rbx),%r8
+ sbbq 24(%rbx),%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ addq $-1,%r12
+ movq %r8,%rcx
+ adcq %r14,%r13
+ adcq $0,%r8
+ movq %r9,%r10
+ adcq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ cmovzq %rbp,%r13
+ movq %r12,0(%rdi)
+ cmovzq %rcx,%r8
+ movq %r13,8(%rdi)
+ cmovzq %r10,%r9
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+
+ .byte 0xf3,0xc3
+.size __ecp_nistz256_sub_fromq,.-__ecp_nistz256_sub_fromq
+
+.type __ecp_nistz256_subq,@function
+.align 32
+__ecp_nistz256_subq:
+ subq %r12,%rax
+ sbbq %r13,%rbp
+ movq %rax,%r12
+ sbbq %r8,%rcx
+ sbbq %r9,%r10
+ movq %rbp,%r13
+ sbbq %r11,%r11
+
+ addq $-1,%rax
+ movq %rcx,%r8
+ adcq %r14,%rbp
+ adcq $0,%rcx
+ movq %r10,%r9
+ adcq %r15,%r10
+ testq %r11,%r11
+
+ cmovnzq %rax,%r12
+ cmovnzq %rbp,%r13
+ cmovnzq %rcx,%r8
+ cmovnzq %r10,%r9
+
+ .byte 0xf3,0xc3
+.size __ecp_nistz256_subq,.-__ecp_nistz256_subq
+
+.type __ecp_nistz256_mul_by_2q,@function
+.align 32
+__ecp_nistz256_mul_by_2q:
+ addq %r12,%r12
+ adcq %r13,%r13
+ movq %r12,%rax
+ adcq %r8,%r8
+ adcq %r9,%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ subq $-1,%r12
+ movq %r8,%rcx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%r10
+ sbbq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ cmovzq %rbp,%r13
+ movq %r12,0(%rdi)
+ cmovzq %rcx,%r8
+ movq %r13,8(%rdi)
+ cmovzq %r10,%r9
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+
+ .byte 0xf3,0xc3
+.size __ecp_nistz256_mul_by_2q,.-__ecp_nistz256_mul_by_2q
+.globl ecp_nistz256_point_double
+.hidden ecp_nistz256_point_double
+.type ecp_nistz256_point_double,@function
+.align 32
+ecp_nistz256_point_double:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ subq $160+8,%rsp
+
+.Lpoint_double_shortcutq:
+ movdqu 0(%rsi),%xmm0
+ movq %rsi,%rbx
+ movdqu 16(%rsi),%xmm1
+ movq 32+0(%rsi),%r12
+ movq 32+8(%rsi),%r13
+ movq 32+16(%rsi),%r8
+ movq 32+24(%rsi),%r9
+ movq .Lpoly+8(%rip),%r14
+ movq .Lpoly+24(%rip),%r15
+ movdqa %xmm0,96(%rsp)
+ movdqa %xmm1,96+16(%rsp)
+ leaq 32(%rdi),%r10
+ leaq 64(%rdi),%r11
+.byte 102,72,15,110,199
+.byte 102,73,15,110,202
+.byte 102,73,15,110,211
+
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_by_2q
+
+ movq 64+0(%rsi),%rax
+ movq 64+8(%rsi),%r14
+ movq 64+16(%rsi),%r15
+ movq 64+24(%rsi),%r8
+ leaq 64-0(%rsi),%rsi
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 0+0(%rsp),%rax
+ movq 8+0(%rsp),%r14
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r15
+ movq 24+0(%rsp),%r8
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 32(%rbx),%rax
+ movq 64+0(%rbx),%r9
+ movq 64+8(%rbx),%r10
+ movq 64+16(%rbx),%r11
+ movq 64+24(%rbx),%r12
+ leaq 64-0(%rbx),%rsi
+ leaq 32(%rbx),%rbx
+.byte 102,72,15,126,215
+ call __ecp_nistz256_mul_montq
+ call __ecp_nistz256_mul_by_2q
+
+ movq 96+0(%rsp),%r12
+ movq 96+8(%rsp),%r13
+ leaq 64(%rsp),%rbx
+ movq 96+16(%rsp),%r8
+ movq 96+24(%rsp),%r9
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_add_toq
+
+ movq 96+0(%rsp),%r12
+ movq 96+8(%rsp),%r13
+ leaq 64(%rsp),%rbx
+ movq 96+16(%rsp),%r8
+ movq 96+24(%rsp),%r9
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 0+0(%rsp),%rax
+ movq 8+0(%rsp),%r14
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r15
+ movq 24+0(%rsp),%r8
+.byte 102,72,15,126,207
+ call __ecp_nistz256_sqr_montq
+ xorq %r9,%r9
+ movq %r12,%rax
+ addq $-1,%r12
+ movq %r13,%r10
+ adcq %rsi,%r13
+ movq %r14,%rcx
+ adcq $0,%r14
+ movq %r15,%r8
+ adcq %rbp,%r15
+ adcq $0,%r9
+ xorq %rsi,%rsi
+ testq $1,%rax
+
+ cmovzq %rax,%r12
+ cmovzq %r10,%r13
+ cmovzq %rcx,%r14
+ cmovzq %r8,%r15
+ cmovzq %rsi,%r9
+
+ movq %r13,%rax
+ shrq $1,%r12
+ shlq $63,%rax
+ movq %r14,%r10
+ shrq $1,%r13
+ orq %rax,%r12
+ shlq $63,%r10
+ movq %r15,%rcx
+ shrq $1,%r14
+ orq %r10,%r13
+ shlq $63,%rcx
+ movq %r12,0(%rdi)
+ shrq $1,%r15
+ movq %r13,8(%rdi)
+ shlq $63,%r9
+ orq %rcx,%r14
+ orq %r9,%r15
+ movq %r14,16(%rdi)
+ movq %r15,24(%rdi)
+ movq 64(%rsp),%rax
+ leaq 64(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 128(%rsp),%rdi
+ call __ecp_nistz256_mul_by_2q
+
+ leaq 32(%rsp),%rbx
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_add_toq
+
+ movq 96(%rsp),%rax
+ leaq 96(%rsp),%rbx
+ movq 0+0(%rsp),%r9
+ movq 8+0(%rsp),%r10
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r11
+ movq 24+0(%rsp),%r12
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 128(%rsp),%rdi
+ call __ecp_nistz256_mul_by_2q
+
+ movq 0+32(%rsp),%rax
+ movq 8+32(%rsp),%r14
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r15
+ movq 24+32(%rsp),%r8
+.byte 102,72,15,126,199
+ call __ecp_nistz256_sqr_montq
+
+ leaq 128(%rsp),%rbx
+ movq %r14,%r8
+ movq %r15,%r9
+ movq %rsi,%r14
+ movq %rbp,%r15
+ call __ecp_nistz256_sub_fromq
+
+ movq 0+0(%rsp),%rax
+ movq 0+8(%rsp),%rbp
+ movq 0+16(%rsp),%rcx
+ movq 0+24(%rsp),%r10
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_subq
+
+ movq 32(%rsp),%rax
+ leaq 32(%rsp),%rbx
+ movq %r12,%r14
+ xorl %ecx,%ecx
+ movq %r12,0+0(%rsp)
+ movq %r13,%r10
+ movq %r13,0+8(%rsp)
+ cmovzq %r8,%r11
+ movq %r8,0+16(%rsp)
+ leaq 0-0(%rsp),%rsi
+ cmovzq %r9,%r12
+ movq %r9,0+24(%rsp)
+ movq %r14,%r9
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+.byte 102,72,15,126,203
+.byte 102,72,15,126,207
+ call __ecp_nistz256_sub_fromq
+
+ addq $160+8,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+.size ecp_nistz256_point_double,.-ecp_nistz256_point_double
+.globl ecp_nistz256_point_add
+.hidden ecp_nistz256_point_add
+.type ecp_nistz256_point_add,@function
+.align 32
+ecp_nistz256_point_add:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ subq $576+8,%rsp
+
+ movdqu 0(%rsi),%xmm0
+ movdqu 16(%rsi),%xmm1
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm3
+ movdqu 64(%rsi),%xmm4
+ movdqu 80(%rsi),%xmm5
+ movq %rsi,%rbx
+ movq %rdx,%rsi
+ movdqa %xmm0,384(%rsp)
+ movdqa %xmm1,384+16(%rsp)
+ por %xmm0,%xmm1
+ movdqa %xmm2,416(%rsp)
+ movdqa %xmm3,416+16(%rsp)
+ por %xmm2,%xmm3
+ movdqa %xmm4,448(%rsp)
+ movdqa %xmm5,448+16(%rsp)
+ por %xmm1,%xmm3
+
+ movdqu 0(%rsi),%xmm0
+ pshufd $0xb1,%xmm3,%xmm5
+ movdqu 16(%rsi),%xmm1
+ movdqu 32(%rsi),%xmm2
+ por %xmm3,%xmm5
+ movdqu 48(%rsi),%xmm3
+ movq 64+0(%rsi),%rax
+ movq 64+8(%rsi),%r14
+ movq 64+16(%rsi),%r15
+ movq 64+24(%rsi),%r8
+ movdqa %xmm0,480(%rsp)
+ pshufd $0x1e,%xmm5,%xmm4
+ movdqa %xmm1,480+16(%rsp)
+ por %xmm0,%xmm1
+.byte 102,72,15,110,199
+ movdqa %xmm2,512(%rsp)
+ movdqa %xmm3,512+16(%rsp)
+ por %xmm2,%xmm3
+ por %xmm4,%xmm5
+ pxor %xmm4,%xmm4
+ por %xmm1,%xmm3
+
+ leaq 64-0(%rsi),%rsi
+ movq %rax,544+0(%rsp)
+ movq %r14,544+8(%rsp)
+ movq %r15,544+16(%rsp)
+ movq %r8,544+24(%rsp)
+ leaq 96(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ pcmpeqd %xmm4,%xmm5
+ pshufd $0xb1,%xmm3,%xmm4
+ por %xmm3,%xmm4
+ pshufd $0,%xmm5,%xmm5
+ pshufd $0x1e,%xmm4,%xmm3
+ por %xmm3,%xmm4
+ pxor %xmm3,%xmm3
+ pcmpeqd %xmm3,%xmm4
+ pshufd $0,%xmm4,%xmm4
+ movq 64+0(%rbx),%rax
+ movq 64+8(%rbx),%r14
+ movq 64+16(%rbx),%r15
+ movq 64+24(%rbx),%r8
+.byte 102,72,15,110,203
+
+ leaq 64-0(%rbx),%rsi
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 544(%rsp),%rax
+ leaq 544(%rsp),%rbx
+ movq 0+96(%rsp),%r9
+ movq 8+96(%rsp),%r10
+ leaq 0+96(%rsp),%rsi
+ movq 16+96(%rsp),%r11
+ movq 24+96(%rsp),%r12
+ leaq 224(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 448(%rsp),%rax
+ leaq 448(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 256(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 416(%rsp),%rax
+ leaq 416(%rsp),%rbx
+ movq 0+224(%rsp),%r9
+ movq 8+224(%rsp),%r10
+ leaq 0+224(%rsp),%rsi
+ movq 16+224(%rsp),%r11
+ movq 24+224(%rsp),%r12
+ leaq 224(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 512(%rsp),%rax
+ leaq 512(%rsp),%rbx
+ movq 0+256(%rsp),%r9
+ movq 8+256(%rsp),%r10
+ leaq 0+256(%rsp),%rsi
+ movq 16+256(%rsp),%r11
+ movq 24+256(%rsp),%r12
+ leaq 256(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 224(%rsp),%rbx
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ orq %r13,%r12
+ movdqa %xmm4,%xmm2
+ orq %r8,%r12
+ orq %r9,%r12
+ por %xmm5,%xmm2
+.byte 102,73,15,110,220
+
+ movq 384(%rsp),%rax
+ leaq 384(%rsp),%rbx
+ movq 0+96(%rsp),%r9
+ movq 8+96(%rsp),%r10
+ leaq 0+96(%rsp),%rsi
+ movq 16+96(%rsp),%r11
+ movq 24+96(%rsp),%r12
+ leaq 160(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 480(%rsp),%rax
+ leaq 480(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 192(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 160(%rsp),%rbx
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ orq %r13,%r12
+ orq %r8,%r12
+ orq %r9,%r12
+
+.byte 0x3e
+ jnz .Ladd_proceedq
+.byte 102,73,15,126,208
+.byte 102,73,15,126,217
+ testq %r8,%r8
+ jnz .Ladd_proceedq
+ testq %r9,%r9
+ jz .Ladd_doubleq
+
+.byte 102,72,15,126,199
+ pxor %xmm0,%xmm0
+ movdqu %xmm0,0(%rdi)
+ movdqu %xmm0,16(%rdi)
+ movdqu %xmm0,32(%rdi)
+ movdqu %xmm0,48(%rdi)
+ movdqu %xmm0,64(%rdi)
+ movdqu %xmm0,80(%rdi)
+ jmp .Ladd_doneq
+
+.align 32
+.Ladd_doubleq:
+.byte 102,72,15,126,206
+.byte 102,72,15,126,199
+ addq $416,%rsp
+ jmp .Lpoint_double_shortcutq
+
+.align 32
+.Ladd_proceedq:
+ movq 0+64(%rsp),%rax
+ movq 8+64(%rsp),%r14
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r15
+ movq 24+64(%rsp),%r8
+ leaq 96(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 448(%rsp),%rax
+ leaq 448(%rsp),%rbx
+ movq 0+0(%rsp),%r9
+ movq 8+0(%rsp),%r10
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r11
+ movq 24+0(%rsp),%r12
+ leaq 352(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 0+0(%rsp),%rax
+ movq 8+0(%rsp),%r14
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r15
+ movq 24+0(%rsp),%r8
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 544(%rsp),%rax
+ leaq 544(%rsp),%rbx
+ movq 0+352(%rsp),%r9
+ movq 8+352(%rsp),%r10
+ leaq 0+352(%rsp),%rsi
+ movq 16+352(%rsp),%r11
+ movq 24+352(%rsp),%r12
+ leaq 352(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 0(%rsp),%rax
+ leaq 0(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 128(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 160(%rsp),%rax
+ leaq 160(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 192(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+
+
+
+ addq %r12,%r12
+ leaq 96(%rsp),%rsi
+ adcq %r13,%r13
+ movq %r12,%rax
+ adcq %r8,%r8
+ adcq %r9,%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ subq $-1,%r12
+ movq %r8,%rcx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%r10
+ sbbq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ movq 0(%rsi),%rax
+ cmovzq %rbp,%r13
+ movq 8(%rsi),%rbp
+ cmovzq %rcx,%r8
+ movq 16(%rsi),%rcx
+ cmovzq %r10,%r9
+ movq 24(%rsi),%r10
+
+ call __ecp_nistz256_subq
+
+ leaq 128(%rsp),%rbx
+ leaq 288(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 192+0(%rsp),%rax
+ movq 192+8(%rsp),%rbp
+ movq 192+16(%rsp),%rcx
+ movq 192+24(%rsp),%r10
+ leaq 320(%rsp),%rdi
+
+ call __ecp_nistz256_subq
+
+ movq %r12,0(%rdi)
+ movq %r13,8(%rdi)
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+ movq 128(%rsp),%rax
+ leaq 128(%rsp),%rbx
+ movq 0+224(%rsp),%r9
+ movq 8+224(%rsp),%r10
+ leaq 0+224(%rsp),%rsi
+ movq 16+224(%rsp),%r11
+ movq 24+224(%rsp),%r12
+ leaq 256(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 320(%rsp),%rax
+ leaq 320(%rsp),%rbx
+ movq 0+64(%rsp),%r9
+ movq 8+64(%rsp),%r10
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r11
+ movq 24+64(%rsp),%r12
+ leaq 320(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 256(%rsp),%rbx
+ leaq 320(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+.byte 102,72,15,126,199
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 352(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 352+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 544(%rsp),%xmm2
+ pand 544+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 448(%rsp),%xmm2
+ pand 448+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,64(%rdi)
+ movdqu %xmm3,80(%rdi)
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 288(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 288+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 480(%rsp),%xmm2
+ pand 480+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 384(%rsp),%xmm2
+ pand 384+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,0(%rdi)
+ movdqu %xmm3,16(%rdi)
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 320(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 320+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 512(%rsp),%xmm2
+ pand 512+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 416(%rsp),%xmm2
+ pand 416+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm3,48(%rdi)
+
+.Ladd_doneq:
+ addq $576+8,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+.size ecp_nistz256_point_add,.-ecp_nistz256_point_add
+.globl ecp_nistz256_point_add_affine
+.hidden ecp_nistz256_point_add_affine
+.type ecp_nistz256_point_add_affine,@function
+.align 32
+ecp_nistz256_point_add_affine:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ subq $480+8,%rsp
+
+ movdqu 0(%rsi),%xmm0
+ movq %rdx,%rbx
+ movdqu 16(%rsi),%xmm1
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm3
+ movdqu 64(%rsi),%xmm4
+ movdqu 80(%rsi),%xmm5
+ movq 64+0(%rsi),%rax
+ movq 64+8(%rsi),%r14
+ movq 64+16(%rsi),%r15
+ movq 64+24(%rsi),%r8
+ movdqa %xmm0,320(%rsp)
+ movdqa %xmm1,320+16(%rsp)
+ por %xmm0,%xmm1
+ movdqa %xmm2,352(%rsp)
+ movdqa %xmm3,352+16(%rsp)
+ por %xmm2,%xmm3
+ movdqa %xmm4,384(%rsp)
+ movdqa %xmm5,384+16(%rsp)
+ por %xmm1,%xmm3
+
+ movdqu 0(%rbx),%xmm0
+ pshufd $0xb1,%xmm3,%xmm5
+ movdqu 16(%rbx),%xmm1
+ movdqu 32(%rbx),%xmm2
+ por %xmm3,%xmm5
+ movdqu 48(%rbx),%xmm3
+ movdqa %xmm0,416(%rsp)
+ pshufd $0x1e,%xmm5,%xmm4
+ movdqa %xmm1,416+16(%rsp)
+ por %xmm0,%xmm1
+.byte 102,72,15,110,199
+ movdqa %xmm2,448(%rsp)
+ movdqa %xmm3,448+16(%rsp)
+ por %xmm2,%xmm3
+ por %xmm4,%xmm5
+ pxor %xmm4,%xmm4
+ por %xmm1,%xmm3
+
+ leaq 64-0(%rsi),%rsi
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ pcmpeqd %xmm4,%xmm5
+ pshufd $0xb1,%xmm3,%xmm4
+ movq 0(%rbx),%rax
+
+ movq %r12,%r9
+ por %xmm3,%xmm4
+ pshufd $0,%xmm5,%xmm5
+ pshufd $0x1e,%xmm4,%xmm3
+ movq %r13,%r10
+ por %xmm3,%xmm4
+ pxor %xmm3,%xmm3
+ movq %r14,%r11
+ pcmpeqd %xmm3,%xmm4
+ pshufd $0,%xmm4,%xmm4
+
+ leaq 32-0(%rsp),%rsi
+ movq %r15,%r12
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 320(%rsp),%rbx
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 384(%rsp),%rax
+ leaq 384(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 384(%rsp),%rax
+ leaq 384(%rsp),%rbx
+ movq 0+64(%rsp),%r9
+ movq 8+64(%rsp),%r10
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r11
+ movq 24+64(%rsp),%r12
+ leaq 288(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 448(%rsp),%rax
+ leaq 448(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 352(%rsp),%rbx
+ leaq 96(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 0+64(%rsp),%rax
+ movq 8+64(%rsp),%r14
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r15
+ movq 24+64(%rsp),%r8
+ leaq 128(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 0+96(%rsp),%rax
+ movq 8+96(%rsp),%r14
+ leaq 0+96(%rsp),%rsi
+ movq 16+96(%rsp),%r15
+ movq 24+96(%rsp),%r8
+ leaq 192(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 128(%rsp),%rax
+ leaq 128(%rsp),%rbx
+ movq 0+64(%rsp),%r9
+ movq 8+64(%rsp),%r10
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r11
+ movq 24+64(%rsp),%r12
+ leaq 160(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 320(%rsp),%rax
+ leaq 320(%rsp),%rbx
+ movq 0+128(%rsp),%r9
+ movq 8+128(%rsp),%r10
+ leaq 0+128(%rsp),%rsi
+ movq 16+128(%rsp),%r11
+ movq 24+128(%rsp),%r12
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+
+
+
+ addq %r12,%r12
+ leaq 192(%rsp),%rsi
+ adcq %r13,%r13
+ movq %r12,%rax
+ adcq %r8,%r8
+ adcq %r9,%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ subq $-1,%r12
+ movq %r8,%rcx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%r10
+ sbbq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ movq 0(%rsi),%rax
+ cmovzq %rbp,%r13
+ movq 8(%rsi),%rbp
+ cmovzq %rcx,%r8
+ movq 16(%rsi),%rcx
+ cmovzq %r10,%r9
+ movq 24(%rsi),%r10
+
+ call __ecp_nistz256_subq
+
+ leaq 160(%rsp),%rbx
+ leaq 224(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 0+0(%rsp),%rax
+ movq 0+8(%rsp),%rbp
+ movq 0+16(%rsp),%rcx
+ movq 0+24(%rsp),%r10
+ leaq 64(%rsp),%rdi
+
+ call __ecp_nistz256_subq
+
+ movq %r12,0(%rdi)
+ movq %r13,8(%rdi)
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+ movq 352(%rsp),%rax
+ leaq 352(%rsp),%rbx
+ movq 0+160(%rsp),%r9
+ movq 8+160(%rsp),%r10
+ leaq 0+160(%rsp),%rsi
+ movq 16+160(%rsp),%r11
+ movq 24+160(%rsp),%r12
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 96(%rsp),%rax
+ leaq 96(%rsp),%rbx
+ movq 0+64(%rsp),%r9
+ movq 8+64(%rsp),%r10
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r11
+ movq 24+64(%rsp),%r12
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 32(%rsp),%rbx
+ leaq 256(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+.byte 102,72,15,126,199
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 288(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 288+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand .LONE_mont(%rip),%xmm2
+ pand .LONE_mont+16(%rip),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 384(%rsp),%xmm2
+ pand 384+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,64(%rdi)
+ movdqu %xmm3,80(%rdi)
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 224(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 224+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 416(%rsp),%xmm2
+ pand 416+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 320(%rsp),%xmm2
+ pand 320+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,0(%rdi)
+ movdqu %xmm3,16(%rdi)
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 256(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 256+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 448(%rsp),%xmm2
+ pand 448+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 352(%rsp),%xmm2
+ pand 352+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm3,48(%rdi)
+
+ addq $480+8,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+.size ecp_nistz256_point_add_affine,.-ecp_nistz256_point_add_affine
+#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
index 7644689..05369e2 100644
--- 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
@@ -495,14 +495,14 @@
movl %ecx,%r11d
addl %ecx,%ebx
movl 0(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%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
+ movl $0xffffffff,%r11d
roll $6,%eax
xorl %ecx,%r11d
addl %ebx,%eax
@@ -511,7 +511,7 @@
xorl %ebx,%r11d
addl %r11d,%edx
movl 56(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $10,%edx
xorl %ebx,%r11d
addl %eax,%edx
@@ -520,7 +520,7 @@
xorl %eax,%r11d
addl %r11d,%ecx
movl 20(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $15,%ecx
xorl %eax,%r11d
addl %edx,%ecx
@@ -529,7 +529,7 @@
xorl %edx,%r11d
addl %r11d,%ebx
movl 48(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $21,%ebx
xorl %edx,%r11d
addl %ecx,%ebx
@@ -538,7 +538,7 @@
xorl %ecx,%r11d
addl %r11d,%eax
movl 12(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $6,%eax
xorl %ecx,%r11d
addl %ebx,%eax
@@ -547,7 +547,7 @@
xorl %ebx,%r11d
addl %r11d,%edx
movl 40(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $10,%edx
xorl %ebx,%r11d
addl %eax,%edx
@@ -556,7 +556,7 @@
xorl %eax,%r11d
addl %r11d,%ecx
movl 4(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $15,%ecx
xorl %eax,%r11d
addl %edx,%ecx
@@ -565,7 +565,7 @@
xorl %edx,%r11d
addl %r11d,%ebx
movl 32(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $21,%ebx
xorl %edx,%r11d
addl %ecx,%ebx
@@ -574,7 +574,7 @@
xorl %ecx,%r11d
addl %r11d,%eax
movl 60(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $6,%eax
xorl %ecx,%r11d
addl %ebx,%eax
@@ -583,7 +583,7 @@
xorl %ebx,%r11d
addl %r11d,%edx
movl 24(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $10,%edx
xorl %ebx,%r11d
addl %eax,%edx
@@ -592,7 +592,7 @@
xorl %eax,%r11d
addl %r11d,%ecx
movl 52(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $15,%ecx
xorl %eax,%r11d
addl %edx,%ecx
@@ -601,7 +601,7 @@
xorl %edx,%r11d
addl %r11d,%ebx
movl 16(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $21,%ebx
xorl %edx,%r11d
addl %ecx,%ebx
@@ -610,7 +610,7 @@
xorl %ecx,%r11d
addl %r11d,%eax
movl 44(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $6,%eax
xorl %ecx,%r11d
addl %ebx,%eax
@@ -619,7 +619,7 @@
xorl %ebx,%r11d
addl %r11d,%edx
movl 8(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $10,%edx
xorl %ebx,%r11d
addl %eax,%edx
@@ -628,7 +628,7 @@
xorl %eax,%r11d
addl %r11d,%ecx
movl 36(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $15,%ecx
xorl %eax,%r11d
addl %edx,%ecx
@@ -637,7 +637,7 @@
xorl %edx,%r11d
addl %r11d,%ebx
movl 0(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $21,%ebx
xorl %edx,%r11d
addl %ecx,%ebx
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
index 1db7d69..b47bdc9b 100644
--- 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
@@ -23,14 +23,14 @@
movq $14,%rcx
movq 8(%rsi,%rax,1),%r8
movq (%rsi,%rax,1),%r9
- andb $240,%bl
+ andb $0xf0,%bl
movq %r8,%rdx
jmp .Loop1
.align 16
.Loop1:
shrq $4,%r8
- andq $15,%rdx
+ andq $0xf,%rdx
movq %r9,%r10
movb (%rdi,%rcx,1),%al
shrq $4,%r9
@@ -46,13 +46,13 @@
js .Lbreak1
shrq $4,%r8
- andq $15,%rdx
+ andq $0xf,%rdx
movq %r9,%r10
shrq $4,%r9
xorq 8(%rsi,%rax,1),%r8
shlq $60,%r10
xorq (%rsi,%rax,1),%r9
- andb $240,%bl
+ andb $0xf0,%bl
xorq (%r11,%rdx,8),%r9
movq %r8,%rdx
xorq %r10,%r8
@@ -61,19 +61,19 @@
.align 16
.Lbreak1:
shrq $4,%r8
- andq $15,%rdx
+ andq $0xf,%rdx
movq %r9,%r10
shrq $4,%r9
xorq 8(%rsi,%rax,1),%r8
shlq $60,%r10
xorq (%rsi,%rax,1),%r9
- andb $240,%bl
+ andb $0xf0,%bl
xorq (%r11,%rdx,8),%r9
movq %r8,%rdx
xorq %r10,%r8
shrq $4,%r8
- andq $15,%rdx
+ andq $0xf,%rdx
movq %r9,%r10
shrq $4,%r9
xorq 8(%rsi,%rbx,1),%r8
@@ -881,20 +881,20 @@
movdqu 32(%rsi),%xmm7
.byte 102,65,15,56,0,194
- subq $16,%rcx
+ subq $0x10,%rcx
jz .Lodd_tail
movdqu 16(%rsi),%xmm6
movl OPENSSL_ia32cap_P+4(%rip),%eax
- cmpq $48,%rcx
+ cmpq $0x30,%rcx
jb .Lskip4x
andl $71303168,%eax
cmpl $4194304,%eax
je .Lskip4x
- subq $48,%rcx
- movq $11547335547999543296,%rax
+ subq $0x30,%rcx
+ movq $0xA040608020C0E000,%rax
movdqu 48(%rsi),%xmm14
movdqu 64(%rsi),%xmm15
@@ -941,7 +941,7 @@
xorps %xmm13,%xmm5
leaq 64(%rdx),%rdx
- subq $64,%rcx
+ subq $0x40,%rcx
jc .Ltail4x
jmp .Lmod4_loop
@@ -1024,7 +1024,7 @@
xorps %xmm13,%xmm5
leaq 64(%rdx),%rdx
- subq $64,%rcx
+ subq $0x40,%rcx
jnc .Lmod4_loop
.Ltail4x:
@@ -1068,10 +1068,10 @@
pxor %xmm4,%xmm0
psrlq $1,%xmm0
pxor %xmm1,%xmm0
- addq $64,%rcx
+ addq $0x40,%rcx
jz .Ldone
movdqu 32(%rsi),%xmm7
- subq $16,%rcx
+ subq $0x10,%rcx
jz .Lodd_tail
.Lskip4x:
@@ -1094,7 +1094,7 @@
leaq 32(%rdx),%rdx
nop
- subq $32,%rcx
+ subq $0x20,%rcx
jbe .Leven_tail
nop
jmp .Lmod_loop
@@ -1157,7 +1157,7 @@
.byte 102,15,58,68,231,0
pxor %xmm1,%xmm0
- subq $32,%rcx
+ subq $0x20,%rcx
ja .Lmod_loop
.Leven_tail:
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 06c8d67..0000000
--- 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/sha/sha1-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/sha/sha1-x86_64.S
index 7668c2b..d830b53 100644
--- 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
@@ -13,6 +13,11 @@
movl OPENSSL_ia32cap_P+8(%rip),%r10d
testl $512,%r8d
jz .Lialu
+ andl $268435456,%r8d
+ andl $1073741824,%r9d
+ orl %r9d,%r8d
+ cmpl $1342177280,%r8d
+ je _avx_shortcut
jmp _ssse3_shortcut
.align 16
@@ -2408,6 +2413,1122 @@
.Lepilogue_ssse3:
.byte 0xf3,0xc3
.size sha1_block_data_order_ssse3,.-sha1_block_data_order_ssse3
+.type sha1_block_data_order_avx,@function
+.align 16
+sha1_block_data_order_avx:
+_avx_shortcut:
+ movq %rsp,%rax
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ leaq -64(%rsp),%rsp
+ vzeroupper
+ 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
+
+ vmovdqa 64(%r11),%xmm6
+ vmovdqa -64(%r11),%xmm11
+ vmovdqu 0(%r9),%xmm0
+ vmovdqu 16(%r9),%xmm1
+ vmovdqu 32(%r9),%xmm2
+ vmovdqu 48(%r9),%xmm3
+ vpshufb %xmm6,%xmm0,%xmm0
+ addq $64,%r9
+ vpshufb %xmm6,%xmm1,%xmm1
+ vpshufb %xmm6,%xmm2,%xmm2
+ vpshufb %xmm6,%xmm3,%xmm3
+ vpaddd %xmm11,%xmm0,%xmm4
+ vpaddd %xmm11,%xmm1,%xmm5
+ vpaddd %xmm11,%xmm2,%xmm6
+ vmovdqa %xmm4,0(%rsp)
+ vmovdqa %xmm5,16(%rsp)
+ vmovdqa %xmm6,32(%rsp)
+ jmp .Loop_avx
+.align 16
+.Loop_avx:
+ shrdl $2,%ebx,%ebx
+ xorl %edx,%esi
+ vpalignr $8,%xmm0,%xmm1,%xmm4
+ movl %eax,%edi
+ addl 0(%rsp),%ebp
+ vpaddd %xmm3,%xmm11,%xmm9
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpsrldq $4,%xmm3,%xmm8
+ addl %esi,%ebp
+ andl %ebx,%edi
+ vpxor %xmm0,%xmm4,%xmm4
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ vpxor %xmm2,%xmm8,%xmm8
+ shrdl $7,%eax,%eax
+ xorl %ecx,%edi
+ movl %ebp,%esi
+ addl 4(%rsp),%edx
+ vpxor %xmm8,%xmm4,%xmm4
+ xorl %ebx,%eax
+ shldl $5,%ebp,%ebp
+ vmovdqa %xmm9,48(%rsp)
+ addl %edi,%edx
+ andl %eax,%esi
+ vpsrld $31,%xmm4,%xmm8
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ shrdl $7,%ebp,%ebp
+ xorl %ebx,%esi
+ vpslldq $12,%xmm4,%xmm10
+ vpaddd %xmm4,%xmm4,%xmm4
+ movl %edx,%edi
+ addl 8(%rsp),%ecx
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ vpsrld $30,%xmm10,%xmm9
+ vpor %xmm8,%xmm4,%xmm4
+ addl %esi,%ecx
+ andl %ebp,%edi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ vpslld $2,%xmm10,%xmm10
+ vpxor %xmm9,%xmm4,%xmm4
+ shrdl $7,%edx,%edx
+ xorl %eax,%edi
+ movl %ecx,%esi
+ addl 12(%rsp),%ebx
+ vpxor %xmm10,%xmm4,%xmm4
+ xorl %ebp,%edx
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ andl %edx,%esi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ shrdl $7,%ecx,%ecx
+ xorl %ebp,%esi
+ vpalignr $8,%xmm1,%xmm2,%xmm5
+ movl %ebx,%edi
+ addl 16(%rsp),%eax
+ vpaddd %xmm4,%xmm11,%xmm9
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vpsrldq $4,%xmm4,%xmm8
+ addl %esi,%eax
+ andl %ecx,%edi
+ vpxor %xmm1,%xmm5,%xmm5
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpxor %xmm3,%xmm8,%xmm8
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%edi
+ movl %eax,%esi
+ addl 20(%rsp),%ebp
+ vpxor %xmm8,%xmm5,%xmm5
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vmovdqa %xmm9,0(%rsp)
+ addl %edi,%ebp
+ andl %ebx,%esi
+ vpsrld $31,%xmm5,%xmm8
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ shrdl $7,%eax,%eax
+ xorl %ecx,%esi
+ vpslldq $12,%xmm5,%xmm10
+ vpaddd %xmm5,%xmm5,%xmm5
+ movl %ebp,%edi
+ addl 24(%rsp),%edx
+ xorl %ebx,%eax
+ shldl $5,%ebp,%ebp
+ vpsrld $30,%xmm10,%xmm9
+ vpor %xmm8,%xmm5,%xmm5
+ addl %esi,%edx
+ andl %eax,%edi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ vpslld $2,%xmm10,%xmm10
+ vpxor %xmm9,%xmm5,%xmm5
+ shrdl $7,%ebp,%ebp
+ xorl %ebx,%edi
+ movl %edx,%esi
+ addl 28(%rsp),%ecx
+ vpxor %xmm10,%xmm5,%xmm5
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ vmovdqa -32(%r11),%xmm11
+ addl %edi,%ecx
+ andl %ebp,%esi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ shrdl $7,%edx,%edx
+ xorl %eax,%esi
+ vpalignr $8,%xmm2,%xmm3,%xmm6
+ movl %ecx,%edi
+ addl 32(%rsp),%ebx
+ vpaddd %xmm5,%xmm11,%xmm9
+ xorl %ebp,%edx
+ shldl $5,%ecx,%ecx
+ vpsrldq $4,%xmm5,%xmm8
+ addl %esi,%ebx
+ andl %edx,%edi
+ vpxor %xmm2,%xmm6,%xmm6
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ vpxor %xmm4,%xmm8,%xmm8
+ shrdl $7,%ecx,%ecx
+ xorl %ebp,%edi
+ movl %ebx,%esi
+ addl 36(%rsp),%eax
+ vpxor %xmm8,%xmm6,%xmm6
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vmovdqa %xmm9,16(%rsp)
+ addl %edi,%eax
+ andl %ecx,%esi
+ vpsrld $31,%xmm6,%xmm8
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%esi
+ vpslldq $12,%xmm6,%xmm10
+ vpaddd %xmm6,%xmm6,%xmm6
+ movl %eax,%edi
+ addl 40(%rsp),%ebp
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpsrld $30,%xmm10,%xmm9
+ vpor %xmm8,%xmm6,%xmm6
+ addl %esi,%ebp
+ andl %ebx,%edi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ vpslld $2,%xmm10,%xmm10
+ vpxor %xmm9,%xmm6,%xmm6
+ shrdl $7,%eax,%eax
+ xorl %ecx,%edi
+ movl %ebp,%esi
+ addl 44(%rsp),%edx
+ vpxor %xmm10,%xmm6,%xmm6
+ xorl %ebx,%eax
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ andl %eax,%esi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ shrdl $7,%ebp,%ebp
+ xorl %ebx,%esi
+ vpalignr $8,%xmm3,%xmm4,%xmm7
+ movl %edx,%edi
+ addl 48(%rsp),%ecx
+ vpaddd %xmm6,%xmm11,%xmm9
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ vpsrldq $4,%xmm6,%xmm8
+ addl %esi,%ecx
+ andl %ebp,%edi
+ vpxor %xmm3,%xmm7,%xmm7
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ vpxor %xmm5,%xmm8,%xmm8
+ shrdl $7,%edx,%edx
+ xorl %eax,%edi
+ movl %ecx,%esi
+ addl 52(%rsp),%ebx
+ vpxor %xmm8,%xmm7,%xmm7
+ xorl %ebp,%edx
+ shldl $5,%ecx,%ecx
+ vmovdqa %xmm9,32(%rsp)
+ addl %edi,%ebx
+ andl %edx,%esi
+ vpsrld $31,%xmm7,%xmm8
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ shrdl $7,%ecx,%ecx
+ xorl %ebp,%esi
+ vpslldq $12,%xmm7,%xmm10
+ vpaddd %xmm7,%xmm7,%xmm7
+ movl %ebx,%edi
+ addl 56(%rsp),%eax
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vpsrld $30,%xmm10,%xmm9
+ vpor %xmm8,%xmm7,%xmm7
+ addl %esi,%eax
+ andl %ecx,%edi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpslld $2,%xmm10,%xmm10
+ vpxor %xmm9,%xmm7,%xmm7
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%edi
+ movl %eax,%esi
+ addl 60(%rsp),%ebp
+ vpxor %xmm10,%xmm7,%xmm7
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ andl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ vpalignr $8,%xmm6,%xmm7,%xmm8
+ vpxor %xmm4,%xmm0,%xmm0
+ shrdl $7,%eax,%eax
+ xorl %ecx,%esi
+ movl %ebp,%edi
+ addl 0(%rsp),%edx
+ vpxor %xmm1,%xmm0,%xmm0
+ xorl %ebx,%eax
+ shldl $5,%ebp,%ebp
+ vpaddd %xmm7,%xmm11,%xmm9
+ addl %esi,%edx
+ andl %eax,%edi
+ vpxor %xmm8,%xmm0,%xmm0
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ shrdl $7,%ebp,%ebp
+ xorl %ebx,%edi
+ vpsrld $30,%xmm0,%xmm8
+ vmovdqa %xmm9,48(%rsp)
+ movl %edx,%esi
+ addl 4(%rsp),%ecx
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ vpslld $2,%xmm0,%xmm0
+ addl %edi,%ecx
+ andl %ebp,%esi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ shrdl $7,%edx,%edx
+ xorl %eax,%esi
+ movl %ecx,%edi
+ addl 8(%rsp),%ebx
+ vpor %xmm8,%xmm0,%xmm0
+ xorl %ebp,%edx
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ andl %edx,%edi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ addl 12(%rsp),%eax
+ xorl %ebp,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpalignr $8,%xmm7,%xmm0,%xmm8
+ vpxor %xmm5,%xmm1,%xmm1
+ addl 16(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ vpxor %xmm2,%xmm1,%xmm1
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ vpaddd %xmm0,%xmm11,%xmm9
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpxor %xmm8,%xmm1,%xmm1
+ addl 20(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ vpsrld $30,%xmm1,%xmm8
+ vmovdqa %xmm9,0(%rsp)
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpslld $2,%xmm1,%xmm1
+ addl 24(%rsp),%ecx
+ xorl %eax,%esi
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%edi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpor %xmm8,%xmm1,%xmm1
+ addl 28(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpalignr $8,%xmm0,%xmm1,%xmm8
+ vpxor %xmm6,%xmm2,%xmm2
+ addl 32(%rsp),%eax
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ vpxor %xmm3,%xmm2,%xmm2
+ addl %esi,%eax
+ xorl %edx,%edi
+ vpaddd %xmm1,%xmm11,%xmm9
+ vmovdqa 0(%r11),%xmm11
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpxor %xmm8,%xmm2,%xmm2
+ addl 36(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ vpsrld $30,%xmm2,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpslld $2,%xmm2,%xmm2
+ addl 40(%rsp),%edx
+ xorl %ebx,%esi
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ xorl %ebx,%edi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpor %xmm8,%xmm2,%xmm2
+ addl 44(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpalignr $8,%xmm1,%xmm2,%xmm8
+ vpxor %xmm7,%xmm3,%xmm3
+ addl 48(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ vpxor %xmm4,%xmm3,%xmm3
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ vpaddd %xmm2,%xmm11,%xmm9
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpxor %xmm8,%xmm3,%xmm3
+ addl 52(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ vpsrld $30,%xmm3,%xmm8
+ vmovdqa %xmm9,32(%rsp)
+ addl %edi,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpslld $2,%xmm3,%xmm3
+ addl 56(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpor %xmm8,%xmm3,%xmm3
+ addl 60(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpalignr $8,%xmm2,%xmm3,%xmm8
+ vpxor %xmm0,%xmm4,%xmm4
+ addl 0(%rsp),%ecx
+ xorl %eax,%esi
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %esi,%ecx
+ xorl %eax,%edi
+ vpaddd %xmm3,%xmm11,%xmm9
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpxor %xmm8,%xmm4,%xmm4
+ addl 4(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ vpsrld $30,%xmm4,%xmm8
+ vmovdqa %xmm9,48(%rsp)
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpslld $2,%xmm4,%xmm4
+ addl 8(%rsp),%eax
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%edi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpor %xmm8,%xmm4,%xmm4
+ addl 12(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpalignr $8,%xmm3,%xmm4,%xmm8
+ vpxor %xmm1,%xmm5,%xmm5
+ addl 16(%rsp),%edx
+ xorl %ebx,%esi
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ vpxor %xmm6,%xmm5,%xmm5
+ addl %esi,%edx
+ xorl %ebx,%edi
+ vpaddd %xmm4,%xmm11,%xmm9
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpxor %xmm8,%xmm5,%xmm5
+ addl 20(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ vpsrld $30,%xmm5,%xmm8
+ vmovdqa %xmm9,0(%rsp)
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpslld $2,%xmm5,%xmm5
+ addl 24(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpor %xmm8,%xmm5,%xmm5
+ addl 28(%rsp),%eax
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ xorl %edx,%edi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %ecx,%esi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpalignr $8,%xmm4,%xmm5,%xmm8
+ vpxor %xmm2,%xmm6,%xmm6
+ addl 32(%rsp),%ebp
+ andl %ecx,%esi
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %eax,%edi
+ xorl %ecx,%esi
+ vpaddd %xmm5,%xmm11,%xmm9
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ vpxor %xmm8,%xmm6,%xmm6
+ xorl %ebx,%edi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ addl 36(%rsp),%edx
+ vpsrld $30,%xmm6,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ andl %ebx,%edi
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %ebp,%esi
+ vpslld $2,%xmm6,%xmm6
+ xorl %ebx,%edi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %eax,%esi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ addl 40(%rsp),%ecx
+ andl %eax,%esi
+ vpor %xmm8,%xmm6,%xmm6
+ xorl %ebx,%eax
+ shrdl $7,%ebp,%ebp
+ movl %edx,%edi
+ xorl %eax,%esi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %ebp,%edi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ addl 44(%rsp),%ebx
+ andl %ebp,%edi
+ xorl %eax,%ebp
+ shrdl $7,%edx,%edx
+ movl %ecx,%esi
+ xorl %ebp,%edi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %edx,%esi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ vpalignr $8,%xmm5,%xmm6,%xmm8
+ vpxor %xmm3,%xmm7,%xmm7
+ addl 48(%rsp),%eax
+ andl %edx,%esi
+ xorl %ebp,%edx
+ shrdl $7,%ecx,%ecx
+ vpxor %xmm0,%xmm7,%xmm7
+ movl %ebx,%edi
+ xorl %edx,%esi
+ vpaddd %xmm6,%xmm11,%xmm9
+ vmovdqa 32(%r11),%xmm11
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ vpxor %xmm8,%xmm7,%xmm7
+ xorl %ecx,%edi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 52(%rsp),%ebp
+ vpsrld $30,%xmm7,%xmm8
+ vmovdqa %xmm9,32(%rsp)
+ andl %ecx,%edi
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%esi
+ vpslld $2,%xmm7,%xmm7
+ xorl %ecx,%edi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ addl 56(%rsp),%edx
+ andl %ebx,%esi
+ vpor %xmm8,%xmm7,%xmm7
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %ebp,%edi
+ xorl %ebx,%esi
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ xorl %eax,%edi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ addl 60(%rsp),%ecx
+ andl %eax,%edi
+ xorl %ebx,%eax
+ shrdl $7,%ebp,%ebp
+ movl %edx,%esi
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %ebp,%esi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ vpalignr $8,%xmm6,%xmm7,%xmm8
+ vpxor %xmm4,%xmm0,%xmm0
+ addl 0(%rsp),%ebx
+ andl %ebp,%esi
+ xorl %eax,%ebp
+ shrdl $7,%edx,%edx
+ vpxor %xmm1,%xmm0,%xmm0
+ movl %ecx,%edi
+ xorl %ebp,%esi
+ vpaddd %xmm7,%xmm11,%xmm9
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ vpxor %xmm8,%xmm0,%xmm0
+ xorl %edx,%edi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ addl 4(%rsp),%eax
+ vpsrld $30,%xmm0,%xmm8
+ vmovdqa %xmm9,48(%rsp)
+ andl %edx,%edi
+ xorl %ebp,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ vpslld $2,%xmm0,%xmm0
+ xorl %edx,%edi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %ecx,%esi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 8(%rsp),%ebp
+ andl %ecx,%esi
+ vpor %xmm8,%xmm0,%xmm0
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%edi
+ xorl %ecx,%esi
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ xorl %ebx,%edi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ addl 12(%rsp),%edx
+ andl %ebx,%edi
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %ebp,%esi
+ xorl %ebx,%edi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %eax,%esi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ vpalignr $8,%xmm7,%xmm0,%xmm8
+ vpxor %xmm5,%xmm1,%xmm1
+ addl 16(%rsp),%ecx
+ andl %eax,%esi
+ xorl %ebx,%eax
+ shrdl $7,%ebp,%ebp
+ vpxor %xmm2,%xmm1,%xmm1
+ movl %edx,%edi
+ xorl %eax,%esi
+ vpaddd %xmm0,%xmm11,%xmm9
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ vpxor %xmm8,%xmm1,%xmm1
+ xorl %ebp,%edi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ addl 20(%rsp),%ebx
+ vpsrld $30,%xmm1,%xmm8
+ vmovdqa %xmm9,0(%rsp)
+ andl %ebp,%edi
+ xorl %eax,%ebp
+ shrdl $7,%edx,%edx
+ movl %ecx,%esi
+ vpslld $2,%xmm1,%xmm1
+ xorl %ebp,%edi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %edx,%esi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ addl 24(%rsp),%eax
+ andl %edx,%esi
+ vpor %xmm8,%xmm1,%xmm1
+ xorl %ebp,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%edi
+ xorl %edx,%esi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %ecx,%edi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 28(%rsp),%ebp
+ andl %ecx,%edi
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%esi
+ xorl %ecx,%edi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ vpalignr $8,%xmm0,%xmm1,%xmm8
+ vpxor %xmm6,%xmm2,%xmm2
+ addl 32(%rsp),%edx
+ andl %ebx,%esi
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ vpxor %xmm3,%xmm2,%xmm2
+ movl %ebp,%edi
+ xorl %ebx,%esi
+ vpaddd %xmm1,%xmm11,%xmm9
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ vpxor %xmm8,%xmm2,%xmm2
+ xorl %eax,%edi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ addl 36(%rsp),%ecx
+ vpsrld $30,%xmm2,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ andl %eax,%edi
+ xorl %ebx,%eax
+ shrdl $7,%ebp,%ebp
+ movl %edx,%esi
+ vpslld $2,%xmm2,%xmm2
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %ebp,%esi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ addl 40(%rsp),%ebx
+ andl %ebp,%esi
+ vpor %xmm8,%xmm2,%xmm2
+ xorl %eax,%ebp
+ shrdl $7,%edx,%edx
+ movl %ecx,%edi
+ xorl %ebp,%esi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edx,%edi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ addl 44(%rsp),%eax
+ andl %edx,%edi
+ xorl %ebp,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ xorl %edx,%edi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %edx,%esi
+ addl %ebx,%eax
+ vpalignr $8,%xmm1,%xmm2,%xmm8
+ vpxor %xmm7,%xmm3,%xmm3
+ addl 48(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ vpxor %xmm4,%xmm3,%xmm3
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ vpaddd %xmm2,%xmm11,%xmm9
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpxor %xmm8,%xmm3,%xmm3
+ addl 52(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ vpsrld $30,%xmm3,%xmm8
+ vmovdqa %xmm9,32(%rsp)
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpslld $2,%xmm3,%xmm3
+ addl 56(%rsp),%ecx
+ xorl %eax,%esi
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%edi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpor %xmm8,%xmm3,%xmm3
+ addl 60(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 0(%rsp),%eax
+ vpaddd %xmm3,%xmm11,%xmm9
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ vmovdqa %xmm9,48(%rsp)
+ xorl %edx,%edi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 4(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 8(%rsp),%edx
+ xorl %ebx,%esi
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ xorl %ebx,%edi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ addl 12(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ cmpq %r10,%r9
+ je .Ldone_avx
+ vmovdqa 64(%r11),%xmm6
+ vmovdqa -64(%r11),%xmm11
+ vmovdqu 0(%r9),%xmm0
+ vmovdqu 16(%r9),%xmm1
+ vmovdqu 32(%r9),%xmm2
+ vmovdqu 48(%r9),%xmm3
+ vpshufb %xmm6,%xmm0,%xmm0
+ addq $64,%r9
+ addl 16(%rsp),%ebx
+ xorl %ebp,%esi
+ vpshufb %xmm6,%xmm1,%xmm1
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ vpaddd %xmm11,%xmm0,%xmm4
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vmovdqa %xmm4,0(%rsp)
+ addl 20(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 24(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 28(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ addl 32(%rsp),%ecx
+ xorl %eax,%esi
+ vpshufb %xmm6,%xmm2,%xmm2
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ vpaddd %xmm11,%xmm1,%xmm5
+ addl %esi,%ecx
+ xorl %eax,%edi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vmovdqa %xmm5,16(%rsp)
+ addl 36(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 40(%rsp),%eax
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%edi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 44(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 48(%rsp),%edx
+ xorl %ebx,%esi
+ vpshufb %xmm6,%xmm3,%xmm3
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ vpaddd %xmm11,%xmm2,%xmm6
+ addl %esi,%edx
+ xorl %ebx,%edi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vmovdqa %xmm6,32(%rsp)
+ addl 52(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ addl 56(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 60(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ shrdl $7,%ecx,%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_avx
+
+.align 16
+.Ldone_avx:
+ addl 16(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 20(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 24(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 28(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ addl 32(%rsp),%ecx
+ xorl %eax,%esi
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%edi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ addl 36(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 40(%rsp),%eax
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%edi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 44(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 48(%rsp),%edx
+ xorl %ebx,%esi
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ xorl %ebx,%edi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ addl 52(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ addl 56(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 60(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vzeroupper
+
+ 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_avx:
+ .byte 0xf3,0xc3
+.size sha1_block_data_order_avx,.-sha1_block_data_order_avx
.align 64
K_XX_XX:
.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999
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
index f526de5..445b497 100644
--- 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
@@ -12,6 +12,11 @@
movl 0(%r11),%r9d
movl 4(%r11),%r10d
movl 8(%r11),%r11d
+ andl $1073741824,%r9d
+ andl $268435968,%r10d
+ orl %r9d,%r10d
+ cmpl $1342177792,%r10d
+ je .Lavx_shortcut
testl $512,%r10d
jnz .Lssse3_shortcut
pushq %rbx
@@ -2841,4 +2846,1061 @@
.Lepilogue_ssse3:
.byte 0xf3,0xc3
.size sha256_block_data_order_ssse3,.-sha256_block_data_order_ssse3
+.type sha256_block_data_order_avx,@function
+.align 64
+sha256_block_data_order_avx:
+.Lavx_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_avx:
+
+ vzeroupper
+ 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
+ vmovdqa K256+512+32(%rip),%xmm8
+ vmovdqa K256+512+64(%rip),%xmm9
+ jmp .Lloop_avx
+.align 16
+.Lloop_avx:
+ vmovdqa K256+512(%rip),%xmm7
+ vmovdqu 0(%rsi),%xmm0
+ vmovdqu 16(%rsi),%xmm1
+ vmovdqu 32(%rsi),%xmm2
+ vmovdqu 48(%rsi),%xmm3
+ vpshufb %xmm7,%xmm0,%xmm0
+ leaq K256(%rip),%rbp
+ vpshufb %xmm7,%xmm1,%xmm1
+ vpshufb %xmm7,%xmm2,%xmm2
+ vpaddd 0(%rbp),%xmm0,%xmm4
+ vpshufb %xmm7,%xmm3,%xmm3
+ vpaddd 32(%rbp),%xmm1,%xmm5
+ vpaddd 64(%rbp),%xmm2,%xmm6
+ vpaddd 96(%rbp),%xmm3,%xmm7
+ vmovdqa %xmm4,0(%rsp)
+ movl %eax,%r14d
+ vmovdqa %xmm5,16(%rsp)
+ movl %ebx,%edi
+ vmovdqa %xmm6,32(%rsp)
+ xorl %ecx,%edi
+ vmovdqa %xmm7,48(%rsp)
+ movl %r8d,%r13d
+ jmp .Lavx_00_47
+
+.align 16
+.Lavx_00_47:
+ subq $-128,%rbp
+ vpalignr $4,%xmm0,%xmm1,%xmm4
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%eax
+ movl %r9d,%r12d
+ vpalignr $4,%xmm2,%xmm3,%xmm7
+ shrdl $9,%r14d,%r14d
+ xorl %r8d,%r13d
+ xorl %r10d,%r12d
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%r13d,%r13d
+ xorl %eax,%r14d
+ andl %r8d,%r12d
+ vpaddd %xmm7,%xmm0,%xmm0
+ xorl %r8d,%r13d
+ addl 0(%rsp),%r11d
+ movl %eax,%r15d
+ vpsrld $3,%xmm4,%xmm7
+ xorl %r10d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ebx,%r15d
+ vpslld $14,%xmm4,%xmm5
+ addl %r12d,%r11d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%r14d
+ addl %r13d,%r11d
+ xorl %ebx,%edi
+ vpshufd $250,%xmm3,%xmm7
+ shrdl $2,%r14d,%r14d
+ addl %r11d,%edx
+ addl %edi,%r11d
+ vpsrld $11,%xmm6,%xmm6
+ movl %edx,%r13d
+ addl %r11d,%r14d
+ shrdl $14,%r13d,%r13d
+ vpxor %xmm5,%xmm4,%xmm4
+ movl %r14d,%r11d
+ movl %r8d,%r12d
+ shrdl $9,%r14d,%r14d
+ vpslld $11,%xmm5,%xmm5
+ xorl %edx,%r13d
+ xorl %r9d,%r12d
+ shrdl $5,%r13d,%r13d
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %r11d,%r14d
+ andl %edx,%r12d
+ xorl %edx,%r13d
+ vpsrld $10,%xmm7,%xmm6
+ addl 4(%rsp),%r10d
+ movl %r11d,%edi
+ xorl %r9d,%r12d
+ vpxor %xmm5,%xmm4,%xmm4
+ shrdl $11,%r14d,%r14d
+ xorl %eax,%edi
+ addl %r12d,%r10d
+ vpsrlq $17,%xmm7,%xmm7
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r11d,%r14d
+ vpaddd %xmm4,%xmm0,%xmm0
+ addl %r13d,%r10d
+ xorl %eax,%r15d
+ shrdl $2,%r14d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ addl %r10d,%ecx
+ addl %r15d,%r10d
+ movl %ecx,%r13d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %r10d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r10d
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %edx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ecx,%r13d
+ vpshufb %xmm8,%xmm6,%xmm6
+ xorl %r8d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r10d,%r14d
+ vpaddd %xmm6,%xmm0,%xmm0
+ andl %ecx,%r12d
+ xorl %ecx,%r13d
+ addl 8(%rsp),%r9d
+ vpshufd $80,%xmm0,%xmm7
+ movl %r10d,%r15d
+ xorl %r8d,%r12d
+ shrdl $11,%r14d,%r14d
+ vpsrld $10,%xmm7,%xmm6
+ xorl %r11d,%r15d
+ addl %r12d,%r9d
+ shrdl $6,%r13d,%r13d
+ vpsrlq $17,%xmm7,%xmm7
+ andl %r15d,%edi
+ xorl %r10d,%r14d
+ addl %r13d,%r9d
+ vpxor %xmm7,%xmm6,%xmm6
+ xorl %r11d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r9d,%ebx
+ vpsrlq $2,%xmm7,%xmm7
+ addl %edi,%r9d
+ movl %ebx,%r13d
+ addl %r9d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r9d
+ movl %ecx,%r12d
+ vpshufb %xmm9,%xmm6,%xmm6
+ shrdl $9,%r14d,%r14d
+ xorl %ebx,%r13d
+ xorl %edx,%r12d
+ vpaddd %xmm6,%xmm0,%xmm0
+ shrdl $5,%r13d,%r13d
+ xorl %r9d,%r14d
+ andl %ebx,%r12d
+ vpaddd 0(%rbp),%xmm0,%xmm6
+ xorl %ebx,%r13d
+ addl 12(%rsp),%r8d
+ movl %r9d,%edi
+ xorl %edx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r10d,%edi
+ addl %r12d,%r8d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r9d,%r14d
+ addl %r13d,%r8d
+ xorl %r10d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r8d,%eax
+ addl %r15d,%r8d
+ movl %eax,%r13d
+ addl %r8d,%r14d
+ vmovdqa %xmm6,0(%rsp)
+ vpalignr $4,%xmm1,%xmm2,%xmm4
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r8d
+ movl %ebx,%r12d
+ vpalignr $4,%xmm3,%xmm0,%xmm7
+ shrdl $9,%r14d,%r14d
+ xorl %eax,%r13d
+ xorl %ecx,%r12d
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%r13d,%r13d
+ xorl %r8d,%r14d
+ andl %eax,%r12d
+ vpaddd %xmm7,%xmm1,%xmm1
+ xorl %eax,%r13d
+ addl 16(%rsp),%edx
+ movl %r8d,%r15d
+ vpsrld $3,%xmm4,%xmm7
+ xorl %ecx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r9d,%r15d
+ vpslld $14,%xmm4,%xmm5
+ addl %r12d,%edx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %r8d,%r14d
+ addl %r13d,%edx
+ xorl %r9d,%edi
+ vpshufd $250,%xmm0,%xmm7
+ shrdl $2,%r14d,%r14d
+ addl %edx,%r11d
+ addl %edi,%edx
+ vpsrld $11,%xmm6,%xmm6
+ movl %r11d,%r13d
+ addl %edx,%r14d
+ shrdl $14,%r13d,%r13d
+ vpxor %xmm5,%xmm4,%xmm4
+ movl %r14d,%edx
+ movl %eax,%r12d
+ shrdl $9,%r14d,%r14d
+ vpslld $11,%xmm5,%xmm5
+ xorl %r11d,%r13d
+ xorl %ebx,%r12d
+ shrdl $5,%r13d,%r13d
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %edx,%r14d
+ andl %r11d,%r12d
+ xorl %r11d,%r13d
+ vpsrld $10,%xmm7,%xmm6
+ addl 20(%rsp),%ecx
+ movl %edx,%edi
+ xorl %ebx,%r12d
+ vpxor %xmm5,%xmm4,%xmm4
+ shrdl $11,%r14d,%r14d
+ xorl %r8d,%edi
+ addl %r12d,%ecx
+ vpsrlq $17,%xmm7,%xmm7
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %edx,%r14d
+ vpaddd %xmm4,%xmm1,%xmm1
+ addl %r13d,%ecx
+ xorl %r8d,%r15d
+ shrdl $2,%r14d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ addl %ecx,%r10d
+ addl %r15d,%ecx
+ movl %r10d,%r13d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %ecx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %r11d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r10d,%r13d
+ vpshufb %xmm8,%xmm6,%xmm6
+ xorl %eax,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ecx,%r14d
+ vpaddd %xmm6,%xmm1,%xmm1
+ andl %r10d,%r12d
+ xorl %r10d,%r13d
+ addl 24(%rsp),%ebx
+ vpshufd $80,%xmm1,%xmm7
+ movl %ecx,%r15d
+ xorl %eax,%r12d
+ shrdl $11,%r14d,%r14d
+ vpsrld $10,%xmm7,%xmm6
+ xorl %edx,%r15d
+ addl %r12d,%ebx
+ shrdl $6,%r13d,%r13d
+ vpsrlq $17,%xmm7,%xmm7
+ andl %r15d,%edi
+ xorl %ecx,%r14d
+ addl %r13d,%ebx
+ vpxor %xmm7,%xmm6,%xmm6
+ xorl %edx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %ebx,%r9d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %edi,%ebx
+ movl %r9d,%r13d
+ addl %ebx,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ebx
+ movl %r10d,%r12d
+ vpshufb %xmm9,%xmm6,%xmm6
+ shrdl $9,%r14d,%r14d
+ xorl %r9d,%r13d
+ xorl %r11d,%r12d
+ vpaddd %xmm6,%xmm1,%xmm1
+ shrdl $5,%r13d,%r13d
+ xorl %ebx,%r14d
+ andl %r9d,%r12d
+ vpaddd 32(%rbp),%xmm1,%xmm6
+ xorl %r9d,%r13d
+ addl 28(%rsp),%eax
+ movl %ebx,%edi
+ xorl %r11d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ecx,%edi
+ addl %r12d,%eax
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %ebx,%r14d
+ addl %r13d,%eax
+ xorl %ecx,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %eax,%r8d
+ addl %r15d,%eax
+ movl %r8d,%r13d
+ addl %eax,%r14d
+ vmovdqa %xmm6,16(%rsp)
+ vpalignr $4,%xmm2,%xmm3,%xmm4
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%eax
+ movl %r9d,%r12d
+ vpalignr $4,%xmm0,%xmm1,%xmm7
+ shrdl $9,%r14d,%r14d
+ xorl %r8d,%r13d
+ xorl %r10d,%r12d
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%r13d,%r13d
+ xorl %eax,%r14d
+ andl %r8d,%r12d
+ vpaddd %xmm7,%xmm2,%xmm2
+ xorl %r8d,%r13d
+ addl 32(%rsp),%r11d
+ movl %eax,%r15d
+ vpsrld $3,%xmm4,%xmm7
+ xorl %r10d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ebx,%r15d
+ vpslld $14,%xmm4,%xmm5
+ addl %r12d,%r11d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%r14d
+ addl %r13d,%r11d
+ xorl %ebx,%edi
+ vpshufd $250,%xmm1,%xmm7
+ shrdl $2,%r14d,%r14d
+ addl %r11d,%edx
+ addl %edi,%r11d
+ vpsrld $11,%xmm6,%xmm6
+ movl %edx,%r13d
+ addl %r11d,%r14d
+ shrdl $14,%r13d,%r13d
+ vpxor %xmm5,%xmm4,%xmm4
+ movl %r14d,%r11d
+ movl %r8d,%r12d
+ shrdl $9,%r14d,%r14d
+ vpslld $11,%xmm5,%xmm5
+ xorl %edx,%r13d
+ xorl %r9d,%r12d
+ shrdl $5,%r13d,%r13d
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %r11d,%r14d
+ andl %edx,%r12d
+ xorl %edx,%r13d
+ vpsrld $10,%xmm7,%xmm6
+ addl 36(%rsp),%r10d
+ movl %r11d,%edi
+ xorl %r9d,%r12d
+ vpxor %xmm5,%xmm4,%xmm4
+ shrdl $11,%r14d,%r14d
+ xorl %eax,%edi
+ addl %r12d,%r10d
+ vpsrlq $17,%xmm7,%xmm7
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r11d,%r14d
+ vpaddd %xmm4,%xmm2,%xmm2
+ addl %r13d,%r10d
+ xorl %eax,%r15d
+ shrdl $2,%r14d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ addl %r10d,%ecx
+ addl %r15d,%r10d
+ movl %ecx,%r13d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %r10d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r10d
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %edx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ecx,%r13d
+ vpshufb %xmm8,%xmm6,%xmm6
+ xorl %r8d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r10d,%r14d
+ vpaddd %xmm6,%xmm2,%xmm2
+ andl %ecx,%r12d
+ xorl %ecx,%r13d
+ addl 40(%rsp),%r9d
+ vpshufd $80,%xmm2,%xmm7
+ movl %r10d,%r15d
+ xorl %r8d,%r12d
+ shrdl $11,%r14d,%r14d
+ vpsrld $10,%xmm7,%xmm6
+ xorl %r11d,%r15d
+ addl %r12d,%r9d
+ shrdl $6,%r13d,%r13d
+ vpsrlq $17,%xmm7,%xmm7
+ andl %r15d,%edi
+ xorl %r10d,%r14d
+ addl %r13d,%r9d
+ vpxor %xmm7,%xmm6,%xmm6
+ xorl %r11d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r9d,%ebx
+ vpsrlq $2,%xmm7,%xmm7
+ addl %edi,%r9d
+ movl %ebx,%r13d
+ addl %r9d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r9d
+ movl %ecx,%r12d
+ vpshufb %xmm9,%xmm6,%xmm6
+ shrdl $9,%r14d,%r14d
+ xorl %ebx,%r13d
+ xorl %edx,%r12d
+ vpaddd %xmm6,%xmm2,%xmm2
+ shrdl $5,%r13d,%r13d
+ xorl %r9d,%r14d
+ andl %ebx,%r12d
+ vpaddd 64(%rbp),%xmm2,%xmm6
+ xorl %ebx,%r13d
+ addl 44(%rsp),%r8d
+ movl %r9d,%edi
+ xorl %edx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r10d,%edi
+ addl %r12d,%r8d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r9d,%r14d
+ addl %r13d,%r8d
+ xorl %r10d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r8d,%eax
+ addl %r15d,%r8d
+ movl %eax,%r13d
+ addl %r8d,%r14d
+ vmovdqa %xmm6,32(%rsp)
+ vpalignr $4,%xmm3,%xmm0,%xmm4
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r8d
+ movl %ebx,%r12d
+ vpalignr $4,%xmm1,%xmm2,%xmm7
+ shrdl $9,%r14d,%r14d
+ xorl %eax,%r13d
+ xorl %ecx,%r12d
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%r13d,%r13d
+ xorl %r8d,%r14d
+ andl %eax,%r12d
+ vpaddd %xmm7,%xmm3,%xmm3
+ xorl %eax,%r13d
+ addl 48(%rsp),%edx
+ movl %r8d,%r15d
+ vpsrld $3,%xmm4,%xmm7
+ xorl %ecx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r9d,%r15d
+ vpslld $14,%xmm4,%xmm5
+ addl %r12d,%edx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %r8d,%r14d
+ addl %r13d,%edx
+ xorl %r9d,%edi
+ vpshufd $250,%xmm2,%xmm7
+ shrdl $2,%r14d,%r14d
+ addl %edx,%r11d
+ addl %edi,%edx
+ vpsrld $11,%xmm6,%xmm6
+ movl %r11d,%r13d
+ addl %edx,%r14d
+ shrdl $14,%r13d,%r13d
+ vpxor %xmm5,%xmm4,%xmm4
+ movl %r14d,%edx
+ movl %eax,%r12d
+ shrdl $9,%r14d,%r14d
+ vpslld $11,%xmm5,%xmm5
+ xorl %r11d,%r13d
+ xorl %ebx,%r12d
+ shrdl $5,%r13d,%r13d
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %edx,%r14d
+ andl %r11d,%r12d
+ xorl %r11d,%r13d
+ vpsrld $10,%xmm7,%xmm6
+ addl 52(%rsp),%ecx
+ movl %edx,%edi
+ xorl %ebx,%r12d
+ vpxor %xmm5,%xmm4,%xmm4
+ shrdl $11,%r14d,%r14d
+ xorl %r8d,%edi
+ addl %r12d,%ecx
+ vpsrlq $17,%xmm7,%xmm7
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %edx,%r14d
+ vpaddd %xmm4,%xmm3,%xmm3
+ addl %r13d,%ecx
+ xorl %r8d,%r15d
+ shrdl $2,%r14d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ addl %ecx,%r10d
+ addl %r15d,%ecx
+ movl %r10d,%r13d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %ecx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %r11d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r10d,%r13d
+ vpshufb %xmm8,%xmm6,%xmm6
+ xorl %eax,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ecx,%r14d
+ vpaddd %xmm6,%xmm3,%xmm3
+ andl %r10d,%r12d
+ xorl %r10d,%r13d
+ addl 56(%rsp),%ebx
+ vpshufd $80,%xmm3,%xmm7
+ movl %ecx,%r15d
+ xorl %eax,%r12d
+ shrdl $11,%r14d,%r14d
+ vpsrld $10,%xmm7,%xmm6
+ xorl %edx,%r15d
+ addl %r12d,%ebx
+ shrdl $6,%r13d,%r13d
+ vpsrlq $17,%xmm7,%xmm7
+ andl %r15d,%edi
+ xorl %ecx,%r14d
+ addl %r13d,%ebx
+ vpxor %xmm7,%xmm6,%xmm6
+ xorl %edx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %ebx,%r9d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %edi,%ebx
+ movl %r9d,%r13d
+ addl %ebx,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ebx
+ movl %r10d,%r12d
+ vpshufb %xmm9,%xmm6,%xmm6
+ shrdl $9,%r14d,%r14d
+ xorl %r9d,%r13d
+ xorl %r11d,%r12d
+ vpaddd %xmm6,%xmm3,%xmm3
+ shrdl $5,%r13d,%r13d
+ xorl %ebx,%r14d
+ andl %r9d,%r12d
+ vpaddd 96(%rbp),%xmm3,%xmm6
+ xorl %r9d,%r13d
+ addl 60(%rsp),%eax
+ movl %ebx,%edi
+ xorl %r11d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ecx,%edi
+ addl %r12d,%eax
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %ebx,%r14d
+ addl %r13d,%eax
+ xorl %ecx,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %eax,%r8d
+ addl %r15d,%eax
+ movl %r8d,%r13d
+ addl %eax,%r14d
+ vmovdqa %xmm6,48(%rsp)
+ cmpb $0,131(%rbp)
+ jne .Lavx_00_47
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%eax
+ movl %r9d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r8d,%r13d
+ xorl %r10d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %eax,%r14d
+ andl %r8d,%r12d
+ xorl %r8d,%r13d
+ addl 0(%rsp),%r11d
+ movl %eax,%r15d
+ xorl %r10d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ebx,%r15d
+ addl %r12d,%r11d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %eax,%r14d
+ addl %r13d,%r11d
+ xorl %ebx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r11d,%edx
+ addl %edi,%r11d
+ movl %edx,%r13d
+ addl %r11d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r11d
+ movl %r8d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %edx,%r13d
+ xorl %r9d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r11d,%r14d
+ andl %edx,%r12d
+ xorl %edx,%r13d
+ addl 4(%rsp),%r10d
+ movl %r11d,%edi
+ xorl %r9d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %eax,%edi
+ addl %r12d,%r10d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r11d,%r14d
+ addl %r13d,%r10d
+ xorl %eax,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r10d,%ecx
+ addl %r15d,%r10d
+ movl %ecx,%r13d
+ addl %r10d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r10d
+ movl %edx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ecx,%r13d
+ xorl %r8d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r10d,%r14d
+ andl %ecx,%r12d
+ xorl %ecx,%r13d
+ addl 8(%rsp),%r9d
+ movl %r10d,%r15d
+ xorl %r8d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r11d,%r15d
+ addl %r12d,%r9d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %r10d,%r14d
+ addl %r13d,%r9d
+ xorl %r11d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r9d,%ebx
+ addl %edi,%r9d
+ movl %ebx,%r13d
+ addl %r9d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r9d
+ movl %ecx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ebx,%r13d
+ xorl %edx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r9d,%r14d
+ andl %ebx,%r12d
+ xorl %ebx,%r13d
+ addl 12(%rsp),%r8d
+ movl %r9d,%edi
+ xorl %edx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r10d,%edi
+ addl %r12d,%r8d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r9d,%r14d
+ addl %r13d,%r8d
+ xorl %r10d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r8d,%eax
+ addl %r15d,%r8d
+ movl %eax,%r13d
+ addl %r8d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r8d
+ movl %ebx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %eax,%r13d
+ xorl %ecx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r8d,%r14d
+ andl %eax,%r12d
+ xorl %eax,%r13d
+ addl 16(%rsp),%edx
+ movl %r8d,%r15d
+ xorl %ecx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r9d,%r15d
+ addl %r12d,%edx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %r8d,%r14d
+ addl %r13d,%edx
+ xorl %r9d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %edx,%r11d
+ addl %edi,%edx
+ movl %r11d,%r13d
+ addl %edx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%edx
+ movl %eax,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r11d,%r13d
+ xorl %ebx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %edx,%r14d
+ andl %r11d,%r12d
+ xorl %r11d,%r13d
+ addl 20(%rsp),%ecx
+ movl %edx,%edi
+ xorl %ebx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r8d,%edi
+ addl %r12d,%ecx
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %edx,%r14d
+ addl %r13d,%ecx
+ xorl %r8d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %ecx,%r10d
+ addl %r15d,%ecx
+ movl %r10d,%r13d
+ addl %ecx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ecx
+ movl %r11d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r10d,%r13d
+ xorl %eax,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ecx,%r14d
+ andl %r10d,%r12d
+ xorl %r10d,%r13d
+ addl 24(%rsp),%ebx
+ movl %ecx,%r15d
+ xorl %eax,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %edx,%r15d
+ addl %r12d,%ebx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %ecx,%r14d
+ addl %r13d,%ebx
+ xorl %edx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %ebx,%r9d
+ addl %edi,%ebx
+ movl %r9d,%r13d
+ addl %ebx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ebx
+ movl %r10d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r9d,%r13d
+ xorl %r11d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ebx,%r14d
+ andl %r9d,%r12d
+ xorl %r9d,%r13d
+ addl 28(%rsp),%eax
+ movl %ebx,%edi
+ xorl %r11d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ecx,%edi
+ addl %r12d,%eax
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %ebx,%r14d
+ addl %r13d,%eax
+ xorl %ecx,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %eax,%r8d
+ addl %r15d,%eax
+ movl %r8d,%r13d
+ addl %eax,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%eax
+ movl %r9d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r8d,%r13d
+ xorl %r10d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %eax,%r14d
+ andl %r8d,%r12d
+ xorl %r8d,%r13d
+ addl 32(%rsp),%r11d
+ movl %eax,%r15d
+ xorl %r10d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ebx,%r15d
+ addl %r12d,%r11d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %eax,%r14d
+ addl %r13d,%r11d
+ xorl %ebx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r11d,%edx
+ addl %edi,%r11d
+ movl %edx,%r13d
+ addl %r11d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r11d
+ movl %r8d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %edx,%r13d
+ xorl %r9d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r11d,%r14d
+ andl %edx,%r12d
+ xorl %edx,%r13d
+ addl 36(%rsp),%r10d
+ movl %r11d,%edi
+ xorl %r9d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %eax,%edi
+ addl %r12d,%r10d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r11d,%r14d
+ addl %r13d,%r10d
+ xorl %eax,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r10d,%ecx
+ addl %r15d,%r10d
+ movl %ecx,%r13d
+ addl %r10d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r10d
+ movl %edx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ecx,%r13d
+ xorl %r8d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r10d,%r14d
+ andl %ecx,%r12d
+ xorl %ecx,%r13d
+ addl 40(%rsp),%r9d
+ movl %r10d,%r15d
+ xorl %r8d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r11d,%r15d
+ addl %r12d,%r9d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %r10d,%r14d
+ addl %r13d,%r9d
+ xorl %r11d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r9d,%ebx
+ addl %edi,%r9d
+ movl %ebx,%r13d
+ addl %r9d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r9d
+ movl %ecx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ebx,%r13d
+ xorl %edx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r9d,%r14d
+ andl %ebx,%r12d
+ xorl %ebx,%r13d
+ addl 44(%rsp),%r8d
+ movl %r9d,%edi
+ xorl %edx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r10d,%edi
+ addl %r12d,%r8d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r9d,%r14d
+ addl %r13d,%r8d
+ xorl %r10d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r8d,%eax
+ addl %r15d,%r8d
+ movl %eax,%r13d
+ addl %r8d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r8d
+ movl %ebx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %eax,%r13d
+ xorl %ecx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r8d,%r14d
+ andl %eax,%r12d
+ xorl %eax,%r13d
+ addl 48(%rsp),%edx
+ movl %r8d,%r15d
+ xorl %ecx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r9d,%r15d
+ addl %r12d,%edx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %r8d,%r14d
+ addl %r13d,%edx
+ xorl %r9d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %edx,%r11d
+ addl %edi,%edx
+ movl %r11d,%r13d
+ addl %edx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%edx
+ movl %eax,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r11d,%r13d
+ xorl %ebx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %edx,%r14d
+ andl %r11d,%r12d
+ xorl %r11d,%r13d
+ addl 52(%rsp),%ecx
+ movl %edx,%edi
+ xorl %ebx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r8d,%edi
+ addl %r12d,%ecx
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %edx,%r14d
+ addl %r13d,%ecx
+ xorl %r8d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %ecx,%r10d
+ addl %r15d,%ecx
+ movl %r10d,%r13d
+ addl %ecx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ecx
+ movl %r11d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r10d,%r13d
+ xorl %eax,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ecx,%r14d
+ andl %r10d,%r12d
+ xorl %r10d,%r13d
+ addl 56(%rsp),%ebx
+ movl %ecx,%r15d
+ xorl %eax,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %edx,%r15d
+ addl %r12d,%ebx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %ecx,%r14d
+ addl %r13d,%ebx
+ xorl %edx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %ebx,%r9d
+ addl %edi,%ebx
+ movl %r9d,%r13d
+ addl %ebx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ebx
+ movl %r10d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r9d,%r13d
+ xorl %r11d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ebx,%r14d
+ andl %r9d,%r12d
+ xorl %r9d,%r13d
+ addl 60(%rsp),%eax
+ movl %ebx,%edi
+ xorl %r11d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ecx,%edi
+ addl %r12d,%eax
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %ebx,%r14d
+ addl %r13d,%eax
+ xorl %ecx,%r15d
+ shrdl $2,%r14d,%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_avx
+
+ movq 64+24(%rsp),%rsi
+ vzeroupper
+ 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_avx:
+ .byte 0xf3,0xc3
+.size sha256_block_data_order_avx,.-sha256_block_data_order_avx
#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
index ca3a3a1..d65743f 100644
--- 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
@@ -8,6 +8,17 @@
.type sha512_block_data_order,@function
.align 16
sha512_block_data_order:
+ leaq OPENSSL_ia32cap_P(%rip),%r11
+ movl 0(%r11),%r9d
+ movl 4(%r11),%r10d
+ movl 8(%r11),%r11d
+ testl $2048,%r10d
+ jnz .Lxop_shortcut
+ andl $1073741824,%r9d
+ andl $268435968,%r10d
+ orl %r9d,%r10d
+ cmpl $1342177792,%r10d
+ je .Lavx_shortcut
pushq %rbx
pushq %rbp
pushq %r12
@@ -1784,4 +1795,2234 @@
.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
+.type sha512_block_data_order_xop,@function
+.align 64
+sha512_block_data_order_xop:
+.Lxop_shortcut:
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq %rsp,%r11
+ shlq $4,%rdx
+ subq $160,%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_xop:
+
+ vzeroupper
+ 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_xop
+.align 16
+.Lloop_xop:
+ vmovdqa K512+1280(%rip),%xmm11
+ vmovdqu 0(%rsi),%xmm0
+ leaq K512+128(%rip),%rbp
+ vmovdqu 16(%rsi),%xmm1
+ vmovdqu 32(%rsi),%xmm2
+ vpshufb %xmm11,%xmm0,%xmm0
+ vmovdqu 48(%rsi),%xmm3
+ vpshufb %xmm11,%xmm1,%xmm1
+ vmovdqu 64(%rsi),%xmm4
+ vpshufb %xmm11,%xmm2,%xmm2
+ vmovdqu 80(%rsi),%xmm5
+ vpshufb %xmm11,%xmm3,%xmm3
+ vmovdqu 96(%rsi),%xmm6
+ vpshufb %xmm11,%xmm4,%xmm4
+ vmovdqu 112(%rsi),%xmm7
+ vpshufb %xmm11,%xmm5,%xmm5
+ vpaddq -128(%rbp),%xmm0,%xmm8
+ vpshufb %xmm11,%xmm6,%xmm6
+ vpaddq -96(%rbp),%xmm1,%xmm9
+ vpshufb %xmm11,%xmm7,%xmm7
+ vpaddq -64(%rbp),%xmm2,%xmm10
+ vpaddq -32(%rbp),%xmm3,%xmm11
+ vmovdqa %xmm8,0(%rsp)
+ vpaddq 0(%rbp),%xmm4,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ vpaddq 32(%rbp),%xmm5,%xmm9
+ vmovdqa %xmm10,32(%rsp)
+ vpaddq 64(%rbp),%xmm6,%xmm10
+ vmovdqa %xmm11,48(%rsp)
+ vpaddq 96(%rbp),%xmm7,%xmm11
+ vmovdqa %xmm8,64(%rsp)
+ movq %rax,%r14
+ vmovdqa %xmm9,80(%rsp)
+ movq %rbx,%rdi
+ vmovdqa %xmm10,96(%rsp)
+ xorq %rcx,%rdi
+ vmovdqa %xmm11,112(%rsp)
+ movq %r8,%r13
+ jmp .Lxop_00_47
+
+.align 16
+.Lxop_00_47:
+ addq $256,%rbp
+ vpalignr $8,%xmm0,%xmm1,%xmm8
+ rorq $23,%r13
+ movq %r14,%rax
+ vpalignr $8,%xmm4,%xmm5,%xmm11
+ movq %r9,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %r8,%r13
+ xorq %r10,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %rax,%r14
+ vpaddq %xmm11,%xmm0,%xmm0
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 0(%rsp),%r11
+ movq %rax,%r15
+.byte 143,72,120,195,209,7
+ xorq %r10,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %rbx,%r15
+ addq %r12,%r11
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,223,3
+ xorq %rax,%r14
+ addq %r13,%r11
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rbx,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm7,%xmm10
+ addq %r11,%rdx
+ addq %rdi,%r11
+ vpaddq %xmm8,%xmm0,%xmm0
+ movq %rdx,%r13
+ addq %r11,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%r11
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %r8,%r12
+ rorq $5,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ vpaddq %xmm11,%xmm0,%xmm0
+ addq 8(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ rorq $6,%r14
+ vpaddq -128(%rbp),%xmm0,%xmm10
+ xorq %rax,%rdi
+ addq %r12,%r10
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ rorq $28,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ vmovdqa %xmm10,0(%rsp)
+ vpalignr $8,%xmm1,%xmm2,%xmm8
+ rorq $23,%r13
+ movq %r14,%r10
+ vpalignr $8,%xmm5,%xmm6,%xmm11
+ movq %rdx,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %r10,%r14
+ vpaddq %xmm11,%xmm1,%xmm1
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 16(%rsp),%r9
+ movq %r10,%r15
+.byte 143,72,120,195,209,7
+ xorq %r8,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %r11,%r15
+ addq %r12,%r9
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,216,3
+ xorq %r10,%r14
+ addq %r13,%r9
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r11,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm0,%xmm10
+ addq %r9,%rbx
+ addq %rdi,%r9
+ vpaddq %xmm8,%xmm1,%xmm1
+ movq %rbx,%r13
+ addq %r9,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%r9
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %rcx,%r12
+ rorq $5,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ vpaddq %xmm11,%xmm1,%xmm1
+ addq 24(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ rorq $6,%r14
+ vpaddq -96(%rbp),%xmm1,%xmm10
+ xorq %r10,%rdi
+ addq %r12,%r8
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ rorq $28,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ vmovdqa %xmm10,16(%rsp)
+ vpalignr $8,%xmm2,%xmm3,%xmm8
+ rorq $23,%r13
+ movq %r14,%r8
+ vpalignr $8,%xmm6,%xmm7,%xmm11
+ movq %rbx,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %r8,%r14
+ vpaddq %xmm11,%xmm2,%xmm2
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 32(%rsp),%rdx
+ movq %r8,%r15
+.byte 143,72,120,195,209,7
+ xorq %rcx,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %r9,%r15
+ addq %r12,%rdx
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,217,3
+ xorq %r8,%r14
+ addq %r13,%rdx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r9,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm1,%xmm10
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ vpaddq %xmm8,%xmm2,%xmm2
+ movq %r11,%r13
+ addq %rdx,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%rdx
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %rax,%r12
+ rorq $5,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ vpaddq %xmm11,%xmm2,%xmm2
+ addq 40(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ rorq $6,%r14
+ vpaddq -64(%rbp),%xmm2,%xmm10
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ rorq $28,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ vmovdqa %xmm10,32(%rsp)
+ vpalignr $8,%xmm3,%xmm4,%xmm8
+ rorq $23,%r13
+ movq %r14,%rcx
+ vpalignr $8,%xmm7,%xmm0,%xmm11
+ movq %r11,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %r10,%r13
+ xorq %rax,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %rcx,%r14
+ vpaddq %xmm11,%xmm3,%xmm3
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 48(%rsp),%rbx
+ movq %rcx,%r15
+.byte 143,72,120,195,209,7
+ xorq %rax,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,218,3
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rdx,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm2,%xmm10
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ vpaddq %xmm8,%xmm3,%xmm3
+ movq %r9,%r13
+ addq %rbx,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%rbx
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %r10,%r12
+ rorq $5,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ vpaddq %xmm11,%xmm3,%xmm3
+ addq 56(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ rorq $6,%r14
+ vpaddq -32(%rbp),%xmm3,%xmm10
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ rorq $28,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ vmovdqa %xmm10,48(%rsp)
+ vpalignr $8,%xmm4,%xmm5,%xmm8
+ rorq $23,%r13
+ movq %r14,%rax
+ vpalignr $8,%xmm0,%xmm1,%xmm11
+ movq %r9,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %r8,%r13
+ xorq %r10,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %rax,%r14
+ vpaddq %xmm11,%xmm4,%xmm4
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 64(%rsp),%r11
+ movq %rax,%r15
+.byte 143,72,120,195,209,7
+ xorq %r10,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %rbx,%r15
+ addq %r12,%r11
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,219,3
+ xorq %rax,%r14
+ addq %r13,%r11
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rbx,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm3,%xmm10
+ addq %r11,%rdx
+ addq %rdi,%r11
+ vpaddq %xmm8,%xmm4,%xmm4
+ movq %rdx,%r13
+ addq %r11,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%r11
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %r8,%r12
+ rorq $5,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ vpaddq %xmm11,%xmm4,%xmm4
+ addq 72(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ rorq $6,%r14
+ vpaddq 0(%rbp),%xmm4,%xmm10
+ xorq %rax,%rdi
+ addq %r12,%r10
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ rorq $28,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ vmovdqa %xmm10,64(%rsp)
+ vpalignr $8,%xmm5,%xmm6,%xmm8
+ rorq $23,%r13
+ movq %r14,%r10
+ vpalignr $8,%xmm1,%xmm2,%xmm11
+ movq %rdx,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %r10,%r14
+ vpaddq %xmm11,%xmm5,%xmm5
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 80(%rsp),%r9
+ movq %r10,%r15
+.byte 143,72,120,195,209,7
+ xorq %r8,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %r11,%r15
+ addq %r12,%r9
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,220,3
+ xorq %r10,%r14
+ addq %r13,%r9
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r11,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm4,%xmm10
+ addq %r9,%rbx
+ addq %rdi,%r9
+ vpaddq %xmm8,%xmm5,%xmm5
+ movq %rbx,%r13
+ addq %r9,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%r9
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %rcx,%r12
+ rorq $5,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ vpaddq %xmm11,%xmm5,%xmm5
+ addq 88(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ rorq $6,%r14
+ vpaddq 32(%rbp),%xmm5,%xmm10
+ xorq %r10,%rdi
+ addq %r12,%r8
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ rorq $28,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ vmovdqa %xmm10,80(%rsp)
+ vpalignr $8,%xmm6,%xmm7,%xmm8
+ rorq $23,%r13
+ movq %r14,%r8
+ vpalignr $8,%xmm2,%xmm3,%xmm11
+ movq %rbx,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %r8,%r14
+ vpaddq %xmm11,%xmm6,%xmm6
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 96(%rsp),%rdx
+ movq %r8,%r15
+.byte 143,72,120,195,209,7
+ xorq %rcx,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %r9,%r15
+ addq %r12,%rdx
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,221,3
+ xorq %r8,%r14
+ addq %r13,%rdx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r9,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm5,%xmm10
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ vpaddq %xmm8,%xmm6,%xmm6
+ movq %r11,%r13
+ addq %rdx,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%rdx
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %rax,%r12
+ rorq $5,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ vpaddq %xmm11,%xmm6,%xmm6
+ addq 104(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ rorq $6,%r14
+ vpaddq 64(%rbp),%xmm6,%xmm10
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ rorq $28,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ vmovdqa %xmm10,96(%rsp)
+ vpalignr $8,%xmm7,%xmm0,%xmm8
+ rorq $23,%r13
+ movq %r14,%rcx
+ vpalignr $8,%xmm3,%xmm4,%xmm11
+ movq %r11,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %r10,%r13
+ xorq %rax,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %rcx,%r14
+ vpaddq %xmm11,%xmm7,%xmm7
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 112(%rsp),%rbx
+ movq %rcx,%r15
+.byte 143,72,120,195,209,7
+ xorq %rax,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,222,3
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rdx,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm6,%xmm10
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ vpaddq %xmm8,%xmm7,%xmm7
+ movq %r9,%r13
+ addq %rbx,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%rbx
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %r10,%r12
+ rorq $5,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ vpaddq %xmm11,%xmm7,%xmm7
+ addq 120(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ rorq $6,%r14
+ vpaddq 96(%rbp),%xmm7,%xmm10
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ rorq $28,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ vmovdqa %xmm10,112(%rsp)
+ cmpb $0,135(%rbp)
+ jne .Lxop_00_47
+ rorq $23,%r13
+ movq %r14,%rax
+ movq %r9,%r12
+ rorq $5,%r14
+ xorq %r8,%r13
+ xorq %r10,%r12
+ rorq $4,%r13
+ xorq %rax,%r14
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 0(%rsp),%r11
+ movq %rax,%r15
+ xorq %r10,%r12
+ rorq $6,%r14
+ xorq %rbx,%r15
+ addq %r12,%r11
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %rax,%r14
+ addq %r13,%r11
+ xorq %rbx,%rdi
+ rorq $28,%r14
+ addq %r11,%rdx
+ addq %rdi,%r11
+ movq %rdx,%r13
+ addq %r11,%r14
+ rorq $23,%r13
+ movq %r14,%r11
+ movq %r8,%r12
+ rorq $5,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ rorq $4,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ addq 8(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ rorq $6,%r14
+ xorq %rax,%rdi
+ addq %r12,%r10
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ rorq $28,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ rorq $23,%r13
+ movq %r14,%r10
+ movq %rdx,%r12
+ rorq $5,%r14
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ rorq $4,%r13
+ xorq %r10,%r14
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 16(%rsp),%r9
+ movq %r10,%r15
+ xorq %r8,%r12
+ rorq $6,%r14
+ xorq %r11,%r15
+ addq %r12,%r9
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %r10,%r14
+ addq %r13,%r9
+ xorq %r11,%rdi
+ rorq $28,%r14
+ addq %r9,%rbx
+ addq %rdi,%r9
+ movq %rbx,%r13
+ addq %r9,%r14
+ rorq $23,%r13
+ movq %r14,%r9
+ movq %rcx,%r12
+ rorq $5,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ rorq $4,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ addq 24(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ rorq $6,%r14
+ xorq %r10,%rdi
+ addq %r12,%r8
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ rorq $28,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ rorq $23,%r13
+ movq %r14,%r8
+ movq %rbx,%r12
+ rorq $5,%r14
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ rorq $4,%r13
+ xorq %r8,%r14
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 32(%rsp),%rdx
+ movq %r8,%r15
+ xorq %rcx,%r12
+ rorq $6,%r14
+ xorq %r9,%r15
+ addq %r12,%rdx
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %r8,%r14
+ addq %r13,%rdx
+ xorq %r9,%rdi
+ rorq $28,%r14
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ movq %r11,%r13
+ addq %rdx,%r14
+ rorq $23,%r13
+ movq %r14,%rdx
+ movq %rax,%r12
+ rorq $5,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ rorq $4,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ addq 40(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ rorq $6,%r14
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ rorq $28,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ rorq $23,%r13
+ movq %r14,%rcx
+ movq %r11,%r12
+ rorq $5,%r14
+ xorq %r10,%r13
+ xorq %rax,%r12
+ rorq $4,%r13
+ xorq %rcx,%r14
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 48(%rsp),%rbx
+ movq %rcx,%r15
+ xorq %rax,%r12
+ rorq $6,%r14
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ xorq %rdx,%rdi
+ rorq $28,%r14
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ movq %r9,%r13
+ addq %rbx,%r14
+ rorq $23,%r13
+ movq %r14,%rbx
+ movq %r10,%r12
+ rorq $5,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ rorq $4,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ addq 56(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ rorq $6,%r14
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ rorq $28,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ rorq $23,%r13
+ movq %r14,%rax
+ movq %r9,%r12
+ rorq $5,%r14
+ xorq %r8,%r13
+ xorq %r10,%r12
+ rorq $4,%r13
+ xorq %rax,%r14
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 64(%rsp),%r11
+ movq %rax,%r15
+ xorq %r10,%r12
+ rorq $6,%r14
+ xorq %rbx,%r15
+ addq %r12,%r11
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %rax,%r14
+ addq %r13,%r11
+ xorq %rbx,%rdi
+ rorq $28,%r14
+ addq %r11,%rdx
+ addq %rdi,%r11
+ movq %rdx,%r13
+ addq %r11,%r14
+ rorq $23,%r13
+ movq %r14,%r11
+ movq %r8,%r12
+ rorq $5,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ rorq $4,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ addq 72(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ rorq $6,%r14
+ xorq %rax,%rdi
+ addq %r12,%r10
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ rorq $28,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ rorq $23,%r13
+ movq %r14,%r10
+ movq %rdx,%r12
+ rorq $5,%r14
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ rorq $4,%r13
+ xorq %r10,%r14
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 80(%rsp),%r9
+ movq %r10,%r15
+ xorq %r8,%r12
+ rorq $6,%r14
+ xorq %r11,%r15
+ addq %r12,%r9
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %r10,%r14
+ addq %r13,%r9
+ xorq %r11,%rdi
+ rorq $28,%r14
+ addq %r9,%rbx
+ addq %rdi,%r9
+ movq %rbx,%r13
+ addq %r9,%r14
+ rorq $23,%r13
+ movq %r14,%r9
+ movq %rcx,%r12
+ rorq $5,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ rorq $4,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ addq 88(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ rorq $6,%r14
+ xorq %r10,%rdi
+ addq %r12,%r8
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ rorq $28,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ rorq $23,%r13
+ movq %r14,%r8
+ movq %rbx,%r12
+ rorq $5,%r14
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ rorq $4,%r13
+ xorq %r8,%r14
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 96(%rsp),%rdx
+ movq %r8,%r15
+ xorq %rcx,%r12
+ rorq $6,%r14
+ xorq %r9,%r15
+ addq %r12,%rdx
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %r8,%r14
+ addq %r13,%rdx
+ xorq %r9,%rdi
+ rorq $28,%r14
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ movq %r11,%r13
+ addq %rdx,%r14
+ rorq $23,%r13
+ movq %r14,%rdx
+ movq %rax,%r12
+ rorq $5,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ rorq $4,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ addq 104(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ rorq $6,%r14
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ rorq $28,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ rorq $23,%r13
+ movq %r14,%rcx
+ movq %r11,%r12
+ rorq $5,%r14
+ xorq %r10,%r13
+ xorq %rax,%r12
+ rorq $4,%r13
+ xorq %rcx,%r14
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 112(%rsp),%rbx
+ movq %rcx,%r15
+ xorq %rax,%r12
+ rorq $6,%r14
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ xorq %rdx,%rdi
+ rorq $28,%r14
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ movq %r9,%r13
+ addq %rbx,%r14
+ rorq $23,%r13
+ movq %r14,%rbx
+ movq %r10,%r12
+ rorq $5,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ rorq $4,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ addq 120(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ rorq $6,%r14
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ rorq $28,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ movq 128+0(%rsp),%rdi
+ movq %r14,%rax
+
+ addq 0(%rdi),%rax
+ leaq 128(%rsi),%rsi
+ 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_xop
+
+ movq 128+24(%rsp),%rsi
+ vzeroupper
+ 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_xop:
+ .byte 0xf3,0xc3
+.size sha512_block_data_order_xop,.-sha512_block_data_order_xop
+.type sha512_block_data_order_avx,@function
+.align 64
+sha512_block_data_order_avx:
+.Lavx_shortcut:
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq %rsp,%r11
+ shlq $4,%rdx
+ subq $160,%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_avx:
+
+ vzeroupper
+ 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_avx
+.align 16
+.Lloop_avx:
+ vmovdqa K512+1280(%rip),%xmm11
+ vmovdqu 0(%rsi),%xmm0
+ leaq K512+128(%rip),%rbp
+ vmovdqu 16(%rsi),%xmm1
+ vmovdqu 32(%rsi),%xmm2
+ vpshufb %xmm11,%xmm0,%xmm0
+ vmovdqu 48(%rsi),%xmm3
+ vpshufb %xmm11,%xmm1,%xmm1
+ vmovdqu 64(%rsi),%xmm4
+ vpshufb %xmm11,%xmm2,%xmm2
+ vmovdqu 80(%rsi),%xmm5
+ vpshufb %xmm11,%xmm3,%xmm3
+ vmovdqu 96(%rsi),%xmm6
+ vpshufb %xmm11,%xmm4,%xmm4
+ vmovdqu 112(%rsi),%xmm7
+ vpshufb %xmm11,%xmm5,%xmm5
+ vpaddq -128(%rbp),%xmm0,%xmm8
+ vpshufb %xmm11,%xmm6,%xmm6
+ vpaddq -96(%rbp),%xmm1,%xmm9
+ vpshufb %xmm11,%xmm7,%xmm7
+ vpaddq -64(%rbp),%xmm2,%xmm10
+ vpaddq -32(%rbp),%xmm3,%xmm11
+ vmovdqa %xmm8,0(%rsp)
+ vpaddq 0(%rbp),%xmm4,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ vpaddq 32(%rbp),%xmm5,%xmm9
+ vmovdqa %xmm10,32(%rsp)
+ vpaddq 64(%rbp),%xmm6,%xmm10
+ vmovdqa %xmm11,48(%rsp)
+ vpaddq 96(%rbp),%xmm7,%xmm11
+ vmovdqa %xmm8,64(%rsp)
+ movq %rax,%r14
+ vmovdqa %xmm9,80(%rsp)
+ movq %rbx,%rdi
+ vmovdqa %xmm10,96(%rsp)
+ xorq %rcx,%rdi
+ vmovdqa %xmm11,112(%rsp)
+ movq %r8,%r13
+ jmp .Lavx_00_47
+
+.align 16
+.Lavx_00_47:
+ addq $256,%rbp
+ vpalignr $8,%xmm0,%xmm1,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%rax
+ vpalignr $8,%xmm4,%xmm5,%xmm11
+ movq %r9,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %r8,%r13
+ xorq %r10,%r12
+ vpaddq %xmm11,%xmm0,%xmm0
+ shrdq $4,%r13,%r13
+ xorq %rax,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %r8,%r12
+ xorq %r8,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 0(%rsp),%r11
+ movq %rax,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %r10,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %rbx,%r15
+ addq %r12,%r11
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %rax,%r14
+ addq %r13,%r11
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rbx,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm7,%xmm11
+ addq %r11,%rdx
+ addq %rdi,%r11
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %rdx,%r13
+ addq %r11,%r14
+ vpsllq $3,%xmm7,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%r11
+ vpaddq %xmm8,%xmm0,%xmm0
+ movq %r8,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm7,%xmm9
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %r11,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 8(%rsp),%r10
+ movq %r11,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %r9,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %rax,%rdi
+ addq %r12,%r10
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm0,%xmm0
+ xorq %r11,%r14
+ addq %r13,%r10
+ vpaddq -128(%rbp),%xmm0,%xmm10
+ xorq %rax,%r15
+ shrdq $28,%r14,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ vmovdqa %xmm10,0(%rsp)
+ vpalignr $8,%xmm1,%xmm2,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%r10
+ vpalignr $8,%xmm5,%xmm6,%xmm11
+ movq %rdx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ vpaddq %xmm11,%xmm1,%xmm1
+ shrdq $4,%r13,%r13
+ xorq %r10,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 16(%rsp),%r9
+ movq %r10,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %r8,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %r11,%r15
+ addq %r12,%r9
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %r10,%r14
+ addq %r13,%r9
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r11,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm0,%xmm11
+ addq %r9,%rbx
+ addq %rdi,%r9
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %rbx,%r13
+ addq %r9,%r14
+ vpsllq $3,%xmm0,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%r9
+ vpaddq %xmm8,%xmm1,%xmm1
+ movq %rcx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm0,%xmm9
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %r9,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 24(%rsp),%r8
+ movq %r9,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %rdx,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %r10,%rdi
+ addq %r12,%r8
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm1,%xmm1
+ xorq %r9,%r14
+ addq %r13,%r8
+ vpaddq -96(%rbp),%xmm1,%xmm10
+ xorq %r10,%r15
+ shrdq $28,%r14,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ vmovdqa %xmm10,16(%rsp)
+ vpalignr $8,%xmm2,%xmm3,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%r8
+ vpalignr $8,%xmm6,%xmm7,%xmm11
+ movq %rbx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ vpaddq %xmm11,%xmm2,%xmm2
+ shrdq $4,%r13,%r13
+ xorq %r8,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %rax,%r12
+ xorq %rax,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 32(%rsp),%rdx
+ movq %r8,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %rcx,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %r9,%r15
+ addq %r12,%rdx
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %r8,%r14
+ addq %r13,%rdx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r9,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm1,%xmm11
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %r11,%r13
+ addq %rdx,%r14
+ vpsllq $3,%xmm1,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%rdx
+ vpaddq %xmm8,%xmm2,%xmm2
+ movq %rax,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm1,%xmm9
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %rdx,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %r11,%r12
+ xorq %r11,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 40(%rsp),%rcx
+ movq %rdx,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %rbx,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm2,%xmm2
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ vpaddq -64(%rbp),%xmm2,%xmm10
+ xorq %r8,%r15
+ shrdq $28,%r14,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ vmovdqa %xmm10,32(%rsp)
+ vpalignr $8,%xmm3,%xmm4,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%rcx
+ vpalignr $8,%xmm7,%xmm0,%xmm11
+ movq %r11,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %r10,%r13
+ xorq %rax,%r12
+ vpaddq %xmm11,%xmm3,%xmm3
+ shrdq $4,%r13,%r13
+ xorq %rcx,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %r10,%r12
+ xorq %r10,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 48(%rsp),%rbx
+ movq %rcx,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %rax,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rdx,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm2,%xmm11
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %r9,%r13
+ addq %rbx,%r14
+ vpsllq $3,%xmm2,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%rbx
+ vpaddq %xmm8,%xmm3,%xmm3
+ movq %r10,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm2,%xmm9
+ xorq %r9,%r13
+ xorq %r11,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %rbx,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %r9,%r12
+ xorq %r9,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 56(%rsp),%rax
+ movq %rbx,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %r11,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm3,%xmm3
+ xorq %rbx,%r14
+ addq %r13,%rax
+ vpaddq -32(%rbp),%xmm3,%xmm10
+ xorq %rcx,%r15
+ shrdq $28,%r14,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ vmovdqa %xmm10,48(%rsp)
+ vpalignr $8,%xmm4,%xmm5,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%rax
+ vpalignr $8,%xmm0,%xmm1,%xmm11
+ movq %r9,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %r8,%r13
+ xorq %r10,%r12
+ vpaddq %xmm11,%xmm4,%xmm4
+ shrdq $4,%r13,%r13
+ xorq %rax,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %r8,%r12
+ xorq %r8,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 64(%rsp),%r11
+ movq %rax,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %r10,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %rbx,%r15
+ addq %r12,%r11
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %rax,%r14
+ addq %r13,%r11
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rbx,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm3,%xmm11
+ addq %r11,%rdx
+ addq %rdi,%r11
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %rdx,%r13
+ addq %r11,%r14
+ vpsllq $3,%xmm3,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%r11
+ vpaddq %xmm8,%xmm4,%xmm4
+ movq %r8,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm3,%xmm9
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %r11,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 72(%rsp),%r10
+ movq %r11,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %r9,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %rax,%rdi
+ addq %r12,%r10
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm4,%xmm4
+ xorq %r11,%r14
+ addq %r13,%r10
+ vpaddq 0(%rbp),%xmm4,%xmm10
+ xorq %rax,%r15
+ shrdq $28,%r14,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ vmovdqa %xmm10,64(%rsp)
+ vpalignr $8,%xmm5,%xmm6,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%r10
+ vpalignr $8,%xmm1,%xmm2,%xmm11
+ movq %rdx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ vpaddq %xmm11,%xmm5,%xmm5
+ shrdq $4,%r13,%r13
+ xorq %r10,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 80(%rsp),%r9
+ movq %r10,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %r8,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %r11,%r15
+ addq %r12,%r9
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %r10,%r14
+ addq %r13,%r9
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r11,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm4,%xmm11
+ addq %r9,%rbx
+ addq %rdi,%r9
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %rbx,%r13
+ addq %r9,%r14
+ vpsllq $3,%xmm4,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%r9
+ vpaddq %xmm8,%xmm5,%xmm5
+ movq %rcx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm4,%xmm9
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %r9,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 88(%rsp),%r8
+ movq %r9,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %rdx,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %r10,%rdi
+ addq %r12,%r8
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm5,%xmm5
+ xorq %r9,%r14
+ addq %r13,%r8
+ vpaddq 32(%rbp),%xmm5,%xmm10
+ xorq %r10,%r15
+ shrdq $28,%r14,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ vmovdqa %xmm10,80(%rsp)
+ vpalignr $8,%xmm6,%xmm7,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%r8
+ vpalignr $8,%xmm2,%xmm3,%xmm11
+ movq %rbx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ vpaddq %xmm11,%xmm6,%xmm6
+ shrdq $4,%r13,%r13
+ xorq %r8,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %rax,%r12
+ xorq %rax,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 96(%rsp),%rdx
+ movq %r8,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %rcx,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %r9,%r15
+ addq %r12,%rdx
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %r8,%r14
+ addq %r13,%rdx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r9,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm5,%xmm11
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %r11,%r13
+ addq %rdx,%r14
+ vpsllq $3,%xmm5,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%rdx
+ vpaddq %xmm8,%xmm6,%xmm6
+ movq %rax,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm5,%xmm9
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %rdx,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %r11,%r12
+ xorq %r11,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 104(%rsp),%rcx
+ movq %rdx,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %rbx,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm6,%xmm6
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ vpaddq 64(%rbp),%xmm6,%xmm10
+ xorq %r8,%r15
+ shrdq $28,%r14,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ vmovdqa %xmm10,96(%rsp)
+ vpalignr $8,%xmm7,%xmm0,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%rcx
+ vpalignr $8,%xmm3,%xmm4,%xmm11
+ movq %r11,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %r10,%r13
+ xorq %rax,%r12
+ vpaddq %xmm11,%xmm7,%xmm7
+ shrdq $4,%r13,%r13
+ xorq %rcx,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %r10,%r12
+ xorq %r10,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 112(%rsp),%rbx
+ movq %rcx,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %rax,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rdx,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm6,%xmm11
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %r9,%r13
+ addq %rbx,%r14
+ vpsllq $3,%xmm6,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%rbx
+ vpaddq %xmm8,%xmm7,%xmm7
+ movq %r10,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm6,%xmm9
+ xorq %r9,%r13
+ xorq %r11,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %rbx,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %r9,%r12
+ xorq %r9,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 120(%rsp),%rax
+ movq %rbx,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %r11,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm7,%xmm7
+ xorq %rbx,%r14
+ addq %r13,%rax
+ vpaddq 96(%rbp),%xmm7,%xmm10
+ xorq %rcx,%r15
+ shrdq $28,%r14,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ vmovdqa %xmm10,112(%rsp)
+ cmpb $0,135(%rbp)
+ jne .Lavx_00_47
+ shrdq $23,%r13,%r13
+ movq %r14,%rax
+ movq %r9,%r12
+ shrdq $5,%r14,%r14
+ xorq %r8,%r13
+ xorq %r10,%r12
+ shrdq $4,%r13,%r13
+ xorq %rax,%r14
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 0(%rsp),%r11
+ movq %rax,%r15
+ xorq %r10,%r12
+ shrdq $6,%r14,%r14
+ xorq %rbx,%r15
+ addq %r12,%r11
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %rax,%r14
+ addq %r13,%r11
+ xorq %rbx,%rdi
+ shrdq $28,%r14,%r14
+ addq %r11,%rdx
+ addq %rdi,%r11
+ movq %rdx,%r13
+ addq %r11,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r11
+ movq %r8,%r12
+ shrdq $5,%r14,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ shrdq $4,%r13,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ addq 8(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ shrdq $6,%r14,%r14
+ xorq %rax,%rdi
+ addq %r12,%r10
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ shrdq $28,%r14,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r10
+ movq %rdx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ shrdq $4,%r13,%r13
+ xorq %r10,%r14
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 16(%rsp),%r9
+ movq %r10,%r15
+ xorq %r8,%r12
+ shrdq $6,%r14,%r14
+ xorq %r11,%r15
+ addq %r12,%r9
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %r10,%r14
+ addq %r13,%r9
+ xorq %r11,%rdi
+ shrdq $28,%r14,%r14
+ addq %r9,%rbx
+ addq %rdi,%r9
+ movq %rbx,%r13
+ addq %r9,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r9
+ movq %rcx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ shrdq $4,%r13,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ addq 24(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r10,%rdi
+ addq %r12,%r8
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ shrdq $28,%r14,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r8
+ movq %rbx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ shrdq $4,%r13,%r13
+ xorq %r8,%r14
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 32(%rsp),%rdx
+ movq %r8,%r15
+ xorq %rcx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r9,%r15
+ addq %r12,%rdx
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %r8,%r14
+ addq %r13,%rdx
+ xorq %r9,%rdi
+ shrdq $28,%r14,%r14
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ movq %r11,%r13
+ addq %rdx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rdx
+ movq %rax,%r12
+ shrdq $5,%r14,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ shrdq $4,%r13,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ addq 40(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ shrdq $28,%r14,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rcx
+ movq %r11,%r12
+ shrdq $5,%r14,%r14
+ xorq %r10,%r13
+ xorq %rax,%r12
+ shrdq $4,%r13,%r13
+ xorq %rcx,%r14
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 48(%rsp),%rbx
+ movq %rcx,%r15
+ xorq %rax,%r12
+ shrdq $6,%r14,%r14
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ xorq %rdx,%rdi
+ shrdq $28,%r14,%r14
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ movq %r9,%r13
+ addq %rbx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rbx
+ movq %r10,%r12
+ shrdq $5,%r14,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ shrdq $4,%r13,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ addq 56(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ shrdq $6,%r14,%r14
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ shrdq $28,%r14,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rax
+ movq %r9,%r12
+ shrdq $5,%r14,%r14
+ xorq %r8,%r13
+ xorq %r10,%r12
+ shrdq $4,%r13,%r13
+ xorq %rax,%r14
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 64(%rsp),%r11
+ movq %rax,%r15
+ xorq %r10,%r12
+ shrdq $6,%r14,%r14
+ xorq %rbx,%r15
+ addq %r12,%r11
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %rax,%r14
+ addq %r13,%r11
+ xorq %rbx,%rdi
+ shrdq $28,%r14,%r14
+ addq %r11,%rdx
+ addq %rdi,%r11
+ movq %rdx,%r13
+ addq %r11,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r11
+ movq %r8,%r12
+ shrdq $5,%r14,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ shrdq $4,%r13,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ addq 72(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ shrdq $6,%r14,%r14
+ xorq %rax,%rdi
+ addq %r12,%r10
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ shrdq $28,%r14,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r10
+ movq %rdx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ shrdq $4,%r13,%r13
+ xorq %r10,%r14
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 80(%rsp),%r9
+ movq %r10,%r15
+ xorq %r8,%r12
+ shrdq $6,%r14,%r14
+ xorq %r11,%r15
+ addq %r12,%r9
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %r10,%r14
+ addq %r13,%r9
+ xorq %r11,%rdi
+ shrdq $28,%r14,%r14
+ addq %r9,%rbx
+ addq %rdi,%r9
+ movq %rbx,%r13
+ addq %r9,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r9
+ movq %rcx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ shrdq $4,%r13,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ addq 88(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r10,%rdi
+ addq %r12,%r8
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ shrdq $28,%r14,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r8
+ movq %rbx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ shrdq $4,%r13,%r13
+ xorq %r8,%r14
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 96(%rsp),%rdx
+ movq %r8,%r15
+ xorq %rcx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r9,%r15
+ addq %r12,%rdx
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %r8,%r14
+ addq %r13,%rdx
+ xorq %r9,%rdi
+ shrdq $28,%r14,%r14
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ movq %r11,%r13
+ addq %rdx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rdx
+ movq %rax,%r12
+ shrdq $5,%r14,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ shrdq $4,%r13,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ addq 104(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ shrdq $28,%r14,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rcx
+ movq %r11,%r12
+ shrdq $5,%r14,%r14
+ xorq %r10,%r13
+ xorq %rax,%r12
+ shrdq $4,%r13,%r13
+ xorq %rcx,%r14
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 112(%rsp),%rbx
+ movq %rcx,%r15
+ xorq %rax,%r12
+ shrdq $6,%r14,%r14
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ xorq %rdx,%rdi
+ shrdq $28,%r14,%r14
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ movq %r9,%r13
+ addq %rbx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rbx
+ movq %r10,%r12
+ shrdq $5,%r14,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ shrdq $4,%r13,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ addq 120(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ shrdq $6,%r14,%r14
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ shrdq $28,%r14,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ movq 128+0(%rsp),%rdi
+ movq %r14,%rax
+
+ addq 0(%rdi),%rax
+ leaq 128(%rsi),%rsi
+ 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_avx
+
+ movq 128+24(%rsp),%rsi
+ vzeroupper
+ 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_avx:
+ .byte 0xf3,0xc3
+.size sha512_block_data_order_avx,.-sha512_block_data_order_avx
#endif
diff --git a/third_party/boringssl/mac-x86/crypto/chacha/chacha-x86.S b/third_party/boringssl/mac-x86/crypto/chacha/chacha-x86.S
new file mode 100644
index 0000000..5de98a3
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/chacha/chacha-x86.S
@@ -0,0 +1,969 @@
+#if defined(__i386__)
+.file "chacha-x86.S"
+.text
+.globl _ChaCha20_ctr32
+.private_extern _ChaCha20_ctr32
+.align 4
+_ChaCha20_ctr32:
+L_ChaCha20_ctr32_begin:
+ pushl %ebp
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+ xorl %eax,%eax
+ cmpl 28(%esp),%eax
+ je L000no_data
+ call Lpic_point
+Lpic_point:
+ popl %eax
+ movl L_OPENSSL_ia32cap_P$non_lazy_ptr-Lpic_point(%eax),%ebp
+ testl $16777216,(%ebp)
+ jz L001x86
+ testl $512,4(%ebp)
+ jz L001x86
+ jmp Lssse3_shortcut
+L001x86:
+ movl 32(%esp),%esi
+ movl 36(%esp),%edi
+ subl $132,%esp
+ movl (%esi),%eax
+ movl 4(%esi),%ebx
+ movl 8(%esi),%ecx
+ movl 12(%esi),%edx
+ movl %eax,80(%esp)
+ movl %ebx,84(%esp)
+ movl %ecx,88(%esp)
+ movl %edx,92(%esp)
+ movl 16(%esi),%eax
+ movl 20(%esi),%ebx
+ movl 24(%esi),%ecx
+ movl 28(%esi),%edx
+ movl %eax,96(%esp)
+ movl %ebx,100(%esp)
+ movl %ecx,104(%esp)
+ movl %edx,108(%esp)
+ movl (%edi),%eax
+ movl 4(%edi),%ebx
+ movl 8(%edi),%ecx
+ movl 12(%edi),%edx
+ subl $1,%eax
+ movl %eax,112(%esp)
+ movl %ebx,116(%esp)
+ movl %ecx,120(%esp)
+ movl %edx,124(%esp)
+ jmp L002entry
+.align 4,0x90
+L003outer_loop:
+ movl %ebx,156(%esp)
+ movl %eax,152(%esp)
+ movl %ecx,160(%esp)
+L002entry:
+ movl $1634760805,%eax
+ movl $857760878,4(%esp)
+ movl $2036477234,8(%esp)
+ movl $1797285236,12(%esp)
+ movl 84(%esp),%ebx
+ movl 88(%esp),%ebp
+ movl 104(%esp),%ecx
+ movl 108(%esp),%esi
+ movl 116(%esp),%edx
+ movl 120(%esp),%edi
+ movl %ebx,20(%esp)
+ movl %ebp,24(%esp)
+ movl %ecx,40(%esp)
+ movl %esi,44(%esp)
+ movl %edx,52(%esp)
+ movl %edi,56(%esp)
+ movl 92(%esp),%ebx
+ movl 124(%esp),%edi
+ movl 112(%esp),%edx
+ movl 80(%esp),%ebp
+ movl 96(%esp),%ecx
+ movl 100(%esp),%esi
+ addl $1,%edx
+ movl %ebx,28(%esp)
+ movl %edi,60(%esp)
+ movl %edx,112(%esp)
+ movl $10,%ebx
+ jmp L004loop
+.align 4,0x90
+L004loop:
+ addl %ebp,%eax
+ movl %ebx,128(%esp)
+ movl %ebp,%ebx
+ xorl %eax,%edx
+ roll $16,%edx
+ addl %edx,%ecx
+ xorl %ecx,%ebx
+ movl 52(%esp),%edi
+ roll $12,%ebx
+ movl 20(%esp),%ebp
+ addl %ebx,%eax
+ xorl %eax,%edx
+ movl %eax,(%esp)
+ roll $8,%edx
+ movl 4(%esp),%eax
+ addl %edx,%ecx
+ movl %edx,48(%esp)
+ xorl %ecx,%ebx
+ addl %ebp,%eax
+ roll $7,%ebx
+ xorl %eax,%edi
+ movl %ecx,32(%esp)
+ roll $16,%edi
+ movl %ebx,16(%esp)
+ addl %edi,%esi
+ movl 40(%esp),%ecx
+ xorl %esi,%ebp
+ movl 56(%esp),%edx
+ roll $12,%ebp
+ movl 24(%esp),%ebx
+ addl %ebp,%eax
+ xorl %eax,%edi
+ movl %eax,4(%esp)
+ roll $8,%edi
+ movl 8(%esp),%eax
+ addl %edi,%esi
+ movl %edi,52(%esp)
+ xorl %esi,%ebp
+ addl %ebx,%eax
+ roll $7,%ebp
+ xorl %eax,%edx
+ movl %esi,36(%esp)
+ roll $16,%edx
+ movl %ebp,20(%esp)
+ addl %edx,%ecx
+ movl 44(%esp),%esi
+ xorl %ecx,%ebx
+ movl 60(%esp),%edi
+ roll $12,%ebx
+ movl 28(%esp),%ebp
+ addl %ebx,%eax
+ xorl %eax,%edx
+ movl %eax,8(%esp)
+ roll $8,%edx
+ movl 12(%esp),%eax
+ addl %edx,%ecx
+ movl %edx,56(%esp)
+ xorl %ecx,%ebx
+ addl %ebp,%eax
+ roll $7,%ebx
+ xorl %eax,%edi
+ roll $16,%edi
+ movl %ebx,24(%esp)
+ addl %edi,%esi
+ xorl %esi,%ebp
+ roll $12,%ebp
+ movl 20(%esp),%ebx
+ addl %ebp,%eax
+ xorl %eax,%edi
+ movl %eax,12(%esp)
+ roll $8,%edi
+ movl (%esp),%eax
+ addl %edi,%esi
+ movl %edi,%edx
+ xorl %esi,%ebp
+ addl %ebx,%eax
+ roll $7,%ebp
+ xorl %eax,%edx
+ roll $16,%edx
+ movl %ebp,28(%esp)
+ addl %edx,%ecx
+ xorl %ecx,%ebx
+ movl 48(%esp),%edi
+ roll $12,%ebx
+ movl 24(%esp),%ebp
+ addl %ebx,%eax
+ xorl %eax,%edx
+ movl %eax,(%esp)
+ roll $8,%edx
+ movl 4(%esp),%eax
+ addl %edx,%ecx
+ movl %edx,60(%esp)
+ xorl %ecx,%ebx
+ addl %ebp,%eax
+ roll $7,%ebx
+ xorl %eax,%edi
+ movl %ecx,40(%esp)
+ roll $16,%edi
+ movl %ebx,20(%esp)
+ addl %edi,%esi
+ movl 32(%esp),%ecx
+ xorl %esi,%ebp
+ movl 52(%esp),%edx
+ roll $12,%ebp
+ movl 28(%esp),%ebx
+ addl %ebp,%eax
+ xorl %eax,%edi
+ movl %eax,4(%esp)
+ roll $8,%edi
+ movl 8(%esp),%eax
+ addl %edi,%esi
+ movl %edi,48(%esp)
+ xorl %esi,%ebp
+ addl %ebx,%eax
+ roll $7,%ebp
+ xorl %eax,%edx
+ movl %esi,44(%esp)
+ roll $16,%edx
+ movl %ebp,24(%esp)
+ addl %edx,%ecx
+ movl 36(%esp),%esi
+ xorl %ecx,%ebx
+ movl 56(%esp),%edi
+ roll $12,%ebx
+ movl 16(%esp),%ebp
+ addl %ebx,%eax
+ xorl %eax,%edx
+ movl %eax,8(%esp)
+ roll $8,%edx
+ movl 12(%esp),%eax
+ addl %edx,%ecx
+ movl %edx,52(%esp)
+ xorl %ecx,%ebx
+ addl %ebp,%eax
+ roll $7,%ebx
+ xorl %eax,%edi
+ roll $16,%edi
+ movl %ebx,28(%esp)
+ addl %edi,%esi
+ xorl %esi,%ebp
+ movl 48(%esp),%edx
+ roll $12,%ebp
+ movl 128(%esp),%ebx
+ addl %ebp,%eax
+ xorl %eax,%edi
+ movl %eax,12(%esp)
+ roll $8,%edi
+ movl (%esp),%eax
+ addl %edi,%esi
+ movl %edi,56(%esp)
+ xorl %esi,%ebp
+ roll $7,%ebp
+ decl %ebx
+ jnz L004loop
+ movl 160(%esp),%ebx
+ addl $1634760805,%eax
+ addl 80(%esp),%ebp
+ addl 96(%esp),%ecx
+ addl 100(%esp),%esi
+ cmpl $64,%ebx
+ jb L005tail
+ movl 156(%esp),%ebx
+ addl 112(%esp),%edx
+ addl 120(%esp),%edi
+ xorl (%ebx),%eax
+ xorl 16(%ebx),%ebp
+ movl %eax,(%esp)
+ movl 152(%esp),%eax
+ xorl 32(%ebx),%ecx
+ xorl 36(%ebx),%esi
+ xorl 48(%ebx),%edx
+ xorl 56(%ebx),%edi
+ movl %ebp,16(%eax)
+ movl %ecx,32(%eax)
+ movl %esi,36(%eax)
+ movl %edx,48(%eax)
+ movl %edi,56(%eax)
+ movl 4(%esp),%ebp
+ movl 8(%esp),%ecx
+ movl 12(%esp),%esi
+ movl 20(%esp),%edx
+ movl 24(%esp),%edi
+ addl $857760878,%ebp
+ addl $2036477234,%ecx
+ addl $1797285236,%esi
+ addl 84(%esp),%edx
+ addl 88(%esp),%edi
+ xorl 4(%ebx),%ebp
+ xorl 8(%ebx),%ecx
+ xorl 12(%ebx),%esi
+ xorl 20(%ebx),%edx
+ xorl 24(%ebx),%edi
+ movl %ebp,4(%eax)
+ movl %ecx,8(%eax)
+ movl %esi,12(%eax)
+ movl %edx,20(%eax)
+ movl %edi,24(%eax)
+ movl 28(%esp),%ebp
+ movl 40(%esp),%ecx
+ movl 44(%esp),%esi
+ movl 52(%esp),%edx
+ movl 60(%esp),%edi
+ addl 92(%esp),%ebp
+ addl 104(%esp),%ecx
+ addl 108(%esp),%esi
+ addl 116(%esp),%edx
+ addl 124(%esp),%edi
+ xorl 28(%ebx),%ebp
+ xorl 40(%ebx),%ecx
+ xorl 44(%ebx),%esi
+ xorl 52(%ebx),%edx
+ xorl 60(%ebx),%edi
+ leal 64(%ebx),%ebx
+ movl %ebp,28(%eax)
+ movl (%esp),%ebp
+ movl %ecx,40(%eax)
+ movl 160(%esp),%ecx
+ movl %esi,44(%eax)
+ movl %edx,52(%eax)
+ movl %edi,60(%eax)
+ movl %ebp,(%eax)
+ leal 64(%eax),%eax
+ subl $64,%ecx
+ jnz L003outer_loop
+ jmp L006done
+L005tail:
+ addl 112(%esp),%edx
+ addl 120(%esp),%edi
+ movl %eax,(%esp)
+ movl %ebp,16(%esp)
+ movl %ecx,32(%esp)
+ movl %esi,36(%esp)
+ movl %edx,48(%esp)
+ movl %edi,56(%esp)
+ movl 4(%esp),%ebp
+ movl 8(%esp),%ecx
+ movl 12(%esp),%esi
+ movl 20(%esp),%edx
+ movl 24(%esp),%edi
+ addl $857760878,%ebp
+ addl $2036477234,%ecx
+ addl $1797285236,%esi
+ addl 84(%esp),%edx
+ addl 88(%esp),%edi
+ movl %ebp,4(%esp)
+ movl %ecx,8(%esp)
+ movl %esi,12(%esp)
+ movl %edx,20(%esp)
+ movl %edi,24(%esp)
+ movl 28(%esp),%ebp
+ movl 40(%esp),%ecx
+ movl 44(%esp),%esi
+ movl 52(%esp),%edx
+ movl 60(%esp),%edi
+ addl 92(%esp),%ebp
+ addl 104(%esp),%ecx
+ addl 108(%esp),%esi
+ addl 116(%esp),%edx
+ addl 124(%esp),%edi
+ movl %ebp,28(%esp)
+ movl 156(%esp),%ebp
+ movl %ecx,40(%esp)
+ movl 152(%esp),%ecx
+ movl %esi,44(%esp)
+ xorl %esi,%esi
+ movl %edx,52(%esp)
+ movl %edi,60(%esp)
+ xorl %eax,%eax
+ xorl %edx,%edx
+L007tail_loop:
+ movb (%esi,%ebp,1),%al
+ movb (%esp,%esi,1),%dl
+ leal 1(%esi),%esi
+ xorb %dl,%al
+ movb %al,-1(%ecx,%esi,1)
+ decl %ebx
+ jnz L007tail_loop
+L006done:
+ addl $132,%esp
+L000no_data:
+ popl %edi
+ popl %esi
+ popl %ebx
+ popl %ebp
+ ret
+.globl _ChaCha20_ssse3
+.private_extern _ChaCha20_ssse3
+.align 4
+_ChaCha20_ssse3:
+L_ChaCha20_ssse3_begin:
+ pushl %ebp
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+Lssse3_shortcut:
+ movl 20(%esp),%edi
+ movl 24(%esp),%esi
+ movl 28(%esp),%ecx
+ movl 32(%esp),%edx
+ movl 36(%esp),%ebx
+ movl %esp,%ebp
+ subl $524,%esp
+ andl $-64,%esp
+ movl %ebp,512(%esp)
+ leal Lssse3_data-Lpic_point(%eax),%eax
+ movdqu (%ebx),%xmm3
+ cmpl $256,%ecx
+ jb L0081x
+ movl %edx,516(%esp)
+ movl %ebx,520(%esp)
+ subl $256,%ecx
+ leal 384(%esp),%ebp
+ movdqu (%edx),%xmm7
+ pshufd $0,%xmm3,%xmm0
+ pshufd $85,%xmm3,%xmm1
+ pshufd $170,%xmm3,%xmm2
+ pshufd $255,%xmm3,%xmm3
+ paddd 48(%eax),%xmm0
+ pshufd $0,%xmm7,%xmm4
+ pshufd $85,%xmm7,%xmm5
+ psubd 64(%eax),%xmm0
+ pshufd $170,%xmm7,%xmm6
+ pshufd $255,%xmm7,%xmm7
+ movdqa %xmm0,64(%ebp)
+ movdqa %xmm1,80(%ebp)
+ movdqa %xmm2,96(%ebp)
+ movdqa %xmm3,112(%ebp)
+ movdqu 16(%edx),%xmm3
+ movdqa %xmm4,-64(%ebp)
+ movdqa %xmm5,-48(%ebp)
+ movdqa %xmm6,-32(%ebp)
+ movdqa %xmm7,-16(%ebp)
+ movdqa 32(%eax),%xmm7
+ leal 128(%esp),%ebx
+ pshufd $0,%xmm3,%xmm0
+ pshufd $85,%xmm3,%xmm1
+ pshufd $170,%xmm3,%xmm2
+ pshufd $255,%xmm3,%xmm3
+ pshufd $0,%xmm7,%xmm4
+ pshufd $85,%xmm7,%xmm5
+ pshufd $170,%xmm7,%xmm6
+ pshufd $255,%xmm7,%xmm7
+ movdqa %xmm0,(%ebp)
+ movdqa %xmm1,16(%ebp)
+ movdqa %xmm2,32(%ebp)
+ movdqa %xmm3,48(%ebp)
+ movdqa %xmm4,-128(%ebp)
+ movdqa %xmm5,-112(%ebp)
+ movdqa %xmm6,-96(%ebp)
+ movdqa %xmm7,-80(%ebp)
+ leal 128(%esi),%esi
+ leal 128(%edi),%edi
+ jmp L009outer_loop
+.align 4,0x90
+L009outer_loop:
+ movdqa -112(%ebp),%xmm1
+ movdqa -96(%ebp),%xmm2
+ movdqa -80(%ebp),%xmm3
+ movdqa -48(%ebp),%xmm5
+ movdqa -32(%ebp),%xmm6
+ movdqa -16(%ebp),%xmm7
+ movdqa %xmm1,-112(%ebx)
+ movdqa %xmm2,-96(%ebx)
+ movdqa %xmm3,-80(%ebx)
+ movdqa %xmm5,-48(%ebx)
+ movdqa %xmm6,-32(%ebx)
+ movdqa %xmm7,-16(%ebx)
+ movdqa 32(%ebp),%xmm2
+ movdqa 48(%ebp),%xmm3
+ movdqa 64(%ebp),%xmm4
+ movdqa 80(%ebp),%xmm5
+ movdqa 96(%ebp),%xmm6
+ movdqa 112(%ebp),%xmm7
+ paddd 64(%eax),%xmm4
+ movdqa %xmm2,32(%ebx)
+ movdqa %xmm3,48(%ebx)
+ movdqa %xmm4,64(%ebx)
+ movdqa %xmm5,80(%ebx)
+ movdqa %xmm6,96(%ebx)
+ movdqa %xmm7,112(%ebx)
+ movdqa %xmm4,64(%ebp)
+ movdqa -128(%ebp),%xmm0
+ movdqa %xmm4,%xmm6
+ movdqa -64(%ebp),%xmm3
+ movdqa (%ebp),%xmm4
+ movdqa 16(%ebp),%xmm5
+ movl $10,%edx
+ nop
+.align 4,0x90
+L010loop:
+ paddd %xmm3,%xmm0
+ movdqa %xmm3,%xmm2
+ pxor %xmm0,%xmm6
+ pshufb (%eax),%xmm6
+ paddd %xmm6,%xmm4
+ pxor %xmm4,%xmm2
+ movdqa -48(%ebx),%xmm3
+ movdqa %xmm2,%xmm1
+ pslld $12,%xmm2
+ psrld $20,%xmm1
+ por %xmm1,%xmm2
+ movdqa -112(%ebx),%xmm1
+ paddd %xmm2,%xmm0
+ movdqa 80(%ebx),%xmm7
+ pxor %xmm0,%xmm6
+ movdqa %xmm0,-128(%ebx)
+ pshufb 16(%eax),%xmm6
+ paddd %xmm6,%xmm4
+ movdqa %xmm6,64(%ebx)
+ pxor %xmm4,%xmm2
+ paddd %xmm3,%xmm1
+ movdqa %xmm2,%xmm0
+ pslld $7,%xmm2
+ psrld $25,%xmm0
+ pxor %xmm1,%xmm7
+ por %xmm0,%xmm2
+ movdqa %xmm4,(%ebx)
+ pshufb (%eax),%xmm7
+ movdqa %xmm2,-64(%ebx)
+ paddd %xmm7,%xmm5
+ movdqa 32(%ebx),%xmm4
+ pxor %xmm5,%xmm3
+ movdqa -32(%ebx),%xmm2
+ movdqa %xmm3,%xmm0
+ pslld $12,%xmm3
+ psrld $20,%xmm0
+ por %xmm0,%xmm3
+ movdqa -96(%ebx),%xmm0
+ paddd %xmm3,%xmm1
+ movdqa 96(%ebx),%xmm6
+ pxor %xmm1,%xmm7
+ movdqa %xmm1,-112(%ebx)
+ pshufb 16(%eax),%xmm7
+ paddd %xmm7,%xmm5
+ movdqa %xmm7,80(%ebx)
+ pxor %xmm5,%xmm3
+ paddd %xmm2,%xmm0
+ movdqa %xmm3,%xmm1
+ pslld $7,%xmm3
+ psrld $25,%xmm1
+ pxor %xmm0,%xmm6
+ por %xmm1,%xmm3
+ movdqa %xmm5,16(%ebx)
+ pshufb (%eax),%xmm6
+ movdqa %xmm3,-48(%ebx)
+ paddd %xmm6,%xmm4
+ movdqa 48(%ebx),%xmm5
+ pxor %xmm4,%xmm2
+ movdqa -16(%ebx),%xmm3
+ movdqa %xmm2,%xmm1
+ pslld $12,%xmm2
+ psrld $20,%xmm1
+ por %xmm1,%xmm2
+ movdqa -80(%ebx),%xmm1
+ paddd %xmm2,%xmm0
+ movdqa 112(%ebx),%xmm7
+ pxor %xmm0,%xmm6
+ movdqa %xmm0,-96(%ebx)
+ pshufb 16(%eax),%xmm6
+ paddd %xmm6,%xmm4
+ movdqa %xmm6,96(%ebx)
+ pxor %xmm4,%xmm2
+ paddd %xmm3,%xmm1
+ movdqa %xmm2,%xmm0
+ pslld $7,%xmm2
+ psrld $25,%xmm0
+ pxor %xmm1,%xmm7
+ por %xmm0,%xmm2
+ pshufb (%eax),%xmm7
+ movdqa %xmm2,-32(%ebx)
+ paddd %xmm7,%xmm5
+ pxor %xmm5,%xmm3
+ movdqa -48(%ebx),%xmm2
+ movdqa %xmm3,%xmm0
+ pslld $12,%xmm3
+ psrld $20,%xmm0
+ por %xmm0,%xmm3
+ movdqa -128(%ebx),%xmm0
+ paddd %xmm3,%xmm1
+ pxor %xmm1,%xmm7
+ movdqa %xmm1,-80(%ebx)
+ pshufb 16(%eax),%xmm7
+ paddd %xmm7,%xmm5
+ movdqa %xmm7,%xmm6
+ pxor %xmm5,%xmm3
+ paddd %xmm2,%xmm0
+ movdqa %xmm3,%xmm1
+ pslld $7,%xmm3
+ psrld $25,%xmm1
+ pxor %xmm0,%xmm6
+ por %xmm1,%xmm3
+ pshufb (%eax),%xmm6
+ movdqa %xmm3,-16(%ebx)
+ paddd %xmm6,%xmm4
+ pxor %xmm4,%xmm2
+ movdqa -32(%ebx),%xmm3
+ movdqa %xmm2,%xmm1
+ pslld $12,%xmm2
+ psrld $20,%xmm1
+ por %xmm1,%xmm2
+ movdqa -112(%ebx),%xmm1
+ paddd %xmm2,%xmm0
+ movdqa 64(%ebx),%xmm7
+ pxor %xmm0,%xmm6
+ movdqa %xmm0,-128(%ebx)
+ pshufb 16(%eax),%xmm6
+ paddd %xmm6,%xmm4
+ movdqa %xmm6,112(%ebx)
+ pxor %xmm4,%xmm2
+ paddd %xmm3,%xmm1
+ movdqa %xmm2,%xmm0
+ pslld $7,%xmm2
+ psrld $25,%xmm0
+ pxor %xmm1,%xmm7
+ por %xmm0,%xmm2
+ movdqa %xmm4,32(%ebx)
+ pshufb (%eax),%xmm7
+ movdqa %xmm2,-48(%ebx)
+ paddd %xmm7,%xmm5
+ movdqa (%ebx),%xmm4
+ pxor %xmm5,%xmm3
+ movdqa -16(%ebx),%xmm2
+ movdqa %xmm3,%xmm0
+ pslld $12,%xmm3
+ psrld $20,%xmm0
+ por %xmm0,%xmm3
+ movdqa -96(%ebx),%xmm0
+ paddd %xmm3,%xmm1
+ movdqa 80(%ebx),%xmm6
+ pxor %xmm1,%xmm7
+ movdqa %xmm1,-112(%ebx)
+ pshufb 16(%eax),%xmm7
+ paddd %xmm7,%xmm5
+ movdqa %xmm7,64(%ebx)
+ pxor %xmm5,%xmm3
+ paddd %xmm2,%xmm0
+ movdqa %xmm3,%xmm1
+ pslld $7,%xmm3
+ psrld $25,%xmm1
+ pxor %xmm0,%xmm6
+ por %xmm1,%xmm3
+ movdqa %xmm5,48(%ebx)
+ pshufb (%eax),%xmm6
+ movdqa %xmm3,-32(%ebx)
+ paddd %xmm6,%xmm4
+ movdqa 16(%ebx),%xmm5
+ pxor %xmm4,%xmm2
+ movdqa -64(%ebx),%xmm3
+ movdqa %xmm2,%xmm1
+ pslld $12,%xmm2
+ psrld $20,%xmm1
+ por %xmm1,%xmm2
+ movdqa -80(%ebx),%xmm1
+ paddd %xmm2,%xmm0
+ movdqa 96(%ebx),%xmm7
+ pxor %xmm0,%xmm6
+ movdqa %xmm0,-96(%ebx)
+ pshufb 16(%eax),%xmm6
+ paddd %xmm6,%xmm4
+ movdqa %xmm6,80(%ebx)
+ pxor %xmm4,%xmm2
+ paddd %xmm3,%xmm1
+ movdqa %xmm2,%xmm0
+ pslld $7,%xmm2
+ psrld $25,%xmm0
+ pxor %xmm1,%xmm7
+ por %xmm0,%xmm2
+ pshufb (%eax),%xmm7
+ movdqa %xmm2,-16(%ebx)
+ paddd %xmm7,%xmm5
+ pxor %xmm5,%xmm3
+ movdqa %xmm3,%xmm0
+ pslld $12,%xmm3
+ psrld $20,%xmm0
+ por %xmm0,%xmm3
+ movdqa -128(%ebx),%xmm0
+ paddd %xmm3,%xmm1
+ movdqa 64(%ebx),%xmm6
+ pxor %xmm1,%xmm7
+ movdqa %xmm1,-80(%ebx)
+ pshufb 16(%eax),%xmm7
+ paddd %xmm7,%xmm5
+ movdqa %xmm7,96(%ebx)
+ pxor %xmm5,%xmm3
+ movdqa %xmm3,%xmm1
+ pslld $7,%xmm3
+ psrld $25,%xmm1
+ por %xmm1,%xmm3
+ decl %edx
+ jnz L010loop
+ movdqa %xmm3,-64(%ebx)
+ movdqa %xmm4,(%ebx)
+ movdqa %xmm5,16(%ebx)
+ movdqa %xmm6,64(%ebx)
+ movdqa %xmm7,96(%ebx)
+ movdqa -112(%ebx),%xmm1
+ movdqa -96(%ebx),%xmm2
+ movdqa -80(%ebx),%xmm3
+ paddd -128(%ebp),%xmm0
+ paddd -112(%ebp),%xmm1
+ paddd -96(%ebp),%xmm2
+ paddd -80(%ebp),%xmm3
+ movdqa %xmm0,%xmm6
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm6
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm6,%xmm3
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ movdqu -128(%esi),%xmm4
+ movdqu -64(%esi),%xmm5
+ movdqu (%esi),%xmm2
+ movdqu 64(%esi),%xmm7
+ leal 16(%esi),%esi
+ pxor %xmm0,%xmm4
+ movdqa -64(%ebx),%xmm0
+ pxor %xmm1,%xmm5
+ movdqa -48(%ebx),%xmm1
+ pxor %xmm2,%xmm6
+ movdqa -32(%ebx),%xmm2
+ pxor %xmm3,%xmm7
+ movdqa -16(%ebx),%xmm3
+ movdqu %xmm4,-128(%edi)
+ movdqu %xmm5,-64(%edi)
+ movdqu %xmm6,(%edi)
+ movdqu %xmm7,64(%edi)
+ leal 16(%edi),%edi
+ paddd -64(%ebp),%xmm0
+ paddd -48(%ebp),%xmm1
+ paddd -32(%ebp),%xmm2
+ paddd -16(%ebp),%xmm3
+ movdqa %xmm0,%xmm6
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm6
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm6,%xmm3
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ movdqu -128(%esi),%xmm4
+ movdqu -64(%esi),%xmm5
+ movdqu (%esi),%xmm2
+ movdqu 64(%esi),%xmm7
+ leal 16(%esi),%esi
+ pxor %xmm0,%xmm4
+ movdqa (%ebx),%xmm0
+ pxor %xmm1,%xmm5
+ movdqa 16(%ebx),%xmm1
+ pxor %xmm2,%xmm6
+ movdqa 32(%ebx),%xmm2
+ pxor %xmm3,%xmm7
+ movdqa 48(%ebx),%xmm3
+ movdqu %xmm4,-128(%edi)
+ movdqu %xmm5,-64(%edi)
+ movdqu %xmm6,(%edi)
+ movdqu %xmm7,64(%edi)
+ leal 16(%edi),%edi
+ paddd (%ebp),%xmm0
+ paddd 16(%ebp),%xmm1
+ paddd 32(%ebp),%xmm2
+ paddd 48(%ebp),%xmm3
+ movdqa %xmm0,%xmm6
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm6
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm6,%xmm3
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ movdqu -128(%esi),%xmm4
+ movdqu -64(%esi),%xmm5
+ movdqu (%esi),%xmm2
+ movdqu 64(%esi),%xmm7
+ leal 16(%esi),%esi
+ pxor %xmm0,%xmm4
+ movdqa 64(%ebx),%xmm0
+ pxor %xmm1,%xmm5
+ movdqa 80(%ebx),%xmm1
+ pxor %xmm2,%xmm6
+ movdqa 96(%ebx),%xmm2
+ pxor %xmm3,%xmm7
+ movdqa 112(%ebx),%xmm3
+ movdqu %xmm4,-128(%edi)
+ movdqu %xmm5,-64(%edi)
+ movdqu %xmm6,(%edi)
+ movdqu %xmm7,64(%edi)
+ leal 16(%edi),%edi
+ paddd 64(%ebp),%xmm0
+ paddd 80(%ebp),%xmm1
+ paddd 96(%ebp),%xmm2
+ paddd 112(%ebp),%xmm3
+ movdqa %xmm0,%xmm6
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm6
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm6,%xmm3
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ movdqu -128(%esi),%xmm4
+ movdqu -64(%esi),%xmm5
+ movdqu (%esi),%xmm2
+ movdqu 64(%esi),%xmm7
+ leal 208(%esi),%esi
+ pxor %xmm0,%xmm4
+ pxor %xmm1,%xmm5
+ pxor %xmm2,%xmm6
+ pxor %xmm3,%xmm7
+ movdqu %xmm4,-128(%edi)
+ movdqu %xmm5,-64(%edi)
+ movdqu %xmm6,(%edi)
+ movdqu %xmm7,64(%edi)
+ leal 208(%edi),%edi
+ subl $256,%ecx
+ jnc L009outer_loop
+ addl $256,%ecx
+ jz L011done
+ movl 520(%esp),%ebx
+ leal -128(%esi),%esi
+ movl 516(%esp),%edx
+ leal -128(%edi),%edi
+ movd 64(%ebp),%xmm2
+ movdqu (%ebx),%xmm3
+ paddd 96(%eax),%xmm2
+ pand 112(%eax),%xmm3
+ por %xmm2,%xmm3
+L0081x:
+ movdqa 32(%eax),%xmm0
+ movdqu (%edx),%xmm1
+ movdqu 16(%edx),%xmm2
+ movdqa (%eax),%xmm6
+ movdqa 16(%eax),%xmm7
+ movl %ebp,48(%esp)
+ movdqa %xmm0,(%esp)
+ movdqa %xmm1,16(%esp)
+ movdqa %xmm2,32(%esp)
+ movdqa %xmm3,48(%esp)
+ movl $10,%edx
+ jmp L012loop1x
+.align 4,0x90
+L013outer1x:
+ movdqa 80(%eax),%xmm3
+ movdqa (%esp),%xmm0
+ movdqa 16(%esp),%xmm1
+ movdqa 32(%esp),%xmm2
+ paddd 48(%esp),%xmm3
+ movl $10,%edx
+ movdqa %xmm3,48(%esp)
+ jmp L012loop1x
+.align 4,0x90
+L012loop1x:
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,222
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $20,%xmm1
+ pslld $12,%xmm4
+ por %xmm4,%xmm1
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,223
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $25,%xmm1
+ pslld $7,%xmm4
+ por %xmm4,%xmm1
+ pshufd $78,%xmm2,%xmm2
+ pshufd $57,%xmm1,%xmm1
+ pshufd $147,%xmm3,%xmm3
+ nop
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,222
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $20,%xmm1
+ pslld $12,%xmm4
+ por %xmm4,%xmm1
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,223
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $25,%xmm1
+ pslld $7,%xmm4
+ por %xmm4,%xmm1
+ pshufd $78,%xmm2,%xmm2
+ pshufd $147,%xmm1,%xmm1
+ pshufd $57,%xmm3,%xmm3
+ decl %edx
+ jnz L012loop1x
+ paddd (%esp),%xmm0
+ paddd 16(%esp),%xmm1
+ paddd 32(%esp),%xmm2
+ paddd 48(%esp),%xmm3
+ cmpl $64,%ecx
+ jb L014tail
+ movdqu (%esi),%xmm4
+ movdqu 16(%esi),%xmm5
+ pxor %xmm4,%xmm0
+ movdqu 32(%esi),%xmm4
+ pxor %xmm5,%xmm1
+ movdqu 48(%esi),%xmm5
+ pxor %xmm4,%xmm2
+ pxor %xmm5,%xmm3
+ leal 64(%esi),%esi
+ movdqu %xmm0,(%edi)
+ movdqu %xmm1,16(%edi)
+ movdqu %xmm2,32(%edi)
+ movdqu %xmm3,48(%edi)
+ leal 64(%edi),%edi
+ subl $64,%ecx
+ jnz L013outer1x
+ jmp L011done
+L014tail:
+ movdqa %xmm0,(%esp)
+ movdqa %xmm1,16(%esp)
+ movdqa %xmm2,32(%esp)
+ movdqa %xmm3,48(%esp)
+ xorl %eax,%eax
+ xorl %edx,%edx
+ xorl %ebp,%ebp
+L015tail_loop:
+ movb (%esp,%ebp,1),%al
+ movb (%esi,%ebp,1),%dl
+ leal 1(%ebp),%ebp
+ xorb %dl,%al
+ movb %al,-1(%edi,%ebp,1)
+ decl %ecx
+ jnz L015tail_loop
+L011done:
+ movl 512(%esp),%esp
+ popl %edi
+ popl %esi
+ popl %ebx
+ popl %ebp
+ ret
+.align 6,0x90
+Lssse3_data:
+.byte 2,3,0,1,6,7,4,5,10,11,8,9,14,15,12,13
+.byte 3,0,1,2,7,4,5,6,11,8,9,10,15,12,13,14
+.long 1634760805,857760878,2036477234,1797285236
+.long 0,1,2,3
+.long 4,4,4,4
+.long 1,0,0,0
+.long 4,0,0,0
+.long 0,-1,-1,-1
+.align 6,0x90
+.byte 67,104,97,67,104,97,50,48,32,102,111,114,32,120,56,54
+.byte 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
+.byte 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
+.byte 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 bfb292c..0000000
--- 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/rc4/rc4-586.S b/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S
index faecdfa..dcddc58 100644
--- a/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S
+++ b/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S
@@ -343,39 +343,6 @@
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
diff --git a/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S b/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S
index 97aafbf..72a7205 100644
--- a/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S
+++ b/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S
@@ -22,8 +22,11 @@
movl 8(%esi),%ecx
testl $16777216,%eax
jz L001x86
- testl $536870912,%ecx
- jnz Lshaext_shortcut
+ andl $268435456,%edx
+ andl $1073741824,%eax
+ orl %edx,%eax
+ cmpl $1342177280,%eax
+ je Lavx_shortcut
jmp Lssse3_shortcut
.align 4,0x90
L001x86:
@@ -1391,9 +1394,9 @@
popl %ebx
popl %ebp
ret
-.private_extern __sha1_block_data_order_shaext
+.private_extern __sha1_block_data_order_ssse3
.align 4
-__sha1_block_data_order_shaext:
+__sha1_block_data_order_ssse3:
pushl %ebp
pushl %ebx
pushl %esi
@@ -1402,175 +1405,6 @@
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
@@ -1623,9 +1457,9 @@
xorl %edx,%ebp
pshufd $238,%xmm0,%xmm4
andl %ebp,%esi
- jmp L006loop
+ jmp L004loop
.align 4,0x90
-L006loop:
+L004loop:
rorl $2,%ebx
xorl %edx,%esi
movl %eax,%ebp
@@ -2528,7 +2362,7 @@
addl %edx,%ecx
movl 196(%esp),%ebp
cmpl 200(%esp),%ebp
- je L007done
+ je L005done
movdqa 160(%esp),%xmm7
movdqa 176(%esp),%xmm6
movdqu (%ebp),%xmm0
@@ -2663,9 +2497,9 @@
pshufd $238,%xmm0,%xmm4
andl %ebx,%esi
movl %ebp,%ebx
- jmp L006loop
+ jmp L004loop
.align 4,0x90
-L007done:
+L005done:
addl 16(%esp),%ebx
xorl %edi,%esi
movl %ecx,%ebp
@@ -2778,6 +2612,1175 @@
popl %ebx
popl %ebp
ret
+.private_extern __sha1_block_data_order_avx
+.align 4
+__sha1_block_data_order_avx:
+ pushl %ebp
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+ call L006pic_point
+L006pic_point:
+ popl %ebp
+ leal LK_XX_XX-L006pic_point(%ebp),%ebp
+Lavx_shortcut:
+ vzeroall
+ vmovdqa (%ebp),%xmm7
+ vmovdqa 16(%ebp),%xmm0
+ vmovdqa 32(%ebp),%xmm1
+ vmovdqa 48(%ebp),%xmm2
+ vmovdqa 64(%ebp),%xmm6
+ movl 20(%esp),%edi
+ movl 24(%esp),%ebp
+ movl 28(%esp),%edx
+ movl %esp,%esi
+ subl $208,%esp
+ andl $-64,%esp
+ vmovdqa %xmm0,112(%esp)
+ vmovdqa %xmm1,128(%esp)
+ vmovdqa %xmm2,144(%esp)
+ shll $6,%edx
+ vmovdqa %xmm7,160(%esp)
+ addl %ebp,%edx
+ vmovdqa %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
+ vmovdqu -64(%ebp),%xmm0
+ vmovdqu -48(%ebp),%xmm1
+ vmovdqu -32(%ebp),%xmm2
+ vmovdqu -16(%ebp),%xmm3
+ vpshufb %xmm6,%xmm0,%xmm0
+ vpshufb %xmm6,%xmm1,%xmm1
+ vpshufb %xmm6,%xmm2,%xmm2
+ vmovdqa %xmm7,96(%esp)
+ vpshufb %xmm6,%xmm3,%xmm3
+ vpaddd %xmm7,%xmm0,%xmm4
+ vpaddd %xmm7,%xmm1,%xmm5
+ vpaddd %xmm7,%xmm2,%xmm6
+ vmovdqa %xmm4,(%esp)
+ movl %ecx,%ebp
+ vmovdqa %xmm5,16(%esp)
+ xorl %edx,%ebp
+ vmovdqa %xmm6,32(%esp)
+ andl %ebp,%esi
+ jmp L007loop
+.align 4,0x90
+L007loop:
+ shrdl $2,%ebx,%ebx
+ xorl %edx,%esi
+ vpalignr $8,%xmm0,%xmm1,%xmm4
+ movl %eax,%ebp
+ addl (%esp),%edi
+ vpaddd %xmm3,%xmm7,%xmm7
+ vmovdqa %xmm0,64(%esp)
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpsrldq $4,%xmm3,%xmm6
+ addl %esi,%edi
+ andl %ebx,%ebp
+ vpxor %xmm0,%xmm4,%xmm4
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ vpxor %xmm2,%xmm6,%xmm6
+ shrdl $7,%eax,%eax
+ xorl %ecx,%ebp
+ vmovdqa %xmm7,48(%esp)
+ movl %edi,%esi
+ addl 4(%esp),%edx
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ebx,%eax
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ andl %eax,%esi
+ vpsrld $31,%xmm4,%xmm6
+ xorl %ebx,%eax
+ addl %edi,%edx
+ shrdl $7,%edi,%edi
+ xorl %ebx,%esi
+ vpslldq $12,%xmm4,%xmm0
+ vpaddd %xmm4,%xmm4,%xmm4
+ movl %edx,%ebp
+ addl 8(%esp),%ecx
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ vpsrld $30,%xmm0,%xmm7
+ vpor %xmm6,%xmm4,%xmm4
+ addl %esi,%ecx
+ andl %edi,%ebp
+ xorl %eax,%edi
+ addl %edx,%ecx
+ vpslld $2,%xmm0,%xmm0
+ shrdl $7,%edx,%edx
+ xorl %eax,%ebp
+ vpxor %xmm7,%xmm4,%xmm4
+ movl %ecx,%esi
+ addl 12(%esp),%ebx
+ xorl %edi,%edx
+ shldl $5,%ecx,%ecx
+ vpxor %xmm0,%xmm4,%xmm4
+ addl %ebp,%ebx
+ andl %edx,%esi
+ vmovdqa 96(%esp),%xmm0
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ shrdl $7,%ecx,%ecx
+ xorl %edi,%esi
+ vpalignr $8,%xmm1,%xmm2,%xmm5
+ movl %ebx,%ebp
+ addl 16(%esp),%eax
+ vpaddd %xmm4,%xmm0,%xmm0
+ vmovdqa %xmm1,80(%esp)
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vpsrldq $4,%xmm4,%xmm7
+ addl %esi,%eax
+ andl %ecx,%ebp
+ vpxor %xmm1,%xmm5,%xmm5
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpxor %xmm3,%xmm7,%xmm7
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%ebp
+ vmovdqa %xmm0,(%esp)
+ movl %eax,%esi
+ addl 20(%esp),%edi
+ vpxor %xmm7,%xmm5,%xmm5
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ andl %ebx,%esi
+ vpsrld $31,%xmm5,%xmm7
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ shrdl $7,%eax,%eax
+ xorl %ecx,%esi
+ vpslldq $12,%xmm5,%xmm1
+ vpaddd %xmm5,%xmm5,%xmm5
+ movl %edi,%ebp
+ addl 24(%esp),%edx
+ xorl %ebx,%eax
+ shldl $5,%edi,%edi
+ vpsrld $30,%xmm1,%xmm0
+ vpor %xmm7,%xmm5,%xmm5
+ addl %esi,%edx
+ andl %eax,%ebp
+ xorl %ebx,%eax
+ addl %edi,%edx
+ vpslld $2,%xmm1,%xmm1
+ shrdl $7,%edi,%edi
+ xorl %ebx,%ebp
+ vpxor %xmm0,%xmm5,%xmm5
+ movl %edx,%esi
+ addl 28(%esp),%ecx
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ vpxor %xmm1,%xmm5,%xmm5
+ addl %ebp,%ecx
+ andl %edi,%esi
+ vmovdqa 112(%esp),%xmm1
+ xorl %eax,%edi
+ addl %edx,%ecx
+ shrdl $7,%edx,%edx
+ xorl %eax,%esi
+ vpalignr $8,%xmm2,%xmm3,%xmm6
+ movl %ecx,%ebp
+ addl 32(%esp),%ebx
+ vpaddd %xmm5,%xmm1,%xmm1
+ vmovdqa %xmm2,96(%esp)
+ xorl %edi,%edx
+ shldl $5,%ecx,%ecx
+ vpsrldq $4,%xmm5,%xmm0
+ addl %esi,%ebx
+ andl %edx,%ebp
+ vpxor %xmm2,%xmm6,%xmm6
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ vpxor %xmm4,%xmm0,%xmm0
+ shrdl $7,%ecx,%ecx
+ xorl %edi,%ebp
+ vmovdqa %xmm1,16(%esp)
+ movl %ebx,%esi
+ addl 36(%esp),%eax
+ vpxor %xmm0,%xmm6,%xmm6
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ andl %ecx,%esi
+ vpsrld $31,%xmm6,%xmm0
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%esi
+ vpslldq $12,%xmm6,%xmm2
+ vpaddd %xmm6,%xmm6,%xmm6
+ movl %eax,%ebp
+ addl 40(%esp),%edi
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpsrld $30,%xmm2,%xmm1
+ vpor %xmm0,%xmm6,%xmm6
+ addl %esi,%edi
+ andl %ebx,%ebp
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ vpslld $2,%xmm2,%xmm2
+ vmovdqa 64(%esp),%xmm0
+ shrdl $7,%eax,%eax
+ xorl %ecx,%ebp
+ vpxor %xmm1,%xmm6,%xmm6
+ movl %edi,%esi
+ addl 44(%esp),%edx
+ xorl %ebx,%eax
+ shldl $5,%edi,%edi
+ vpxor %xmm2,%xmm6,%xmm6
+ addl %ebp,%edx
+ andl %eax,%esi
+ vmovdqa 112(%esp),%xmm2
+ xorl %ebx,%eax
+ addl %edi,%edx
+ shrdl $7,%edi,%edi
+ xorl %ebx,%esi
+ vpalignr $8,%xmm3,%xmm4,%xmm7
+ movl %edx,%ebp
+ addl 48(%esp),%ecx
+ vpaddd %xmm6,%xmm2,%xmm2
+ vmovdqa %xmm3,64(%esp)
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ vpsrldq $4,%xmm6,%xmm1
+ addl %esi,%ecx
+ andl %edi,%ebp
+ vpxor %xmm3,%xmm7,%xmm7
+ xorl %eax,%edi
+ addl %edx,%ecx
+ vpxor %xmm5,%xmm1,%xmm1
+ shrdl $7,%edx,%edx
+ xorl %eax,%ebp
+ vmovdqa %xmm2,32(%esp)
+ movl %ecx,%esi
+ addl 52(%esp),%ebx
+ vpxor %xmm1,%xmm7,%xmm7
+ xorl %edi,%edx
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ andl %edx,%esi
+ vpsrld $31,%xmm7,%xmm1
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ shrdl $7,%ecx,%ecx
+ xorl %edi,%esi
+ vpslldq $12,%xmm7,%xmm3
+ vpaddd %xmm7,%xmm7,%xmm7
+ movl %ebx,%ebp
+ addl 56(%esp),%eax
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vpsrld $30,%xmm3,%xmm2
+ vpor %xmm1,%xmm7,%xmm7
+ addl %esi,%eax
+ andl %ecx,%ebp
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpslld $2,%xmm3,%xmm3
+ vmovdqa 80(%esp),%xmm1
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%ebp
+ vpxor %xmm2,%xmm7,%xmm7
+ movl %eax,%esi
+ addl 60(%esp),%edi
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpxor %xmm3,%xmm7,%xmm7
+ addl %ebp,%edi
+ andl %ebx,%esi
+ vmovdqa 112(%esp),%xmm3
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ vpalignr $8,%xmm6,%xmm7,%xmm2
+ vpxor %xmm4,%xmm0,%xmm0
+ shrdl $7,%eax,%eax
+ xorl %ecx,%esi
+ movl %edi,%ebp
+ addl (%esp),%edx
+ vpxor %xmm1,%xmm0,%xmm0
+ vmovdqa %xmm4,80(%esp)
+ xorl %ebx,%eax
+ shldl $5,%edi,%edi
+ vmovdqa %xmm3,%xmm4
+ vpaddd %xmm7,%xmm3,%xmm3
+ addl %esi,%edx
+ andl %eax,%ebp
+ vpxor %xmm2,%xmm0,%xmm0
+ xorl %ebx,%eax
+ addl %edi,%edx
+ shrdl $7,%edi,%edi
+ xorl %ebx,%ebp
+ vpsrld $30,%xmm0,%xmm2
+ vmovdqa %xmm3,48(%esp)
+ movl %edx,%esi
+ addl 4(%esp),%ecx
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ vpslld $2,%xmm0,%xmm0
+ addl %ebp,%ecx
+ andl %edi,%esi
+ xorl %eax,%edi
+ addl %edx,%ecx
+ shrdl $7,%edx,%edx
+ xorl %eax,%esi
+ movl %ecx,%ebp
+ addl 8(%esp),%ebx
+ vpor %xmm2,%xmm0,%xmm0
+ xorl %edi,%edx
+ shldl $5,%ecx,%ecx
+ vmovdqa 96(%esp),%xmm2
+ addl %esi,%ebx
+ andl %edx,%ebp
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ addl 12(%esp),%eax
+ xorl %edi,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpalignr $8,%xmm7,%xmm0,%xmm3
+ vpxor %xmm5,%xmm1,%xmm1
+ addl 16(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ vpxor %xmm2,%xmm1,%xmm1
+ vmovdqa %xmm5,96(%esp)
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ vmovdqa %xmm4,%xmm5
+ vpaddd %xmm0,%xmm4,%xmm4
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpxor %xmm3,%xmm1,%xmm1
+ addl 20(%esp),%edx
+ xorl %ebx,%ebp
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ vpsrld $30,%xmm1,%xmm3
+ vmovdqa %xmm4,(%esp)
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpslld $2,%xmm1,%xmm1
+ addl 24(%esp),%ecx
+ xorl %eax,%esi
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpor %xmm3,%xmm1,%xmm1
+ addl 28(%esp),%ebx
+ xorl %edi,%ebp
+ vmovdqa 64(%esp),%xmm3
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpalignr $8,%xmm0,%xmm1,%xmm4
+ vpxor %xmm6,%xmm2,%xmm2
+ addl 32(%esp),%eax
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ vpxor %xmm3,%xmm2,%xmm2
+ vmovdqa %xmm6,64(%esp)
+ addl %esi,%eax
+ xorl %edx,%ebp
+ vmovdqa 128(%esp),%xmm6
+ vpaddd %xmm1,%xmm5,%xmm5
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpxor %xmm4,%xmm2,%xmm2
+ addl 36(%esp),%edi
+ xorl %ecx,%ebp
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ vpsrld $30,%xmm2,%xmm4
+ vmovdqa %xmm5,16(%esp)
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpslld $2,%xmm2,%xmm2
+ addl 40(%esp),%edx
+ xorl %ebx,%esi
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpor %xmm4,%xmm2,%xmm2
+ addl 44(%esp),%ecx
+ xorl %eax,%ebp
+ vmovdqa 80(%esp),%xmm4
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpalignr $8,%xmm1,%xmm2,%xmm5
+ vpxor %xmm7,%xmm3,%xmm3
+ addl 48(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ vpxor %xmm4,%xmm3,%xmm3
+ vmovdqa %xmm7,80(%esp)
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ vmovdqa %xmm6,%xmm7
+ vpaddd %xmm2,%xmm6,%xmm6
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpxor %xmm5,%xmm3,%xmm3
+ addl 52(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ vpsrld $30,%xmm3,%xmm5
+ vmovdqa %xmm6,32(%esp)
+ addl %ebp,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpslld $2,%xmm3,%xmm3
+ addl 56(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpor %xmm5,%xmm3,%xmm3
+ addl 60(%esp),%edx
+ xorl %ebx,%ebp
+ vmovdqa 96(%esp),%xmm5
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpalignr $8,%xmm2,%xmm3,%xmm6
+ vpxor %xmm0,%xmm4,%xmm4
+ addl (%esp),%ecx
+ xorl %eax,%esi
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ vpxor %xmm5,%xmm4,%xmm4
+ vmovdqa %xmm0,96(%esp)
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ vmovdqa %xmm7,%xmm0
+ vpaddd %xmm3,%xmm7,%xmm7
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpxor %xmm6,%xmm4,%xmm4
+ addl 4(%esp),%ebx
+ xorl %edi,%ebp
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ vpsrld $30,%xmm4,%xmm6
+ vmovdqa %xmm7,48(%esp)
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpslld $2,%xmm4,%xmm4
+ addl 8(%esp),%eax
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%ebp
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpor %xmm6,%xmm4,%xmm4
+ addl 12(%esp),%edi
+ xorl %ecx,%ebp
+ vmovdqa 64(%esp),%xmm6
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpalignr $8,%xmm3,%xmm4,%xmm7
+ vpxor %xmm1,%xmm5,%xmm5
+ addl 16(%esp),%edx
+ xorl %ebx,%esi
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ vpxor %xmm6,%xmm5,%xmm5
+ vmovdqa %xmm1,64(%esp)
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ vmovdqa %xmm0,%xmm1
+ vpaddd %xmm4,%xmm0,%xmm0
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpxor %xmm7,%xmm5,%xmm5
+ addl 20(%esp),%ecx
+ xorl %eax,%ebp
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ vpsrld $30,%xmm5,%xmm7
+ vmovdqa %xmm0,(%esp)
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpslld $2,%xmm5,%xmm5
+ addl 24(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpor %xmm7,%xmm5,%xmm5
+ addl 28(%esp),%eax
+ vmovdqa 80(%esp),%xmm7
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ xorl %edx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %ecx,%esi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpalignr $8,%xmm4,%xmm5,%xmm0
+ vpxor %xmm2,%xmm6,%xmm6
+ addl 32(%esp),%edi
+ andl %ecx,%esi
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ vpxor %xmm7,%xmm6,%xmm6
+ vmovdqa %xmm2,80(%esp)
+ movl %eax,%ebp
+ xorl %ecx,%esi
+ vmovdqa %xmm1,%xmm2
+ vpaddd %xmm5,%xmm1,%xmm1
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ vpxor %xmm0,%xmm6,%xmm6
+ xorl %ebx,%ebp
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ addl 36(%esp),%edx
+ vpsrld $30,%xmm6,%xmm0
+ vmovdqa %xmm1,16(%esp)
+ andl %ebx,%ebp
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %edi,%esi
+ vpslld $2,%xmm6,%xmm6
+ xorl %ebx,%ebp
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %eax,%esi
+ xorl %ebx,%eax
+ addl %edi,%edx
+ addl 40(%esp),%ecx
+ andl %eax,%esi
+ vpor %xmm0,%xmm6,%xmm6
+ xorl %ebx,%eax
+ shrdl $7,%edi,%edi
+ vmovdqa 96(%esp),%xmm0
+ movl %edx,%ebp
+ xorl %eax,%esi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %edi,%ebp
+ xorl %eax,%edi
+ addl %edx,%ecx
+ addl 44(%esp),%ebx
+ andl %edi,%ebp
+ xorl %eax,%edi
+ shrdl $7,%edx,%edx
+ movl %ecx,%esi
+ xorl %edi,%ebp
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edx,%esi
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ vpalignr $8,%xmm5,%xmm6,%xmm1
+ vpxor %xmm3,%xmm7,%xmm7
+ addl 48(%esp),%eax
+ andl %edx,%esi
+ xorl %edi,%edx
+ shrdl $7,%ecx,%ecx
+ vpxor %xmm0,%xmm7,%xmm7
+ vmovdqa %xmm3,96(%esp)
+ movl %ebx,%ebp
+ xorl %edx,%esi
+ vmovdqa 144(%esp),%xmm3
+ vpaddd %xmm6,%xmm2,%xmm2
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ vpxor %xmm1,%xmm7,%xmm7
+ xorl %ecx,%ebp
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 52(%esp),%edi
+ vpsrld $30,%xmm7,%xmm1
+ vmovdqa %xmm2,32(%esp)
+ andl %ecx,%ebp
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%esi
+ vpslld $2,%xmm7,%xmm7
+ xorl %ecx,%ebp
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ addl 56(%esp),%edx
+ andl %ebx,%esi
+ vpor %xmm1,%xmm7,%xmm7
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ vmovdqa 64(%esp),%xmm1
+ movl %edi,%ebp
+ xorl %ebx,%esi
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ xorl %eax,%ebp
+ xorl %ebx,%eax
+ addl %edi,%edx
+ addl 60(%esp),%ecx
+ andl %eax,%ebp
+ xorl %ebx,%eax
+ shrdl $7,%edi,%edi
+ movl %edx,%esi
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %edi,%esi
+ xorl %eax,%edi
+ addl %edx,%ecx
+ vpalignr $8,%xmm6,%xmm7,%xmm2
+ vpxor %xmm4,%xmm0,%xmm0
+ addl (%esp),%ebx
+ andl %edi,%esi
+ xorl %eax,%edi
+ shrdl $7,%edx,%edx
+ vpxor %xmm1,%xmm0,%xmm0
+ vmovdqa %xmm4,64(%esp)
+ movl %ecx,%ebp
+ xorl %edi,%esi
+ vmovdqa %xmm3,%xmm4
+ vpaddd %xmm7,%xmm3,%xmm3
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ vpxor %xmm2,%xmm0,%xmm0
+ xorl %edx,%ebp
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ addl 4(%esp),%eax
+ vpsrld $30,%xmm0,%xmm2
+ vmovdqa %xmm3,48(%esp)
+ andl %edx,%ebp
+ xorl %edi,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ vpslld $2,%xmm0,%xmm0
+ xorl %edx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %ecx,%esi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 8(%esp),%edi
+ andl %ecx,%esi
+ vpor %xmm2,%xmm0,%xmm0
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ vmovdqa 80(%esp),%xmm2
+ movl %eax,%ebp
+ xorl %ecx,%esi
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ xorl %ebx,%ebp
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ addl 12(%esp),%edx
+ andl %ebx,%ebp
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %edi,%esi
+ xorl %ebx,%ebp
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %eax,%esi
+ xorl %ebx,%eax
+ addl %edi,%edx
+ vpalignr $8,%xmm7,%xmm0,%xmm3
+ vpxor %xmm5,%xmm1,%xmm1
+ addl 16(%esp),%ecx
+ andl %eax,%esi
+ xorl %ebx,%eax
+ shrdl $7,%edi,%edi
+ vpxor %xmm2,%xmm1,%xmm1
+ vmovdqa %xmm5,80(%esp)
+ movl %edx,%ebp
+ xorl %eax,%esi
+ vmovdqa %xmm4,%xmm5
+ vpaddd %xmm0,%xmm4,%xmm4
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ vpxor %xmm3,%xmm1,%xmm1
+ xorl %edi,%ebp
+ xorl %eax,%edi
+ addl %edx,%ecx
+ addl 20(%esp),%ebx
+ vpsrld $30,%xmm1,%xmm3
+ vmovdqa %xmm4,(%esp)
+ andl %edi,%ebp
+ xorl %eax,%edi
+ shrdl $7,%edx,%edx
+ movl %ecx,%esi
+ vpslld $2,%xmm1,%xmm1
+ xorl %edi,%ebp
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edx,%esi
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ addl 24(%esp),%eax
+ andl %edx,%esi
+ vpor %xmm3,%xmm1,%xmm1
+ xorl %edi,%edx
+ shrdl $7,%ecx,%ecx
+ vmovdqa 96(%esp),%xmm3
+ movl %ebx,%ebp
+ xorl %edx,%esi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %ecx,%ebp
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 28(%esp),%edi
+ andl %ecx,%ebp
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%esi
+ xorl %ecx,%ebp
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%edi
+ vpalignr $8,%xmm0,%xmm1,%xmm4
+ vpxor %xmm6,%xmm2,%xmm2
+ addl 32(%esp),%edx
+ andl %ebx,%esi
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ vpxor %xmm3,%xmm2,%xmm2
+ vmovdqa %xmm6,96(%esp)
+ movl %edi,%ebp
+ xorl %ebx,%esi
+ vmovdqa %xmm5,%xmm6
+ vpaddd %xmm1,%xmm5,%xmm5
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ vpxor %xmm4,%xmm2,%xmm2
+ xorl %eax,%ebp
+ xorl %ebx,%eax
+ addl %edi,%edx
+ addl 36(%esp),%ecx
+ vpsrld $30,%xmm2,%xmm4
+ vmovdqa %xmm5,16(%esp)
+ andl %eax,%ebp
+ xorl %ebx,%eax
+ shrdl $7,%edi,%edi
+ movl %edx,%esi
+ vpslld $2,%xmm2,%xmm2
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %edi,%esi
+ xorl %eax,%edi
+ addl %edx,%ecx
+ addl 40(%esp),%ebx
+ andl %edi,%esi
+ vpor %xmm4,%xmm2,%xmm2
+ xorl %eax,%edi
+ shrdl $7,%edx,%edx
+ vmovdqa 64(%esp),%xmm4
+ movl %ecx,%ebp
+ xorl %edi,%esi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edx,%ebp
+ xorl %edi,%edx
+ addl %ecx,%ebx
+ addl 44(%esp),%eax
+ andl %edx,%ebp
+ xorl %edi,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ xorl %edx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %edx,%esi
+ addl %ebx,%eax
+ vpalignr $8,%xmm1,%xmm2,%xmm5
+ vpxor %xmm7,%xmm3,%xmm3
+ addl 48(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ vpxor %xmm4,%xmm3,%xmm3
+ vmovdqa %xmm7,64(%esp)
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ vmovdqa %xmm6,%xmm7
+ vpaddd %xmm2,%xmm6,%xmm6
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ vpxor %xmm5,%xmm3,%xmm3
+ addl 52(%esp),%edx
+ xorl %ebx,%ebp
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ vpsrld $30,%xmm3,%xmm5
+ vmovdqa %xmm6,32(%esp)
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vpslld $2,%xmm3,%xmm3
+ addl 56(%esp),%ecx
+ xorl %eax,%esi
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vpor %xmm5,%xmm3,%xmm3
+ addl 60(%esp),%ebx
+ xorl %edi,%ebp
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl (%esp),%eax
+ vpaddd %xmm3,%xmm7,%xmm7
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ vmovdqa %xmm7,48(%esp)
+ xorl %edx,%ebp
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 4(%esp),%edi
+ xorl %ecx,%ebp
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 8(%esp),%edx
+ xorl %ebx,%esi
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ addl 12(%esp),%ecx
+ xorl %eax,%ebp
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ movl 196(%esp),%ebp
+ cmpl 200(%esp),%ebp
+ je L008done
+ vmovdqa 160(%esp),%xmm7
+ vmovdqa 176(%esp),%xmm6
+ vmovdqu (%ebp),%xmm0
+ vmovdqu 16(%ebp),%xmm1
+ vmovdqu 32(%ebp),%xmm2
+ vmovdqu 48(%ebp),%xmm3
+ addl $64,%ebp
+ vpshufb %xmm6,%xmm0,%xmm0
+ movl %ebp,196(%esp)
+ vmovdqa %xmm7,96(%esp)
+ addl 16(%esp),%ebx
+ xorl %edi,%esi
+ vpshufb %xmm6,%xmm1,%xmm1
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ vpaddd %xmm7,%xmm0,%xmm4
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vmovdqa %xmm4,(%esp)
+ addl 20(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 24(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 28(%esp),%edx
+ xorl %ebx,%ebp
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ addl 32(%esp),%ecx
+ xorl %eax,%esi
+ vpshufb %xmm6,%xmm2,%xmm2
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ vpaddd %xmm7,%xmm1,%xmm5
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ vmovdqa %xmm5,16(%esp)
+ addl 36(%esp),%ebx
+ xorl %edi,%ebp
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 40(%esp),%eax
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%ebp
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 44(%esp),%edi
+ xorl %ecx,%ebp
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 48(%esp),%edx
+ xorl %ebx,%esi
+ vpshufb %xmm6,%xmm3,%xmm3
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ vpaddd %xmm7,%xmm2,%xmm6
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ vmovdqa %xmm6,32(%esp)
+ addl 52(%esp),%ecx
+ xorl %eax,%ebp
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ addl 56(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 60(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ shrdl $7,%ecx,%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,%ebx
+ movl %ecx,8(%ebp)
+ xorl %edx,%ebx
+ movl %edx,12(%ebp)
+ movl %edi,16(%ebp)
+ movl %esi,%ebp
+ andl %ebx,%esi
+ movl %ebp,%ebx
+ jmp L007loop
+.align 4,0x90
+L008done:
+ addl 16(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 20(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 24(%esp),%edi
+ xorl %ecx,%esi
+ movl %eax,%ebp
+ shldl $5,%eax,%eax
+ addl %esi,%edi
+ xorl %ecx,%ebp
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 28(%esp),%edx
+ xorl %ebx,%ebp
+ movl %edi,%esi
+ shldl $5,%edi,%edi
+ addl %ebp,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ addl 32(%esp),%ecx
+ xorl %eax,%esi
+ movl %edx,%ebp
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%ebp
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ addl 36(%esp),%ebx
+ xorl %edi,%ebp
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %ebp,%ebx
+ xorl %edi,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 40(%esp),%eax
+ xorl %edx,%esi
+ movl %ebx,%ebp
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%ebp
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 44(%esp),%edi
+ xorl %ecx,%ebp
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %ebp,%edi
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%edi
+ addl 48(%esp),%edx
+ xorl %ebx,%esi
+ movl %edi,%ebp
+ shldl $5,%edi,%edi
+ addl %esi,%edx
+ xorl %ebx,%ebp
+ shrdl $7,%eax,%eax
+ addl %edi,%edx
+ addl 52(%esp),%ecx
+ xorl %eax,%ebp
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %ebp,%ecx
+ xorl %eax,%esi
+ shrdl $7,%edi,%edi
+ addl %edx,%ecx
+ addl 56(%esp),%ebx
+ xorl %edi,%esi
+ movl %ecx,%ebp
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edi,%ebp
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 60(%esp),%eax
+ xorl %edx,%ebp
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %ebp,%eax
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vzeroall
+ 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
diff --git a/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S b/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S
index f0ba612..841854f 100644
--- a/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S
+++ b/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S
@@ -36,11 +36,10 @@
jz L003no_xmm
andl $1073741824,%ecx
andl $268435968,%ebx
- testl $536870912,%edx
- jnz L004shaext
orl %ebx,%ecx
andl $1342177280,%ecx
cmpl $1342177280,%ecx
+ je L004AVX
testl $512,%ebx
jnz L005SSSE3
L003no_xmm:
@@ -3166,204 +3165,6 @@
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
@@ -3383,9 +3184,9 @@
movl %ecx,24(%esp)
movl %esi,28(%esp)
movdqa 256(%ebp),%xmm7
- jmp L011grand_ssse3
+ jmp L010grand_ssse3
.align 4,0x90
-L011grand_ssse3:
+L010grand_ssse3:
movdqu (%edi),%xmm0
movdqu 16(%edi),%xmm1
movdqu 32(%edi),%xmm2
@@ -3408,9 +3209,9 @@
paddd %xmm3,%xmm7
movdqa %xmm6,64(%esp)
movdqa %xmm7,80(%esp)
- jmp L012ssse3_00_47
+ jmp L011ssse3_00_47
.align 4,0x90
-L012ssse3_00_47:
+L011ssse3_00_47:
addl $64,%ebp
movl %edx,%ecx
movdqa %xmm1,%xmm4
@@ -4053,7 +3854,7 @@
addl %ecx,%eax
movdqa %xmm6,80(%esp)
cmpl $66051,64(%ebp)
- jne L012ssse3_00_47
+ jne L011ssse3_00_47
movl %edx,%ecx
rorl $14,%edx
movl 20(%esp),%esi
@@ -4567,13 +4368,1194 @@
movdqa 64(%ebp),%xmm7
subl $192,%ebp
cmpl 104(%esp),%edi
- jb L011grand_ssse3
+ jb L010grand_ssse3
movl 108(%esp),%esp
popl %edi
popl %esi
popl %ebx
popl %ebp
ret
+.align 5,0x90
+L004AVX:
+ leal -96(%esp),%esp
+ vzeroall
+ 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)
+ vmovdqa 256(%ebp),%xmm7
+ jmp L012grand_avx
+.align 5,0x90
+L012grand_avx:
+ vmovdqu (%edi),%xmm0
+ vmovdqu 16(%edi),%xmm1
+ vmovdqu 32(%edi),%xmm2
+ vmovdqu 48(%edi),%xmm3
+ addl $64,%edi
+ vpshufb %xmm7,%xmm0,%xmm0
+ movl %edi,100(%esp)
+ vpshufb %xmm7,%xmm1,%xmm1
+ vpshufb %xmm7,%xmm2,%xmm2
+ vpaddd (%ebp),%xmm0,%xmm4
+ vpshufb %xmm7,%xmm3,%xmm3
+ vpaddd 16(%ebp),%xmm1,%xmm5
+ vpaddd 32(%ebp),%xmm2,%xmm6
+ vpaddd 48(%ebp),%xmm3,%xmm7
+ vmovdqa %xmm4,32(%esp)
+ vmovdqa %xmm5,48(%esp)
+ vmovdqa %xmm6,64(%esp)
+ vmovdqa %xmm7,80(%esp)
+ jmp L013avx_00_47
+.align 4,0x90
+L013avx_00_47:
+ addl $64,%ebp
+ vpalignr $4,%xmm0,%xmm1,%xmm4
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 20(%esp),%esi
+ vpalignr $4,%xmm2,%xmm3,%xmm7
+ xorl %ecx,%edx
+ movl 24(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,16(%esp)
+ vpaddd %xmm7,%xmm0,%xmm0
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrld $3,%xmm4,%xmm7
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 4(%esp),%edi
+ vpslld $14,%xmm4,%xmm5
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,(%esp)
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 28(%esp),%edx
+ vpshufd $250,%xmm3,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpsrld $11,%xmm6,%xmm6
+ addl 32(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %edx,%ebx
+ addl 12(%esp),%edx
+ addl %ecx,%ebx
+ vpslld $11,%xmm5,%xmm5
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 16(%esp),%esi
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ecx,%edx
+ movl 20(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $10,%xmm7,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,12(%esp)
+ vpxor %xmm5,%xmm4,%xmm4
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl (%esp),%edi
+ vpaddd %xmm4,%xmm0,%xmm0
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,28(%esp)
+ vpxor %xmm5,%xmm6,%xmm6
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 24(%esp),%edx
+ vpsrlq $19,%xmm7,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ addl 36(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ vpshufd $132,%xmm6,%xmm7
+ addl %edx,%eax
+ addl 8(%esp),%edx
+ addl %ecx,%eax
+ vpsrldq $8,%xmm7,%xmm7
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 12(%esp),%esi
+ vpaddd %xmm7,%xmm0,%xmm0
+ xorl %ecx,%edx
+ movl 16(%esp),%edi
+ xorl %edi,%esi
+ vpshufd $80,%xmm0,%xmm7
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,8(%esp)
+ vpsrld $10,%xmm7,%xmm6
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 28(%esp),%edi
+ vpxor %xmm5,%xmm6,%xmm6
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,24(%esp)
+ vpsrlq $19,%xmm7,%xmm7
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 20(%esp),%edx
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpshufd $232,%xmm6,%xmm7
+ addl 40(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpslldq $8,%xmm7,%xmm7
+ addl %edx,%ebx
+ addl 4(%esp),%edx
+ addl %ecx,%ebx
+ vpaddd %xmm7,%xmm0,%xmm0
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 8(%esp),%esi
+ vpaddd (%ebp),%xmm0,%xmm6
+ xorl %ecx,%edx
+ movl 12(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,4(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 24(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,20(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 16(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 44(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl (%esp),%edx
+ addl %ecx,%eax
+ vmovdqa %xmm6,32(%esp)
+ vpalignr $4,%xmm1,%xmm2,%xmm4
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 4(%esp),%esi
+ vpalignr $4,%xmm3,%xmm0,%xmm7
+ xorl %ecx,%edx
+ movl 8(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,(%esp)
+ vpaddd %xmm7,%xmm1,%xmm1
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrld $3,%xmm4,%xmm7
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 20(%esp),%edi
+ vpslld $14,%xmm4,%xmm5
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,16(%esp)
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 12(%esp),%edx
+ vpshufd $250,%xmm0,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpsrld $11,%xmm6,%xmm6
+ addl 48(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %edx,%ebx
+ addl 28(%esp),%edx
+ addl %ecx,%ebx
+ vpslld $11,%xmm5,%xmm5
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl (%esp),%esi
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ecx,%edx
+ movl 4(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $10,%xmm7,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,28(%esp)
+ vpxor %xmm5,%xmm4,%xmm4
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 16(%esp),%edi
+ vpaddd %xmm4,%xmm1,%xmm1
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,12(%esp)
+ vpxor %xmm5,%xmm6,%xmm6
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 8(%esp),%edx
+ vpsrlq $19,%xmm7,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ addl 52(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ vpshufd $132,%xmm6,%xmm7
+ addl %edx,%eax
+ addl 24(%esp),%edx
+ addl %ecx,%eax
+ vpsrldq $8,%xmm7,%xmm7
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 28(%esp),%esi
+ vpaddd %xmm7,%xmm1,%xmm1
+ xorl %ecx,%edx
+ movl (%esp),%edi
+ xorl %edi,%esi
+ vpshufd $80,%xmm1,%xmm7
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,24(%esp)
+ vpsrld $10,%xmm7,%xmm6
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 12(%esp),%edi
+ vpxor %xmm5,%xmm6,%xmm6
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,8(%esp)
+ vpsrlq $19,%xmm7,%xmm7
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 4(%esp),%edx
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpshufd $232,%xmm6,%xmm7
+ addl 56(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpslldq $8,%xmm7,%xmm7
+ addl %edx,%ebx
+ addl 20(%esp),%edx
+ addl %ecx,%ebx
+ vpaddd %xmm7,%xmm1,%xmm1
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 24(%esp),%esi
+ vpaddd 16(%ebp),%xmm1,%xmm6
+ xorl %ecx,%edx
+ movl 28(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,20(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 8(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,4(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl (%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 60(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 16(%esp),%edx
+ addl %ecx,%eax
+ vmovdqa %xmm6,48(%esp)
+ vpalignr $4,%xmm2,%xmm3,%xmm4
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 20(%esp),%esi
+ vpalignr $4,%xmm0,%xmm1,%xmm7
+ xorl %ecx,%edx
+ movl 24(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,16(%esp)
+ vpaddd %xmm7,%xmm2,%xmm2
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrld $3,%xmm4,%xmm7
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 4(%esp),%edi
+ vpslld $14,%xmm4,%xmm5
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,(%esp)
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 28(%esp),%edx
+ vpshufd $250,%xmm1,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpsrld $11,%xmm6,%xmm6
+ addl 64(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %edx,%ebx
+ addl 12(%esp),%edx
+ addl %ecx,%ebx
+ vpslld $11,%xmm5,%xmm5
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 16(%esp),%esi
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ecx,%edx
+ movl 20(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $10,%xmm7,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,12(%esp)
+ vpxor %xmm5,%xmm4,%xmm4
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl (%esp),%edi
+ vpaddd %xmm4,%xmm2,%xmm2
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,28(%esp)
+ vpxor %xmm5,%xmm6,%xmm6
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 24(%esp),%edx
+ vpsrlq $19,%xmm7,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ addl 68(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ vpshufd $132,%xmm6,%xmm7
+ addl %edx,%eax
+ addl 8(%esp),%edx
+ addl %ecx,%eax
+ vpsrldq $8,%xmm7,%xmm7
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 12(%esp),%esi
+ vpaddd %xmm7,%xmm2,%xmm2
+ xorl %ecx,%edx
+ movl 16(%esp),%edi
+ xorl %edi,%esi
+ vpshufd $80,%xmm2,%xmm7
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,8(%esp)
+ vpsrld $10,%xmm7,%xmm6
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 28(%esp),%edi
+ vpxor %xmm5,%xmm6,%xmm6
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,24(%esp)
+ vpsrlq $19,%xmm7,%xmm7
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 20(%esp),%edx
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpshufd $232,%xmm6,%xmm7
+ addl 72(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpslldq $8,%xmm7,%xmm7
+ addl %edx,%ebx
+ addl 4(%esp),%edx
+ addl %ecx,%ebx
+ vpaddd %xmm7,%xmm2,%xmm2
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 8(%esp),%esi
+ vpaddd 32(%ebp),%xmm2,%xmm6
+ xorl %ecx,%edx
+ movl 12(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,4(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 24(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,20(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 16(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 76(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl (%esp),%edx
+ addl %ecx,%eax
+ vmovdqa %xmm6,64(%esp)
+ vpalignr $4,%xmm3,%xmm0,%xmm4
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 4(%esp),%esi
+ vpalignr $4,%xmm1,%xmm2,%xmm7
+ xorl %ecx,%edx
+ movl 8(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,(%esp)
+ vpaddd %xmm7,%xmm3,%xmm3
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrld $3,%xmm4,%xmm7
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 20(%esp),%edi
+ vpslld $14,%xmm4,%xmm5
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,16(%esp)
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 12(%esp),%edx
+ vpshufd $250,%xmm2,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpsrld $11,%xmm6,%xmm6
+ addl 80(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %edx,%ebx
+ addl 28(%esp),%edx
+ addl %ecx,%ebx
+ vpslld $11,%xmm5,%xmm5
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl (%esp),%esi
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %ecx,%edx
+ movl 4(%esp),%edi
+ xorl %edi,%esi
+ vpsrld $10,%xmm7,%xmm6
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,28(%esp)
+ vpxor %xmm5,%xmm4,%xmm4
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 16(%esp),%edi
+ vpaddd %xmm4,%xmm3,%xmm3
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,12(%esp)
+ vpxor %xmm5,%xmm6,%xmm6
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 8(%esp),%edx
+ vpsrlq $19,%xmm7,%xmm7
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ addl 84(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ vpshufd $132,%xmm6,%xmm7
+ addl %edx,%eax
+ addl 24(%esp),%edx
+ addl %ecx,%eax
+ vpsrldq $8,%xmm7,%xmm7
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 28(%esp),%esi
+ vpaddd %xmm7,%xmm3,%xmm3
+ xorl %ecx,%edx
+ movl (%esp),%edi
+ xorl %edi,%esi
+ vpshufd $80,%xmm3,%xmm7
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,24(%esp)
+ vpsrld $10,%xmm7,%xmm6
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ vpsrlq $17,%xmm7,%xmm5
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 12(%esp),%edi
+ vpxor %xmm5,%xmm6,%xmm6
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,8(%esp)
+ vpsrlq $19,%xmm7,%xmm7
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 4(%esp),%edx
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ vpshufd $232,%xmm6,%xmm7
+ addl 88(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ vpslldq $8,%xmm7,%xmm7
+ addl %edx,%ebx
+ addl 20(%esp),%edx
+ addl %ecx,%ebx
+ vpaddd %xmm7,%xmm3,%xmm3
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 24(%esp),%esi
+ vpaddd 48(%ebp),%xmm3,%xmm6
+ xorl %ecx,%edx
+ movl 28(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,20(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 8(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,4(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl (%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 92(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 16(%esp),%edx
+ addl %ecx,%eax
+ vmovdqa %xmm6,80(%esp)
+ cmpl $66051,64(%ebp)
+ jne L013avx_00_47
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 20(%esp),%esi
+ xorl %ecx,%edx
+ movl 24(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,16(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 4(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 28(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 32(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 12(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 16(%esp),%esi
+ xorl %ecx,%edx
+ movl 20(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,12(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl (%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,28(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 24(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 36(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 8(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 12(%esp),%esi
+ xorl %ecx,%edx
+ movl 16(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,8(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 28(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,24(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 20(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 40(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 4(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 8(%esp),%esi
+ xorl %ecx,%edx
+ movl 12(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,4(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 24(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,20(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 16(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 44(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl (%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 4(%esp),%esi
+ xorl %ecx,%edx
+ movl 8(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 20(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,16(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 12(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 48(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 28(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl (%esp),%esi
+ xorl %ecx,%edx
+ movl 4(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,28(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 16(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,12(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 8(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 52(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 24(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 28(%esp),%esi
+ xorl %ecx,%edx
+ movl (%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,24(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 12(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,8(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 4(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 56(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 20(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 24(%esp),%esi
+ xorl %ecx,%edx
+ movl 28(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,20(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 8(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,4(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl (%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 60(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 16(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 20(%esp),%esi
+ xorl %ecx,%edx
+ movl 24(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,16(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 4(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 28(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 64(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 12(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 16(%esp),%esi
+ xorl %ecx,%edx
+ movl 20(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,12(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl (%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,28(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 24(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 68(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 8(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 12(%esp),%esi
+ xorl %ecx,%edx
+ movl 16(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,8(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 28(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,24(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 20(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 72(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 4(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 8(%esp),%esi
+ xorl %ecx,%edx
+ movl 12(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,4(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 24(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,20(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 16(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 76(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl (%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 4(%esp),%esi
+ xorl %ecx,%edx
+ movl 8(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 20(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,16(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 12(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 80(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 28(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl (%esp),%esi
+ xorl %ecx,%edx
+ movl 4(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,28(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 16(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,12(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl 8(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 84(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%ecx
+ addl %edx,%eax
+ addl 24(%esp),%edx
+ addl %ecx,%eax
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 28(%esp),%esi
+ xorl %ecx,%edx
+ movl (%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,24(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %eax,%ecx
+ addl %edi,%edx
+ movl 12(%esp),%edi
+ movl %eax,%esi
+ shrdl $9,%ecx,%ecx
+ movl %eax,8(%esp)
+ xorl %eax,%ecx
+ xorl %edi,%eax
+ addl 4(%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %eax,%ebx
+ xorl %esi,%ecx
+ addl 88(%esp),%edx
+ xorl %edi,%ebx
+ shrdl $2,%ecx,%ecx
+ addl %edx,%ebx
+ addl 20(%esp),%edx
+ addl %ecx,%ebx
+ movl %edx,%ecx
+ shrdl $14,%edx,%edx
+ movl 24(%esp),%esi
+ xorl %ecx,%edx
+ movl 28(%esp),%edi
+ xorl %edi,%esi
+ shrdl $5,%edx,%edx
+ andl %ecx,%esi
+ movl %ecx,20(%esp)
+ xorl %ecx,%edx
+ xorl %esi,%edi
+ shrdl $6,%edx,%edx
+ movl %ebx,%ecx
+ addl %edi,%edx
+ movl 8(%esp),%edi
+ movl %ebx,%esi
+ shrdl $9,%ecx,%ecx
+ movl %ebx,4(%esp)
+ xorl %ebx,%ecx
+ xorl %edi,%ebx
+ addl (%esp),%edx
+ shrdl $11,%ecx,%ecx
+ andl %ebx,%eax
+ xorl %esi,%ecx
+ addl 92(%esp),%edx
+ xorl %edi,%eax
+ shrdl $2,%ecx,%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
+ vmovdqa 64(%ebp),%xmm7
+ subl $192,%ebp
+ cmpl 104(%esp),%edi
+ jb L012grand_avx
+ movl 108(%esp),%esp
+ vzeroall
+ 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
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
index 02f378b..b5d188a 100644
--- 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
@@ -82,8 +82,8 @@
movl 0(%r14,%rdi,8),%edi
movl 0(%r14,%rbp,8),%ebp
- andl $65280,%edi
- andl $65280,%ebp
+ andl $0x0000ff00,%edi
+ andl $0x0000ff00,%ebp
xorl %edi,%r10d
xorl %ebp,%r11d
@@ -95,8 +95,8 @@
movl 0(%r14,%rsi,8),%esi
movl 0(%r14,%rdi,8),%edi
- andl $65280,%esi
- andl $65280,%edi
+ andl $0x0000ff00,%esi
+ andl $0x0000ff00,%edi
shrl $16,%ebx
xorl %esi,%r12d
xorl %edi,%r8d
@@ -109,9 +109,9 @@
movl 0(%r14,%rdi,8),%edi
movl 0(%r14,%rbp,8),%ebp
- andl $16711680,%esi
- andl $16711680,%edi
- andl $16711680,%ebp
+ andl $0x00ff0000,%esi
+ andl $0x00ff0000,%edi
+ andl $0x00ff0000,%ebp
xorl %esi,%r10d
xorl %edi,%r11d
@@ -124,9 +124,9 @@
movl 2(%r14,%rdi,8),%edi
movl 2(%r14,%rbp,8),%ebp
- andl $16711680,%esi
- andl $4278190080,%edi
- andl $4278190080,%ebp
+ andl $0x00ff0000,%esi
+ andl $0xff000000,%edi
+ andl $0xff000000,%ebp
xorl %esi,%r8d
xorl %edi,%r10d
@@ -139,8 +139,8 @@
movl 2(%r14,%rdi,8),%edi
movl 16+0(%r15),%eax
- andl $4278190080,%esi
- andl $4278190080,%edi
+ andl $0xff000000,%esi
+ andl $0xff000000,%edi
xorl %esi,%r12d
xorl %edi,%r8d
@@ -242,8 +242,8 @@
xorl %r8d,%edx
cmpq 16(%rsp),%r15
je L$enc_compact_done
- movl $2155905152,%r10d
- movl $2155905152,%r11d
+ movl $0x80808080,%r10d
+ movl $0x80808080,%r11d
andl %eax,%r10d
andl %ebx,%r11d
movl %r10d,%esi
@@ -254,10 +254,10 @@
leal (%rbx,%rbx,1),%r9d
subl %r10d,%esi
subl %r11d,%edi
- andl $4278124286,%r8d
- andl $4278124286,%r9d
- andl $454761243,%esi
- andl $454761243,%edi
+ andl $0xfefefefe,%r8d
+ andl $0xfefefefe,%r9d
+ andl $0x1b1b1b1b,%esi
+ andl $0x1b1b1b1b,%edi
movl %eax,%r10d
movl %ebx,%r11d
xorl %esi,%r8d
@@ -265,9 +265,9 @@
xorl %r8d,%eax
xorl %r9d,%ebx
- movl $2155905152,%r12d
+ movl $0x80808080,%r12d
roll $24,%eax
- movl $2155905152,%ebp
+ movl $0x80808080,%ebp
roll $24,%ebx
andl %ecx,%r12d
andl %edx,%ebp
@@ -290,10 +290,10 @@
xorl %r10d,%eax
xorl %r11d,%ebx
- andl $4278124286,%r8d
- andl $4278124286,%r9d
- andl $454761243,%esi
- andl $454761243,%edi
+ andl $0xfefefefe,%r8d
+ andl $0xfefefefe,%r9d
+ andl $0x1b1b1b1b,%esi
+ andl $0x1b1b1b1b,%edi
movl %ecx,%r12d
movl %edx,%ebp
xorl %esi,%r8d
@@ -345,7 +345,7 @@
andq $-64,%rsp
subq %rsp,%rcx
negq %rcx
- andq $960,%rcx
+ andq $0x3c0,%rcx
subq %rcx,%rsp
subq $32,%rsp
@@ -370,7 +370,7 @@
leaq L$AES_Te+2048(%rip),%r14
leaq 768(%rsp),%rbp
subq %r14,%rbp
- andq $768,%rbp
+ andq $0x300,%rbp
leaq (%r14,%rbp,1),%r14
call _x86_64_AES_encrypt_compact
@@ -791,7 +791,7 @@
andq $-64,%rsp
subq %rsp,%rcx
negq %rcx
- andq $960,%rcx
+ andq $0x3c0,%rcx
subq %rcx,%rsp
subq $32,%rsp
@@ -816,7 +816,7 @@
leaq L$AES_Td+2048(%rip),%r14
leaq 768(%rsp),%rbp
subq %r14,%rbp
- andq $768,%rbp
+ andq $0x300,%rbp
leaq (%r14,%rbp,1),%r14
shrq $3,%rbp
addq %rbp,%r14
@@ -1333,9 +1333,9 @@
movq %r14,%r10
leaq 2304(%r14),%r11
movq %r15,%r12
- andq $4095,%r10
- andq $4095,%r11
- andq $4095,%r12
+ andq $0xFFF,%r10
+ andq $0xFFF,%r11
+ andq $0xFFF,%r12
cmpq %r11,%r12
jb L$cbc_te_break_out
@@ -1344,7 +1344,7 @@
jmp L$cbc_te_ok
L$cbc_te_break_out:
subq %r10,%r12
- andq $4095,%r12
+ andq $0xFFF,%r12
addq $320,%r12
subq %r12,%r15
.p2align 2
@@ -1370,7 +1370,7 @@
movq %r15,%r10
subq %r14,%r10
- andq $4095,%r10
+ andq $0xfff,%r10
cmpq $2304,%r10
jb L$cbc_do_ecopy
cmpq $4096-248,%r10
@@ -1557,7 +1557,7 @@
leaq -88-63(%rcx),%r10
subq %rbp,%r10
negq %r10
- andq $960,%r10
+ andq $0x3c0,%r10
subq %r10,%rbp
xchgq %rsp,%rbp
@@ -1586,7 +1586,7 @@
leaq 2048(%r14),%r14
leaq 768-8(%rsp),%rax
subq %r14,%rax
- andq $768,%rax
+ andq $0x300,%rax
leaq (%r14,%rax,1),%r14
cmpq $0,%rbx
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
index 69b22c2..3d98fa1 100644
--- 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
@@ -507,7 +507,7 @@
testl %r8d,%r8d
jz L$ecb_decrypt
- cmpq $128,%rdx
+ cmpq $0x80,%rdx
jb L$ecb_enc_tail
movdqu (%rdi),%xmm2
@@ -519,7 +519,7 @@
movdqu 96(%rdi),%xmm8
movdqu 112(%rdi),%xmm9
leaq 128(%rdi),%rdi
- subq $128,%rdx
+ subq $0x80,%rdx
jmp L$ecb_enc_loop8_enter
.p2align 4
L$ecb_enc_loop8:
@@ -547,7 +547,7 @@
call _aesni_encrypt8
- subq $128,%rdx
+ subq $0x80,%rdx
jnc L$ecb_enc_loop8
movups %xmm2,(%rsi)
@@ -561,22 +561,22 @@
movups %xmm8,96(%rsi)
movups %xmm9,112(%rsi)
leaq 128(%rsi),%rsi
- addq $128,%rdx
+ addq $0x80,%rdx
jz L$ecb_ret
L$ecb_enc_tail:
movups (%rdi),%xmm2
- cmpq $32,%rdx
+ cmpq $0x20,%rdx
jb L$ecb_enc_one
movups 16(%rdi),%xmm3
je L$ecb_enc_two
movups 32(%rdi),%xmm4
- cmpq $64,%rdx
+ cmpq $0x40,%rdx
jb L$ecb_enc_three
movups 48(%rdi),%xmm5
je L$ecb_enc_four
movups 64(%rdi),%xmm6
- cmpq $96,%rdx
+ cmpq $0x60,%rdx
jb L$ecb_enc_five
movups 80(%rdi),%xmm7
je L$ecb_enc_six
@@ -650,7 +650,7 @@
.p2align 4
L$ecb_decrypt:
- cmpq $128,%rdx
+ cmpq $0x80,%rdx
jb L$ecb_dec_tail
movdqu (%rdi),%xmm2
@@ -662,7 +662,7 @@
movdqu 96(%rdi),%xmm8
movdqu 112(%rdi),%xmm9
leaq 128(%rdi),%rdi
- subq $128,%rdx
+ subq $0x80,%rdx
jmp L$ecb_dec_loop8_enter
.p2align 4
L$ecb_dec_loop8:
@@ -691,7 +691,7 @@
call _aesni_decrypt8
movups (%r11),%xmm0
- subq $128,%rdx
+ subq $0x80,%rdx
jnc L$ecb_dec_loop8
movups %xmm2,(%rsi)
@@ -713,22 +713,22 @@
movups %xmm9,112(%rsi)
pxor %xmm9,%xmm9
leaq 128(%rsi),%rsi
- addq $128,%rdx
+ addq $0x80,%rdx
jz L$ecb_ret
L$ecb_dec_tail:
movups (%rdi),%xmm2
- cmpq $32,%rdx
+ cmpq $0x20,%rdx
jb L$ecb_dec_one
movups 16(%rdi),%xmm3
je L$ecb_dec_two
movups 32(%rdi),%xmm4
- cmpq $64,%rdx
+ cmpq $0x40,%rdx
jb L$ecb_dec_three
movups 48(%rdi),%xmm5
je L$ecb_dec_four
movups 64(%rdi),%xmm6
- cmpq $96,%rdx
+ cmpq $0x60,%rdx
jb L$ecb_dec_five
movups 80(%rdi),%xmm7
je L$ecb_dec_six
@@ -1606,7 +1606,7 @@
movdqa L$xts_magic(%rip),%xmm8
movdqa %xmm2,%xmm15
- pshufd $95,%xmm2,%xmm9
+ pshufd $0x5f,%xmm2,%xmm9
pxor %xmm0,%xmm1
movdqa %xmm9,%xmm14
paddd %xmm9,%xmm9
@@ -1705,7 +1705,7 @@
.byte 102,15,56,220,248
movups 64(%r11),%xmm0
movdqa %xmm8,80(%rsp)
- pshufd $95,%xmm15,%xmm9
+ pshufd $0x5f,%xmm15,%xmm9
jmp L$xts_enc_loop6
.p2align 5
L$xts_enc_loop6:
@@ -1844,13 +1844,13 @@
jz L$xts_enc_done
pxor %xmm0,%xmm11
- cmpq $32,%rdx
+ cmpq $0x20,%rdx
jb L$xts_enc_one
pxor %xmm0,%xmm12
je L$xts_enc_two
pxor %xmm0,%xmm13
- cmpq $64,%rdx
+ cmpq $0x40,%rdx
jb L$xts_enc_three
pxor %xmm0,%xmm14
je L$xts_enc_four
@@ -2078,7 +2078,7 @@
movdqa L$xts_magic(%rip),%xmm8
movdqa %xmm2,%xmm15
- pshufd $95,%xmm2,%xmm9
+ pshufd $0x5f,%xmm2,%xmm9
pxor %xmm0,%xmm1
movdqa %xmm9,%xmm14
paddd %xmm9,%xmm9
@@ -2177,7 +2177,7 @@
.byte 102,15,56,222,248
movups 64(%r11),%xmm0
movdqa %xmm8,80(%rsp)
- pshufd $95,%xmm15,%xmm9
+ pshufd $0x5f,%xmm15,%xmm9
jmp L$xts_dec_loop6
.p2align 5
L$xts_dec_loop6:
@@ -2317,13 +2317,13 @@
jz L$xts_dec_done
pxor %xmm0,%xmm12
- cmpq $32,%rdx
+ cmpq $0x20,%rdx
jb L$xts_dec_one
pxor %xmm0,%xmm13
je L$xts_dec_two
pxor %xmm0,%xmm14
- cmpq $64,%rdx
+ cmpq $0x40,%rdx
jb L$xts_dec_three
je L$xts_dec_four
@@ -2354,7 +2354,7 @@
pcmpgtd %xmm15,%xmm14
movdqu %xmm6,64(%rsi)
leaq 80(%rsi),%rsi
- pshufd $19,%xmm14,%xmm11
+ pshufd $0x13,%xmm14,%xmm11
andq $15,%r9
jz L$xts_dec_ret
@@ -2644,7 +2644,7 @@
leaq -8(%rax),%rbp
movups (%r8),%xmm10
movl %r10d,%eax
- cmpq $80,%rdx
+ cmpq $0x50,%rdx
jbe L$cbc_dec_tail
movups (%rcx),%xmm0
@@ -2660,14 +2660,14 @@
movdqu 80(%rdi),%xmm7
movdqa %xmm6,%xmm15
movl _OPENSSL_ia32cap_P+4(%rip),%r9d
- cmpq $112,%rdx
+ cmpq $0x70,%rdx
jbe L$cbc_dec_six_or_seven
andl $71303168,%r9d
- subq $80,%rdx
+ subq $0x50,%rdx
cmpl $4194304,%r9d
je L$cbc_dec_loop6_enter
- subq $32,%rdx
+ subq $0x20,%rdx
leaq 112(%rcx),%rcx
jmp L$cbc_dec_loop8_enter
.p2align 4
@@ -2682,7 +2682,7 @@
movups 16-112(%rcx),%xmm1
pxor %xmm0,%xmm4
xorq %r11,%r11
- cmpq $112,%rdx
+ cmpq $0x70,%rdx
pxor %xmm0,%xmm5
pxor %xmm0,%xmm6
pxor %xmm0,%xmm7
@@ -2867,21 +2867,21 @@
movups %xmm8,96(%rsi)
leaq 112(%rsi),%rsi
- subq $128,%rdx
+ subq $0x80,%rdx
ja L$cbc_dec_loop8
movaps %xmm9,%xmm2
leaq -112(%rcx),%rcx
- addq $112,%rdx
+ addq $0x70,%rdx
jle L$cbc_dec_clear_tail_collected
movups %xmm9,(%rsi)
leaq 16(%rsi),%rsi
- cmpq $80,%rdx
+ cmpq $0x50,%rdx
jbe L$cbc_dec_tail
movaps %xmm11,%xmm2
L$cbc_dec_six_or_seven:
- cmpq $96,%rdx
+ cmpq $0x60,%rdx
ja L$cbc_dec_seven
movaps %xmm7,%xmm8
@@ -2974,33 +2974,33 @@
movl %r10d,%eax
movdqu %xmm6,64(%rsi)
leaq 80(%rsi),%rsi
- subq $96,%rdx
+ subq $0x60,%rdx
ja L$cbc_dec_loop6
movdqa %xmm7,%xmm2
- addq $80,%rdx
+ addq $0x50,%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
+ subq $0x10,%rdx
jbe L$cbc_dec_one
movups 16(%rdi),%xmm3
movaps %xmm2,%xmm11
- subq $16,%rdx
+ subq $0x10,%rdx
jbe L$cbc_dec_two
movups 32(%rdi),%xmm4
movaps %xmm3,%xmm12
- subq $16,%rdx
+ subq $0x10,%rdx
jbe L$cbc_dec_three
movups 48(%rdi),%xmm5
movaps %xmm4,%xmm13
- subq $16,%rdx
+ subq $0x10,%rdx
jbe L$cbc_dec_four
movups 64(%rdi),%xmm6
@@ -3025,7 +3025,7 @@
movdqa %xmm6,%xmm2
pxor %xmm6,%xmm6
pxor %xmm7,%xmm7
- subq $16,%rdx
+ subq $0x10,%rdx
jmp L$cbc_dec_tail_collected
.p2align 4
@@ -3344,7 +3344,7 @@
pslldq $4,%xmm0
pxor %xmm3,%xmm0
- pshufd $255,%xmm0,%xmm3
+ pshufd $0xff,%xmm0,%xmm3
pxor %xmm1,%xmm3
pslldq $4,%xmm1
pxor %xmm1,%xmm3
@@ -3431,7 +3431,7 @@
decl %r10d
jz L$done_key256
- pshufd $255,%xmm0,%xmm2
+ pshufd $0xff,%xmm0,%xmm2
pxor %xmm3,%xmm3
.byte 102,15,56,221,211
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
index c2d0477..ad802e3 100644
--- 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
@@ -325,45 +325,45 @@
pxor %xmm2,%xmm5
decl %r10d
jl L$enc_done
- pshufd $147,%xmm15,%xmm7
- pshufd $147,%xmm0,%xmm8
+ pshufd $0x93,%xmm15,%xmm7
+ pshufd $0x93,%xmm0,%xmm8
pxor %xmm7,%xmm15
- pshufd $147,%xmm3,%xmm9
+ pshufd $0x93,%xmm3,%xmm9
pxor %xmm8,%xmm0
- pshufd $147,%xmm5,%xmm10
+ pshufd $0x93,%xmm5,%xmm10
pxor %xmm9,%xmm3
- pshufd $147,%xmm2,%xmm11
+ pshufd $0x93,%xmm2,%xmm11
pxor %xmm10,%xmm5
- pshufd $147,%xmm6,%xmm12
+ pshufd $0x93,%xmm6,%xmm12
pxor %xmm11,%xmm2
- pshufd $147,%xmm1,%xmm13
+ pshufd $0x93,%xmm1,%xmm13
pxor %xmm12,%xmm6
- pshufd $147,%xmm4,%xmm14
+ pshufd $0x93,%xmm4,%xmm14
pxor %xmm13,%xmm1
pxor %xmm14,%xmm4
pxor %xmm15,%xmm8
pxor %xmm4,%xmm7
pxor %xmm4,%xmm8
- pshufd $78,%xmm15,%xmm15
+ pshufd $0x4E,%xmm15,%xmm15
pxor %xmm0,%xmm9
- pshufd $78,%xmm0,%xmm0
+ pshufd $0x4E,%xmm0,%xmm0
pxor %xmm2,%xmm12
pxor %xmm7,%xmm15
pxor %xmm6,%xmm13
pxor %xmm8,%xmm0
pxor %xmm5,%xmm11
- pshufd $78,%xmm2,%xmm7
+ pshufd $0x4E,%xmm2,%xmm7
pxor %xmm1,%xmm14
- pshufd $78,%xmm6,%xmm8
+ pshufd $0x4E,%xmm6,%xmm8
pxor %xmm3,%xmm10
- pshufd $78,%xmm5,%xmm2
+ pshufd $0x4E,%xmm5,%xmm2
pxor %xmm4,%xmm10
- pshufd $78,%xmm4,%xmm6
+ pshufd $0x4E,%xmm4,%xmm6
pxor %xmm4,%xmm11
- pshufd $78,%xmm1,%xmm5
+ pshufd $0x4E,%xmm1,%xmm5
pxor %xmm11,%xmm7
- pshufd $78,%xmm3,%xmm1
+ pshufd $0x4E,%xmm3,%xmm1
pxor %xmm12,%xmm8
pxor %xmm10,%xmm2
pxor %xmm14,%xmm6
@@ -797,24 +797,24 @@
decl %r10d
jl L$dec_done
- pshufd $78,%xmm15,%xmm7
- pshufd $78,%xmm2,%xmm13
+ pshufd $0x4E,%xmm15,%xmm7
+ pshufd $0x4E,%xmm2,%xmm13
pxor %xmm15,%xmm7
- pshufd $78,%xmm4,%xmm14
+ pshufd $0x4E,%xmm4,%xmm14
pxor %xmm2,%xmm13
- pshufd $78,%xmm0,%xmm8
+ pshufd $0x4E,%xmm0,%xmm8
pxor %xmm4,%xmm14
- pshufd $78,%xmm5,%xmm9
+ pshufd $0x4E,%xmm5,%xmm9
pxor %xmm0,%xmm8
- pshufd $78,%xmm3,%xmm10
+ pshufd $0x4E,%xmm3,%xmm10
pxor %xmm5,%xmm9
pxor %xmm13,%xmm15
pxor %xmm13,%xmm0
- pshufd $78,%xmm1,%xmm11
+ pshufd $0x4E,%xmm1,%xmm11
pxor %xmm3,%xmm10
pxor %xmm7,%xmm5
pxor %xmm8,%xmm3
- pshufd $78,%xmm6,%xmm12
+ pshufd $0x4E,%xmm6,%xmm12
pxor %xmm1,%xmm11
pxor %xmm14,%xmm0
pxor %xmm9,%xmm1
@@ -828,45 +828,45 @@
pxor %xmm14,%xmm1
pxor %xmm14,%xmm6
pxor %xmm12,%xmm4
- pshufd $147,%xmm15,%xmm7
- pshufd $147,%xmm0,%xmm8
+ pshufd $0x93,%xmm15,%xmm7
+ pshufd $0x93,%xmm0,%xmm8
pxor %xmm7,%xmm15
- pshufd $147,%xmm5,%xmm9
+ pshufd $0x93,%xmm5,%xmm9
pxor %xmm8,%xmm0
- pshufd $147,%xmm3,%xmm10
+ pshufd $0x93,%xmm3,%xmm10
pxor %xmm9,%xmm5
- pshufd $147,%xmm1,%xmm11
+ pshufd $0x93,%xmm1,%xmm11
pxor %xmm10,%xmm3
- pshufd $147,%xmm6,%xmm12
+ pshufd $0x93,%xmm6,%xmm12
pxor %xmm11,%xmm1
- pshufd $147,%xmm2,%xmm13
+ pshufd $0x93,%xmm2,%xmm13
pxor %xmm12,%xmm6
- pshufd $147,%xmm4,%xmm14
+ pshufd $0x93,%xmm4,%xmm14
pxor %xmm13,%xmm2
pxor %xmm14,%xmm4
pxor %xmm15,%xmm8
pxor %xmm4,%xmm7
pxor %xmm4,%xmm8
- pshufd $78,%xmm15,%xmm15
+ pshufd $0x4E,%xmm15,%xmm15
pxor %xmm0,%xmm9
- pshufd $78,%xmm0,%xmm0
+ pshufd $0x4E,%xmm0,%xmm0
pxor %xmm1,%xmm12
pxor %xmm7,%xmm15
pxor %xmm6,%xmm13
pxor %xmm8,%xmm0
pxor %xmm3,%xmm11
- pshufd $78,%xmm1,%xmm7
+ pshufd $0x4E,%xmm1,%xmm7
pxor %xmm2,%xmm14
- pshufd $78,%xmm6,%xmm8
+ pshufd $0x4E,%xmm6,%xmm8
pxor %xmm5,%xmm10
- pshufd $78,%xmm3,%xmm1
+ pshufd $0x4E,%xmm3,%xmm1
pxor %xmm4,%xmm10
- pshufd $78,%xmm4,%xmm6
+ pshufd $0x4E,%xmm4,%xmm6
pxor %xmm4,%xmm11
- pshufd $78,%xmm2,%xmm3
+ pshufd $0x4E,%xmm2,%xmm3
pxor %xmm11,%xmm7
- pshufd $78,%xmm5,%xmm2
+ pshufd $0x4E,%xmm5,%xmm2
pxor %xmm12,%xmm8
pxor %xmm1,%xmm10
pxor %xmm14,%xmm6
@@ -1556,20 +1556,20 @@
movdqa %xmm7,(%rax)
andq $-16,%r14
- subq $128,%rsp
+ subq $0x80,%rsp
movdqa 32(%rbp),%xmm6
pxor %xmm14,%xmm14
movdqa L$xts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- subq $128,%r14
+ subq $0x80,%r14
jc L$xts_enc_short
jmp L$xts_enc_loop
.p2align 4
L$xts_enc_loop:
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm15
movdqa %xmm6,0(%rsp)
@@ -1577,7 +1577,7 @@
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm0
movdqa %xmm6,16(%rsp)
@@ -1586,7 +1586,7 @@
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
movdqu 0(%r12),%xmm7
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm1
movdqa %xmm6,32(%rsp)
@@ -1596,7 +1596,7 @@
pxor %xmm13,%xmm6
movdqu 16(%r12),%xmm8
pxor %xmm7,%xmm15
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm2
movdqa %xmm6,48(%rsp)
@@ -1606,7 +1606,7 @@
pxor %xmm13,%xmm6
movdqu 32(%r12),%xmm9
pxor %xmm8,%xmm0
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm3
movdqa %xmm6,64(%rsp)
@@ -1616,7 +1616,7 @@
pxor %xmm13,%xmm6
movdqu 48(%r12),%xmm10
pxor %xmm9,%xmm1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm4
movdqa %xmm6,80(%rsp)
@@ -1626,7 +1626,7 @@
pxor %xmm13,%xmm6
movdqu 64(%r12),%xmm11
pxor %xmm10,%xmm2
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm5
movdqa %xmm6,96(%rsp)
@@ -1670,20 +1670,20 @@
pxor %xmm14,%xmm14
movdqa L$xts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
paddq %xmm6,%xmm6
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- subq $128,%r14
+ subq $0x80,%r14
jnc L$xts_enc_loop
L$xts_enc_short:
- addq $128,%r14
+ addq $0x80,%r14
jz L$xts_enc_done
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm15
movdqa %xmm6,0(%rsp)
@@ -1691,7 +1691,7 @@
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm0
movdqa %xmm6,16(%rsp)
@@ -1702,7 +1702,7 @@
movdqu 0(%r12),%xmm7
cmpq $16,%r14
je L$xts_enc_1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm1
movdqa %xmm6,32(%rsp)
@@ -1714,7 +1714,7 @@
cmpq $32,%r14
je L$xts_enc_2
pxor %xmm7,%xmm15
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm2
movdqa %xmm6,48(%rsp)
@@ -1726,7 +1726,7 @@
cmpq $48,%r14
je L$xts_enc_3
pxor %xmm8,%xmm0
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm3
movdqa %xmm6,64(%rsp)
@@ -1738,7 +1738,7 @@
cmpq $64,%r14
je L$xts_enc_4
pxor %xmm9,%xmm1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm4
movdqa %xmm6,80(%rsp)
@@ -1750,7 +1750,7 @@
cmpq $80,%r14
je L$xts_enc_5
pxor %xmm10,%xmm2
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm5
movdqa %xmm6,96(%rsp)
@@ -2016,20 +2016,20 @@
shlq $4,%rax
subq %rax,%r14
- subq $128,%rsp
+ subq $0x80,%rsp
movdqa 32(%rbp),%xmm6
pxor %xmm14,%xmm14
movdqa L$xts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- subq $128,%r14
+ subq $0x80,%r14
jc L$xts_dec_short
jmp L$xts_dec_loop
.p2align 4
L$xts_dec_loop:
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm15
movdqa %xmm6,0(%rsp)
@@ -2037,7 +2037,7 @@
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm0
movdqa %xmm6,16(%rsp)
@@ -2046,7 +2046,7 @@
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
movdqu 0(%r12),%xmm7
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm1
movdqa %xmm6,32(%rsp)
@@ -2056,7 +2056,7 @@
pxor %xmm13,%xmm6
movdqu 16(%r12),%xmm8
pxor %xmm7,%xmm15
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm2
movdqa %xmm6,48(%rsp)
@@ -2066,7 +2066,7 @@
pxor %xmm13,%xmm6
movdqu 32(%r12),%xmm9
pxor %xmm8,%xmm0
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm3
movdqa %xmm6,64(%rsp)
@@ -2076,7 +2076,7 @@
pxor %xmm13,%xmm6
movdqu 48(%r12),%xmm10
pxor %xmm9,%xmm1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm4
movdqa %xmm6,80(%rsp)
@@ -2086,7 +2086,7 @@
pxor %xmm13,%xmm6
movdqu 64(%r12),%xmm11
pxor %xmm10,%xmm2
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm5
movdqa %xmm6,96(%rsp)
@@ -2130,20 +2130,20 @@
pxor %xmm14,%xmm14
movdqa L$xts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
paddq %xmm6,%xmm6
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- subq $128,%r14
+ subq $0x80,%r14
jnc L$xts_dec_loop
L$xts_dec_short:
- addq $128,%r14
+ addq $0x80,%r14
jz L$xts_dec_done
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm15
movdqa %xmm6,0(%rsp)
@@ -2151,7 +2151,7 @@
pand %xmm12,%xmm13
pcmpgtd %xmm6,%xmm14
pxor %xmm13,%xmm6
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm0
movdqa %xmm6,16(%rsp)
@@ -2162,7 +2162,7 @@
movdqu 0(%r12),%xmm7
cmpq $16,%r14
je L$xts_dec_1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm1
movdqa %xmm6,32(%rsp)
@@ -2174,7 +2174,7 @@
cmpq $32,%r14
je L$xts_dec_2
pxor %xmm7,%xmm15
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm2
movdqa %xmm6,48(%rsp)
@@ -2186,7 +2186,7 @@
cmpq $48,%r14
je L$xts_dec_3
pxor %xmm8,%xmm0
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm3
movdqa %xmm6,64(%rsp)
@@ -2198,7 +2198,7 @@
cmpq $64,%r14
je L$xts_dec_4
pxor %xmm9,%xmm1
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm4
movdqa %xmm6,80(%rsp)
@@ -2210,7 +2210,7 @@
cmpq $80,%r14
je L$xts_dec_5
pxor %xmm10,%xmm2
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
pxor %xmm14,%xmm14
movdqa %xmm6,%xmm5
movdqa %xmm6,96(%rsp)
@@ -2387,7 +2387,7 @@
pxor %xmm14,%xmm14
movdqa L$xts_magic(%rip),%xmm12
pcmpgtd %xmm6,%xmm14
- pshufd $19,%xmm14,%xmm13
+ pshufd $0x13,%xmm14,%xmm13
movdqa %xmm6,%xmm5
paddq %xmm6,%xmm6
pand %xmm12,%xmm13
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
index 711ea43..997cde8 100644
--- 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
@@ -61,7 +61,7 @@
addq $16,%r11
pxor %xmm0,%xmm3
.byte 102,15,56,0,193
- andq $48,%r11
+ andq $0x30,%r11
subq $1,%rax
pxor %xmm3,%xmm0
@@ -121,10 +121,10 @@
pand %xmm9,%xmm0
.byte 102,15,56,0,208
movdqa L$k_dipt+16(%rip),%xmm0
- xorq $48,%r11
+ xorq $0x30,%r11
leaq L$k_dsbd(%rip),%r10
.byte 102,15,56,0,193
- andq $48,%r11
+ andq $0x30,%r11
pxor %xmm5,%xmm2
movdqa L$k_mc_forward+48(%rip),%xmm5
pxor %xmm2,%xmm0
@@ -243,7 +243,7 @@
movdqa (%r8,%r10,1),%xmm1
.byte 102,15,56,0,217
movdqu %xmm3,(%rdx)
- xorq $48,%r8
+ xorq $0x30,%r8
L$schedule_go:
cmpl $192,%esi
@@ -333,7 +333,7 @@
call _vpaes_schedule_mangle
- pshufd $255,%xmm0,%xmm0
+ pshufd $0xFF,%xmm0,%xmm0
movdqa %xmm7,%xmm5
movdqa %xmm6,%xmm7
call _vpaes_schedule_low_round
@@ -400,8 +400,8 @@
.p2align 4
_vpaes_schedule_192_smear:
- pshufd $128,%xmm6,%xmm1
- pshufd $254,%xmm7,%xmm0
+ pshufd $0x80,%xmm6,%xmm1
+ pshufd $0xFE,%xmm7,%xmm0
pxor %xmm1,%xmm6
pxor %xmm1,%xmm1
pxor %xmm0,%xmm6
@@ -438,7 +438,7 @@
pxor %xmm1,%xmm7
- pshufd $255,%xmm0,%xmm0
+ pshufd $0xFF,%xmm0,%xmm0
.byte 102,15,58,15,192,1
@@ -597,7 +597,7 @@
movdqa (%r8,%r10,1),%xmm1
.byte 102,15,56,0,217
addq $-16,%r8
- andq $48,%r8
+ andq $0x30,%r8
movdqu %xmm3,(%rdx)
.byte 0xf3,0xc3
@@ -616,7 +616,7 @@
movl %eax,240(%rdx)
movl $0,%ecx
- movl $48,%r8d
+ movl $0x30,%r8d
call _vpaes_schedule_core
xorl %eax,%eax
.byte 0xf3,0xc3
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
index 5e9e82f..337276f 100644
--- 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
@@ -465,48 +465,94 @@
pushq %r14
pushq %r15
- movl %r9d,%r9d
- subq $128+24,%rsp
+ subq $152,%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)
+ movd %r9d,%xmm8
+ movdqa L$inc+16(%rip),%xmm1
+ movdqa L$inc(%rip),%xmm0
- shlq $32,%rax
- orq %rax,%rbx
+ pshufd $0,%xmm8,%xmm8
+ movdqa %xmm1,%xmm7
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm8,%xmm0
+ movdqa %xmm7,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm8,%xmm1
+ movdqa %xmm7,%xmm4
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm8,%xmm2
+ movdqa %xmm7,%xmm5
+ paddd %xmm3,%xmm4
+ pcmpeqd %xmm8,%xmm3
+ movdqa %xmm7,%xmm6
+ paddd %xmm4,%xmm5
+ pcmpeqd %xmm8,%xmm4
+ paddd %xmm5,%xmm6
+ pcmpeqd %xmm8,%xmm5
+ paddd %xmm6,%xmm7
+ pcmpeqd %xmm8,%xmm6
+ pcmpeqd %xmm8,%xmm7
+
+ movdqa 0(%rdx),%xmm8
+ movdqa 16(%rdx),%xmm9
+ movdqa 32(%rdx),%xmm10
+ movdqa 48(%rdx),%xmm11
+ pand %xmm0,%xmm8
+ movdqa 64(%rdx),%xmm12
+ pand %xmm1,%xmm9
+ movdqa 80(%rdx),%xmm13
+ pand %xmm2,%xmm10
+ movdqa 96(%rdx),%xmm14
+ pand %xmm3,%xmm11
+ movdqa 112(%rdx),%xmm15
+ leaq 128(%rdx),%rbp
+ pand %xmm4,%xmm12
+ pand %xmm5,%xmm13
+ pand %xmm6,%xmm14
+ pand %xmm7,%xmm15
+ por %xmm10,%xmm8
+ por %xmm11,%xmm9
+ por %xmm12,%xmm8
+ por %xmm13,%xmm9
+ por %xmm14,%xmm8
+ por %xmm15,%xmm9
+
+ por %xmm9,%xmm8
+ pshufd $0x4e,%xmm8,%xmm9
+ por %xmm9,%xmm8
+.byte 102,76,15,126,195
+
+ movq %r8,128(%rsp)
+ movq %rdi,128+8(%rsp)
+ movq %rcx,128+16(%rsp)
+
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
@@ -519,14 +565,12 @@
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
@@ -538,6 +582,35 @@
.p2align 5
L$oop_mul_gather:
+ movdqa 0(%rbp),%xmm8
+ movdqa 16(%rbp),%xmm9
+ movdqa 32(%rbp),%xmm10
+ movdqa 48(%rbp),%xmm11
+ pand %xmm0,%xmm8
+ movdqa 64(%rbp),%xmm12
+ pand %xmm1,%xmm9
+ movdqa 80(%rbp),%xmm13
+ pand %xmm2,%xmm10
+ movdqa 96(%rbp),%xmm14
+ pand %xmm3,%xmm11
+ movdqa 112(%rbp),%xmm15
+ leaq 128(%rbp),%rbp
+ pand %xmm4,%xmm12
+ pand %xmm5,%xmm13
+ pand %xmm6,%xmm14
+ pand %xmm7,%xmm15
+ por %xmm10,%xmm8
+ por %xmm11,%xmm9
+ por %xmm12,%xmm8
+ por %xmm13,%xmm9
+ por %xmm14,%xmm8
+ por %xmm15,%xmm9
+
+ por %xmm9,%xmm8
+ pshufd $0x4e,%xmm8,%xmm9
+ por %xmm9,%xmm8
+.byte 102,76,15,126,195
+
mulq %rbx
addq %rax,%r8
movq 8(%rsi),%rax
@@ -546,7 +619,6 @@
adcq $0,%r8
mulq %rbx
- movd (%rbp),%xmm4
addq %rax,%r9
movq 16(%rsi),%rax
adcq $0,%rdx
@@ -555,7 +627,6 @@
adcq $0,%r9
mulq %rbx
- movd 64(%rbp),%xmm5
addq %rax,%r10
movq 24(%rsi),%rax
adcq $0,%rdx
@@ -564,7 +635,6 @@
adcq $0,%r10
mulq %rbx
- pslldq $4,%xmm5
addq %rax,%r11
movq 32(%rsi),%rax
adcq $0,%rdx
@@ -573,7 +643,6 @@
adcq $0,%r11
mulq %rbx
- por %xmm5,%xmm4
addq %rax,%r12
movq 40(%rsi),%rax
adcq $0,%rdx
@@ -598,7 +667,6 @@
adcq $0,%r14
mulq %rbx
-.byte 102,72,15,126,227
addq %rax,%r15
movq (%rsi),%rax
adcq $0,%rdx
@@ -606,7 +674,6 @@
movq %rdx,%r15
adcq $0,%r15
- leaq 128(%rbp),%rbp
leaq 8(%rdi),%rdi
decl %ecx
@@ -621,8 +688,8 @@
movq %r14,48(%rdi)
movq %r15,56(%rdi)
-.byte 102,72,15,126,199
-.byte 102,72,15,126,205
+ movq 128+8(%rsp),%rdi
+ movq 128+16(%rsp),%rbp
movq (%rsp),%r8
movq 8(%rsp),%r9
@@ -672,7 +739,7 @@
movl %r9d,%r9d
subq $128+24,%rsp
L$mul_scatter4_body:
- leaq (%r8,%r9,4),%r8
+ leaq (%r8,%r9,8),%r8
.byte 102,72,15,110,199
.byte 102,72,15,110,202
.byte 102,73,15,110,208
@@ -708,30 +775,14 @@
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)
+ movq %r8,0(%rsi)
+ movq %r9,128(%rsi)
+ movq %r10,256(%rsi)
+ movq %r11,384(%rsi)
+ movq %r12,512(%rsi)
+ movq %r13,640(%rsi)
+ movq %r14,768(%rsi)
+ movq %r15,896(%rsi)
leaq 128+24+48(%rsp),%rax
movq -48(%rax),%r15
@@ -1086,16 +1137,14 @@
.p2align 4
_rsaz_512_scatter4:
- leaq (%rdi,%rdx,4),%rdi
+ leaq (%rdi,%rdx,8),%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)
+ movq %rax,(%rdi)
leaq 128(%rdi),%rdi
decl %r9d
jnz L$oop_scatter
@@ -1107,20 +1156,73 @@
.p2align 4
_rsaz_512_gather4:
- leaq (%rsi,%rdx,4),%rsi
+ movd %edx,%xmm8
+ movdqa L$inc+16(%rip),%xmm1
+ movdqa L$inc(%rip),%xmm0
+
+ pshufd $0,%xmm8,%xmm8
+ movdqa %xmm1,%xmm7
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm8,%xmm0
+ movdqa %xmm7,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm8,%xmm1
+ movdqa %xmm7,%xmm4
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm8,%xmm2
+ movdqa %xmm7,%xmm5
+ paddd %xmm3,%xmm4
+ pcmpeqd %xmm8,%xmm3
+ movdqa %xmm7,%xmm6
+ paddd %xmm4,%xmm5
+ pcmpeqd %xmm8,%xmm4
+ paddd %xmm5,%xmm6
+ pcmpeqd %xmm8,%xmm5
+ paddd %xmm6,%xmm7
+ pcmpeqd %xmm8,%xmm6
+ pcmpeqd %xmm8,%xmm7
movl $8,%r9d
jmp L$oop_gather
.p2align 4
L$oop_gather:
- movl (%rsi),%eax
- movl 64(%rsi),%r8d
+ movdqa 0(%rsi),%xmm8
+ movdqa 16(%rsi),%xmm9
+ movdqa 32(%rsi),%xmm10
+ movdqa 48(%rsi),%xmm11
+ pand %xmm0,%xmm8
+ movdqa 64(%rsi),%xmm12
+ pand %xmm1,%xmm9
+ movdqa 80(%rsi),%xmm13
+ pand %xmm2,%xmm10
+ movdqa 96(%rsi),%xmm14
+ pand %xmm3,%xmm11
+ movdqa 112(%rsi),%xmm15
leaq 128(%rsi),%rsi
- shlq $32,%r8
- orq %r8,%rax
- movq %rax,(%rdi)
+ pand %xmm4,%xmm12
+ pand %xmm5,%xmm13
+ pand %xmm6,%xmm14
+ pand %xmm7,%xmm15
+ por %xmm10,%xmm8
+ por %xmm11,%xmm9
+ por %xmm12,%xmm8
+ por %xmm13,%xmm9
+ por %xmm14,%xmm8
+ por %xmm15,%xmm9
+
+ por %xmm9,%xmm8
+ pshufd $0x4e,%xmm8,%xmm9
+ por %xmm9,%xmm8
+ movq %xmm8,(%rdi)
leaq 8(%rdi),%rdi
decl %r9d
jnz L$oop_gather
.byte 0xf3,0xc3
+L$SEH_end_rsaz_512_gather4:
+
+.p2align 6
+L$inc:
+.long 0,0, 1,1
+.long 2,2, 2,2
#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
index 6b9bc05..51e5d19 100644
--- 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
@@ -634,20 +634,20 @@
- leaq -64(%rsp,%r9,4),%r11
+ leaq -64(%rsp,%r9,2),%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
+ leaq -64(%rsp,%r9,2),%rsp
jmp L$sqr8x_sp_done
.p2align 5
L$sqr8x_sp_alt:
- leaq 4096-64(,%r9,4),%r10
- leaq -64(%rsp,%r9,4),%rsp
+ leaq 4096-64(,%r9,2),%r10
+ leaq -64(%rsp,%r9,2),%rsp
subq %r10,%r11
movq $0,%r10
cmovcq %r10,%r11
@@ -657,58 +657,80 @@
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
-
+.byte 102,72,15,110,209
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
+
+
+
+ leaq (%rdi,%r9,1),%rbx
+ movq %r9,%rcx
+ movq %r9,%rdx
+.byte 102,72,15,126,207
+ sarq $3+2,%rcx
+ jmp L$sqr8x_sub
.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
+L$sqr8x_sub:
+ movq 0(%rbx),%r12
+ movq 8(%rbx),%r13
+ movq 16(%rbx),%r14
+ movq 24(%rbx),%r15
+ leaq 32(%rbx),%rbx
+ sbbq 0(%rbp),%r12
+ sbbq 8(%rbp),%r13
+ sbbq 16(%rbp),%r14
+ sbbq 24(%rbp),%r15
+ leaq 32(%rbp),%rbp
+ movq %r12,0(%rdi)
+ movq %r13,8(%rdi)
+ movq %r14,16(%rdi)
+ movq %r15,24(%rdi)
+ leaq 32(%rdi),%rdi
+ incq %rcx
+ jnz L$sqr8x_sub
+
+ sbbq $0,%rax
+ leaq (%rbx,%r9,1),%rbx
+ leaq (%rdi,%r9,1),%rdi
+
+.byte 102,72,15,110,200
+ pxor %xmm0,%xmm0
+ pshufd $0,%xmm1,%xmm1
+ movq 40(%rsp),%rsi
+ jmp L$sqr8x_cond_copy
+
+.p2align 5
+L$sqr8x_cond_copy:
+ movdqa 0(%rbx),%xmm2
+ movdqa 16(%rbx),%xmm3
+ leaq 32(%rbx),%rbx
+ movdqu 0(%rdi),%xmm4
+ movdqu 16(%rdi),%xmm5
+ leaq 32(%rdi),%rdi
+ movdqa %xmm0,-32(%rbx)
+ movdqa %xmm0,-16(%rbx)
+ movdqa %xmm0,-32(%rbx,%rdx,1)
+ movdqa %xmm0,-16(%rbx,%rdx,1)
+ pcmpeqd %xmm1,%xmm0
+ pand %xmm1,%xmm2
+ pand %xmm1,%xmm3
+ pand %xmm0,%xmm4
+ pand %xmm0,%xmm5
+ pxor %xmm0,%xmm0
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqu %xmm4,-32(%rdi)
+ movdqu %xmm5,-16(%rdi)
+ addq $32,%r9
+ jnz L$sqr8x_cond_copy
movq $1,%rax
movq -48(%rsi),%r15
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
index 2e8f469..f3ad8d7 100644
--- 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
@@ -16,46 +16,151 @@
L$mul_enter:
movl %r9d,%r9d
movq %rsp,%rax
- movl 8(%rsp),%r10d
+ movd 8(%rsp),%xmm5
+ leaq L$inc(%rip),%r10
pushq %rbx
pushq %rbp
pushq %r12
pushq %r13
pushq %r14
pushq %r15
+
leaq 2(%r9),%r11
negq %r11
- leaq (%rsp,%r11,8),%rsp
+ leaq -264(%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
+ leaq 128(%rdx),%r12
+ movdqa 0(%r10),%xmm0
+ movdqa 16(%r10),%xmm1
+ leaq 24-112(%rsp,%r9,8),%r10
+ andq $-16,%r10
- 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
+ pshufd $0,%xmm5,%xmm5
+ movdqa %xmm1,%xmm4
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+.byte 0x67
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,112(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,128(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,144(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,160(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,176(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,192(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,208(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,224(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,240(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,256(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,272(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,288(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,304(%r10)
+
+ paddd %xmm2,%xmm3
+.byte 0x67
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,320(%r10)
+
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,336(%r10)
+ pand 64(%r12),%xmm0
+
+ pand 80(%r12),%xmm1
+ pand 96(%r12),%xmm2
+ movdqa %xmm3,352(%r10)
+ pand 112(%r12),%xmm3
por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa -128(%r12),%xmm4
+ movdqa -112(%r12),%xmm5
+ movdqa -96(%r12),%xmm2
+ pand 112(%r10),%xmm4
+ movdqa -80(%r12),%xmm3
+ pand 128(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 144(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 160(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa -64(%r12),%xmm4
+ movdqa -48(%r12),%xmm5
+ movdqa -32(%r12),%xmm2
+ pand 176(%r10),%xmm4
+ movdqa -16(%r12),%xmm3
+ pand 192(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 208(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 224(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa 0(%r12),%xmm4
+ movdqa 16(%r12),%xmm5
+ movdqa 32(%r12),%xmm2
+ pand 240(%r10),%xmm4
+ movdqa 48(%r12),%xmm3
+ pand 256(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 272(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 288(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ por %xmm1,%xmm0
+ pshufd $0x4e,%xmm0,%xmm1
+ por %xmm1,%xmm0
leaq 256(%r12),%r12
- por %xmm3,%xmm0
-
.byte 102,72,15,126,195
movq (%r8),%r8
@@ -64,29 +169,14 @@
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
@@ -119,14 +209,12 @@
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 %r13,-16(%rsp,%r9,8)
movq %rdx,%r13
movq %r10,%r11
@@ -140,33 +228,78 @@
jmp L$outer
.p2align 4
L$outer:
+ leaq 24+128(%rsp,%r9,8),%rdx
+ andq $-16,%rdx
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+ movdqa -128(%r12),%xmm0
+ movdqa -112(%r12),%xmm1
+ movdqa -96(%r12),%xmm2
+ movdqa -80(%r12),%xmm3
+ pand -128(%rdx),%xmm0
+ pand -112(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand -96(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand -80(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa -64(%r12),%xmm0
+ movdqa -48(%r12),%xmm1
+ movdqa -32(%r12),%xmm2
+ movdqa -16(%r12),%xmm3
+ pand -64(%rdx),%xmm0
+ pand -48(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand -32(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand -16(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 0(%r12),%xmm0
+ movdqa 16(%r12),%xmm1
+ movdqa 32(%r12),%xmm2
+ movdqa 48(%r12),%xmm3
+ pand 0(%rdx),%xmm0
+ pand 16(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand 32(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand 48(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 64(%r12),%xmm0
+ movdqa 80(%r12),%xmm1
+ movdqa 96(%r12),%xmm2
+ movdqa 112(%r12),%xmm3
+ pand 64(%rdx),%xmm0
+ pand 80(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand 96(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand 112(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ por %xmm5,%xmm4
+ pshufd $0x4e,%xmm4,%xmm0
+ por %xmm4,%xmm0
+ leaq 256(%r12),%r12
+
+ movq (%rsi),%rax
+.byte 102,72,15,126,195
+
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
@@ -202,15 +335,12 @@
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
+ movq (%rsp,%r9,8),%r10
adcq $0,%rdx
- movq %r13,-16(%rsp,%r15,8)
+ movq %r13,-16(%rsp,%r9,8)
movq %rdx,%r13
xorq %rdx,%rdx
@@ -256,6 +386,7 @@
movq 8(%rsp,%r9,8),%rsi
movq $1,%rax
+
movq -48(%rsi),%r15
movq -40(%rsi),%r14
movq -32(%rsi),%r13
@@ -278,10 +409,10 @@
pushq %r13
pushq %r14
pushq %r15
+
.byte 0x67
- movl %r9d,%r10d
shll $3,%r9d
- shll $3+2,%r10d
+ leaq (%r9,%r9,2),%r10
negq %r9
@@ -291,19 +422,21 @@
- leaq -64(%rsp,%r9,2),%r11
- subq %rsi,%r11
+
+
+ leaq -320(%rsp,%r9,2),%r11
+ subq %rdi,%r11
andq $4095,%r11
cmpq %r11,%r10
jb L$mul4xsp_alt
subq %r11,%rsp
- leaq -64(%rsp,%r9,2),%rsp
+ leaq -320(%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
+ leaq 4096-320(,%r9,2),%r10
+ leaq -320(%rsp,%r9,2),%rsp
subq %r10,%r11
movq $0,%r10
cmovcq %r10,%r11
@@ -319,6 +452,7 @@
movq 40(%rsp),%rsi
movq $1,%rax
+
movq -48(%rsi),%r15
movq -40(%rsi),%r14
movq -32(%rsi),%r13
@@ -334,47 +468,141 @@
.p2align 5
mul4x_internal:
shlq $5,%r9
- movl 8(%rax),%r10d
- leaq 256(%rdx,%r9,1),%r13
+ movd 8(%rax),%xmm5
+ leaq L$inc(%rip),%rax
+ leaq 128(%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
+ movdqa 0(%rax),%xmm0
+ movdqa 16(%rax),%xmm1
+ leaq 88-112(%rsp,%r9,1),%r10
+ leaq 128(%rdx),%r12
- 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
+ pshufd $0,%xmm5,%xmm5
+ movdqa %xmm1,%xmm4
+.byte 0x67,0x67
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
.byte 0x67
- por %xmm1,%xmm0
- movq -96(%r14),%xmm1
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,112(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,128(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,144(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,160(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,176(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,192(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,208(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,224(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,240(%r10)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,256(%r10)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,272(%r10)
+ movdqa %xmm4,%xmm2
+
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,288(%r10)
+ movdqa %xmm4,%xmm3
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,304(%r10)
+
+ paddd %xmm2,%xmm3
.byte 0x67
- pand %xmm7,%xmm3
-.byte 0x67
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,320(%r10)
+
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,336(%r10)
+ pand 64(%r12),%xmm0
+
+ pand 80(%r12),%xmm1
+ pand 96(%r12),%xmm2
+ movdqa %xmm3,352(%r10)
+ pand 112(%r12),%xmm3
por %xmm2,%xmm0
- movq -32(%r14),%xmm2
-.byte 0x67
- pand %xmm4,%xmm1
-.byte 0x67
- por %xmm3,%xmm0
- movq 32(%r14),%xmm3
-
+ por %xmm3,%xmm1
+ movdqa -128(%r12),%xmm4
+ movdqa -112(%r12),%xmm5
+ movdqa -96(%r12),%xmm2
+ pand 112(%r10),%xmm4
+ movdqa -80(%r12),%xmm3
+ pand 128(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 144(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 160(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa -64(%r12),%xmm4
+ movdqa -48(%r12),%xmm5
+ movdqa -32(%r12),%xmm2
+ pand 176(%r10),%xmm4
+ movdqa -16(%r12),%xmm3
+ pand 192(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 208(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 224(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ movdqa 0(%r12),%xmm4
+ movdqa 16(%r12),%xmm5
+ movdqa 32(%r12),%xmm2
+ pand 240(%r10),%xmm4
+ movdqa 48(%r12),%xmm3
+ pand 256(%r10),%xmm5
+ por %xmm4,%xmm0
+ pand 272(%r10),%xmm2
+ por %xmm5,%xmm1
+ pand 288(%r10),%xmm3
+ por %xmm2,%xmm0
+ por %xmm3,%xmm1
+ por %xmm1,%xmm0
+ pshufd $0x4e,%xmm0,%xmm1
+ por %xmm1,%xmm0
+ leaq 256(%r12),%r12
.byte 102,72,15,126,195
- movq 96(%r14),%xmm0
+
movq %r13,16+8(%rsp)
movq %rdi,56+8(%rsp)
@@ -388,26 +616,10 @@
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
+ leaq 64+8(%rsp),%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
@@ -416,7 +628,7 @@
mulq %rbx
addq %rax,%r11
- movq 16(%rcx),%rax
+ movq 8(%rcx),%rax
adcq $0,%rdx
movq %rdx,%r10
@@ -426,7 +638,7 @@
adcq $0,%rdx
addq %r11,%rdi
leaq 32(%r9),%r15
- leaq 64(%rcx),%rcx
+ leaq 32(%rcx),%rcx
adcq $0,%rdx
movq %rdi,(%r14)
movq %rdx,%r13
@@ -436,7 +648,7 @@
L$1st4x:
mulq %rbx
addq %rax,%r10
- movq -32(%rcx),%rax
+ movq -16(%rcx),%rax
leaq 32(%r14),%r14
adcq $0,%rdx
movq %rdx,%r11
@@ -452,7 +664,7 @@
mulq %rbx
addq %rax,%r11
- movq -16(%rcx),%rax
+ movq -8(%rcx),%rax
adcq $0,%rdx
movq %rdx,%r10
@@ -482,7 +694,7 @@
mulq %rbx
addq %rax,%r11
- movq 16(%rcx),%rax
+ movq 8(%rcx),%rax
adcq $0,%rdx
movq %rdx,%r10
@@ -491,7 +703,7 @@
movq 16(%rsi,%r15,1),%rax
adcq $0,%rdx
addq %r11,%rdi
- leaq 64(%rcx),%rcx
+ leaq 32(%rcx),%rcx
adcq $0,%rdx
movq %rdi,(%r14)
movq %rdx,%r13
@@ -501,7 +713,7 @@
mulq %rbx
addq %rax,%r10
- movq -32(%rcx),%rax
+ movq -16(%rcx),%rax
leaq 32(%r14),%r14
adcq $0,%rdx
movq %rdx,%r11
@@ -517,7 +729,7 @@
mulq %rbx
addq %rax,%r11
- movq -16(%rcx),%rax
+ movq -8(%rcx),%rax
adcq $0,%rdx
movq %rdx,%r10
@@ -530,8 +742,7 @@
movq %rdi,-16(%r14)
movq %rdx,%r13
-.byte 102,72,15,126,195
- leaq (%rcx,%r9,2),%rcx
+ leaq (%rcx,%r9,1),%rcx
xorq %rdi,%rdi
addq %r10,%r13
@@ -542,6 +753,63 @@
.p2align 5
L$outer4x:
+ leaq 16+128(%r14),%rdx
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+ movdqa -128(%r12),%xmm0
+ movdqa -112(%r12),%xmm1
+ movdqa -96(%r12),%xmm2
+ movdqa -80(%r12),%xmm3
+ pand -128(%rdx),%xmm0
+ pand -112(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand -96(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand -80(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa -64(%r12),%xmm0
+ movdqa -48(%r12),%xmm1
+ movdqa -32(%r12),%xmm2
+ movdqa -16(%r12),%xmm3
+ pand -64(%rdx),%xmm0
+ pand -48(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand -32(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand -16(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 0(%r12),%xmm0
+ movdqa 16(%r12),%xmm1
+ movdqa 32(%r12),%xmm2
+ movdqa 48(%r12),%xmm3
+ pand 0(%rdx),%xmm0
+ pand 16(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand 32(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand 48(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 64(%r12),%xmm0
+ movdqa 80(%r12),%xmm1
+ movdqa 96(%r12),%xmm2
+ movdqa 112(%r12),%xmm3
+ pand 64(%rdx),%xmm0
+ pand 80(%rdx),%xmm1
+ por %xmm0,%xmm4
+ pand 96(%rdx),%xmm2
+ por %xmm1,%xmm5
+ pand 112(%rdx),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ por %xmm5,%xmm4
+ pshufd $0x4e,%xmm4,%xmm0
+ por %xmm4,%xmm0
+ leaq 256(%r12),%r12
+.byte 102,72,15,126,195
+
movq (%r14,%r9,1),%r10
movq %r8,%rbp
mulq %rbx
@@ -549,25 +817,11 @@
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
@@ -577,7 +831,7 @@
mulq %rbx
addq %rax,%r11
- movq 16(%rcx),%rax
+ movq 8(%rcx),%rax
adcq $0,%rdx
addq 8(%r14),%r11
adcq $0,%rdx
@@ -589,7 +843,7 @@
adcq $0,%rdx
addq %r11,%rdi
leaq 32(%r9),%r15
- leaq 64(%rcx),%rcx
+ leaq 32(%rcx),%rcx
adcq $0,%rdx
movq %rdx,%r13
jmp L$inner4x
@@ -598,7 +852,7 @@
L$inner4x:
mulq %rbx
addq %rax,%r10
- movq -32(%rcx),%rax
+ movq -16(%rcx),%rax
adcq $0,%rdx
addq 16(%r14),%r10
leaq 32(%r14),%r14
@@ -616,7 +870,7 @@
mulq %rbx
addq %rax,%r11
- movq -16(%rcx),%rax
+ movq -8(%rcx),%rax
adcq $0,%rdx
addq -8(%r14),%r11
adcq $0,%rdx
@@ -650,7 +904,7 @@
mulq %rbx
addq %rax,%r11
- movq 16(%rcx),%rax
+ movq 8(%rcx),%rax
adcq $0,%rdx
addq 8(%r14),%r11
adcq $0,%rdx
@@ -661,7 +915,7 @@
movq 16(%rsi,%r15,1),%rax
adcq $0,%rdx
addq %r11,%rdi
- leaq 64(%rcx),%rcx
+ leaq 32(%rcx),%rcx
adcq $0,%rdx
movq %r13,-8(%r14)
movq %rdx,%r13
@@ -671,7 +925,7 @@
mulq %rbx
addq %rax,%r10
- movq -32(%rcx),%rax
+ movq -16(%rcx),%rax
adcq $0,%rdx
addq 16(%r14),%r10
leaq 32(%r14),%r14
@@ -690,7 +944,7 @@
mulq %rbx
addq %rax,%r11
movq %rbp,%rax
- movq -16(%rcx),%rbp
+ movq -8(%rcx),%rbp
adcq $0,%rdx
addq -8(%r14),%r11
adcq $0,%rdx
@@ -705,9 +959,8 @@
movq %r13,-24(%r14)
movq %rdx,%r13
-.byte 102,72,15,126,195
movq %rdi,-16(%r14)
- leaq (%rcx,%r9,2),%rcx
+ leaq (%rcx,%r9,1),%rcx
xorq %rdi,%rdi
addq %r10,%r13
@@ -718,16 +971,23 @@
cmpq 16+8(%rsp),%r12
jb L$outer4x
+ xorq %rax,%rax
subq %r13,%rbp
adcq %r15,%r15
orq %r15,%rdi
- xorq $1,%rdi
+ subq %rdi,%rax
leaq (%r14,%r9,1),%rbx
- leaq (%rcx,%rdi,8),%rbp
+ movq (%rcx),%r12
+ leaq (%rcx),%rbp
movq %r9,%rcx
sarq $3+2,%rcx
movq 56+8(%rsp),%rdi
- jmp L$sqr4x_sub
+ decq %r12
+ xorq %r10,%r10
+ movq 8(%rbp),%r13
+ movq 16(%rbp),%r14
+ movq 24(%rbp),%r15
+ jmp L$sqr4x_sub_entry
.globl _bn_power5
.private_extern _bn_power5
@@ -741,9 +1001,9 @@
pushq %r13
pushq %r14
pushq %r15
- movl %r9d,%r10d
+
shll $3,%r9d
- shll $3+2,%r10d
+ leal (%r9,%r9,2),%r10d
negq %r9
movq (%r8),%r8
@@ -753,19 +1013,20 @@
- leaq -64(%rsp,%r9,2),%r11
- subq %rsi,%r11
+
+ leaq -320(%rsp,%r9,2),%r11
+ subq %rdi,%r11
andq $4095,%r11
cmpq %r11,%r10
jb L$pwr_sp_alt
subq %r11,%rsp
- leaq -64(%rsp,%r9,2),%rsp
+ leaq -320(%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
+ leaq 4096-320(,%r9,2),%r10
+ leaq -320(%rsp,%r9,2),%rsp
subq %r10,%r11
movq $0,%r10
cmovcq %r10,%r11
@@ -793,10 +1054,15 @@
.byte 102,72,15,110,226
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
.byte 102,72,15,126,209
.byte 102,72,15,126,226
@@ -1341,9 +1607,9 @@
movq %rbx,-16(%rdi)
movq %r8,-8(%rdi)
.byte 102,72,15,126,213
-sqr8x_reduction:
+__bn_sqr8x_reduction:
xorq %rax,%rax
- leaq (%rbp,%r9,2),%rcx
+ leaq (%r9,%rbp,1),%rcx
leaq 48+8(%rsp,%r9,2),%rdx
movq %rcx,0+8(%rsp)
leaq 48+8(%rsp,%r9,1),%rdi
@@ -1376,14 +1642,14 @@
.p2align 5
L$8x_reduce:
mulq %rbx
- movq 16(%rbp),%rax
+ movq 8(%rbp),%rax
negq %r8
movq %rdx,%r8
adcq $0,%r8
mulq %rbx
addq %rax,%r9
- movq 32(%rbp),%rax
+ movq 16(%rbp),%rax
adcq $0,%rdx
addq %r9,%r8
movq %rbx,48-8+8(%rsp,%rcx,8)
@@ -1392,7 +1658,7 @@
mulq %rbx
addq %rax,%r10
- movq 48(%rbp),%rax
+ movq 24(%rbp),%rax
adcq $0,%rdx
addq %r10,%r9
movq 32+8(%rsp),%rsi
@@ -1401,7 +1667,7 @@
mulq %rbx
addq %rax,%r11
- movq 64(%rbp),%rax
+ movq 32(%rbp),%rax
adcq $0,%rdx
imulq %r8,%rsi
addq %r11,%r10
@@ -1410,7 +1676,7 @@
mulq %rbx
addq %rax,%r12
- movq 80(%rbp),%rax
+ movq 40(%rbp),%rax
adcq $0,%rdx
addq %r12,%r11
movq %rdx,%r12
@@ -1418,7 +1684,7 @@
mulq %rbx
addq %rax,%r13
- movq 96(%rbp),%rax
+ movq 48(%rbp),%rax
adcq $0,%rdx
addq %r13,%r12
movq %rdx,%r13
@@ -1426,7 +1692,7 @@
mulq %rbx
addq %rax,%r14
- movq 112(%rbp),%rax
+ movq 56(%rbp),%rax
adcq $0,%rdx
addq %r14,%r13
movq %rdx,%r14
@@ -1444,7 +1710,7 @@
decl %ecx
jnz L$8x_reduce
- leaq 128(%rbp),%rbp
+ leaq 64(%rbp),%rbp
xorq %rax,%rax
movq 8+8(%rsp),%rdx
cmpq 0+8(%rsp),%rbp
@@ -1470,14 +1736,14 @@
L$8x_tail:
mulq %rbx
addq %rax,%r8
- movq 16(%rbp),%rax
+ movq 8(%rbp),%rax
movq %r8,(%rdi)
movq %rdx,%r8
adcq $0,%r8
mulq %rbx
addq %rax,%r9
- movq 32(%rbp),%rax
+ movq 16(%rbp),%rax
adcq $0,%rdx
addq %r9,%r8
leaq 8(%rdi),%rdi
@@ -1486,7 +1752,7 @@
mulq %rbx
addq %rax,%r10
- movq 48(%rbp),%rax
+ movq 24(%rbp),%rax
adcq $0,%rdx
addq %r10,%r9
movq %rdx,%r10
@@ -1494,7 +1760,7 @@
mulq %rbx
addq %rax,%r11
- movq 64(%rbp),%rax
+ movq 32(%rbp),%rax
adcq $0,%rdx
addq %r11,%r10
movq %rdx,%r11
@@ -1502,7 +1768,7 @@
mulq %rbx
addq %rax,%r12
- movq 80(%rbp),%rax
+ movq 40(%rbp),%rax
adcq $0,%rdx
addq %r12,%r11
movq %rdx,%r12
@@ -1510,7 +1776,7 @@
mulq %rbx
addq %rax,%r13
- movq 96(%rbp),%rax
+ movq 48(%rbp),%rax
adcq $0,%rdx
addq %r13,%r12
movq %rdx,%r13
@@ -1518,7 +1784,7 @@
mulq %rbx
addq %rax,%r14
- movq 112(%rbp),%rax
+ movq 56(%rbp),%rax
adcq $0,%rdx
addq %r14,%r13
movq %rdx,%r14
@@ -1536,7 +1802,7 @@
decl %ecx
jnz L$8x_tail
- leaq 128(%rbp),%rbp
+ leaq 64(%rbp),%rbp
movq 8+8(%rsp),%rdx
cmpq 0+8(%rsp),%rbp
jae L$8x_tail_done
@@ -1560,6 +1826,15 @@
.p2align 5
L$8x_tail_done:
addq (%rdx),%r8
+ adcq $0,%r9
+ adcq $0,%r10
+ adcq $0,%r11
+ adcq $0,%r12
+ adcq $0,%r13
+ adcq $0,%r14
+ adcq $0,%r15
+
+
xorq %rax,%rax
negq %rsi
@@ -1573,7 +1848,7 @@
adcq 48(%rdi),%r14
adcq 56(%rdi),%r15
adcq $0,%rax
- movq -16(%rbp),%rcx
+ movq -8(%rbp),%rcx
xorq %rsi,%rsi
.byte 102,72,15,126,213
@@ -1591,40 +1866,58 @@
cmpq %rdx,%rdi
jb L$8x_reduction_loop
+ .byte 0xf3,0xc3
- 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
+__bn_post4x_internal:
+ movq 0(%rbp),%r12
+ leaq (%rdi,%r9,1),%rbx
+ movq %r9,%rcx
+.byte 102,72,15,126,207
+ negq %rax
+.byte 102,72,15,126,206
+ sarq $3+2,%rcx
+ decq %r12
+ xorq %r10,%r10
+ movq 8(%rbp),%r13
+ movq 16(%rbp),%r14
+ movq 24(%rbp),%r15
+ jmp L$sqr4x_sub_entry
+
+.p2align 4
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 0(%rbp),%r12
+ movq 8(%rbp),%r13
+ movq 16(%rbp),%r14
+ movq 24(%rbp),%r15
+L$sqr4x_sub_entry:
+ leaq 32(%rbp),%rbp
+ notq %r12
+ notq %r13
+ notq %r14
+ notq %r15
+ andq %rax,%r12
+ andq %rax,%r13
+ andq %rax,%r14
+ andq %rax,%r15
+
+ negq %r10
+ adcq 0(%rbx),%r12
+ adcq 8(%rbx),%r13
+ adcq 16(%rbx),%r14
+ adcq 24(%rbx),%r15
movq %r12,0(%rdi)
- sbbq 48(%rbp),%r15
- leaq 64(%rbp),%rbp
+ leaq 32(%rbx),%rbx
movq %r13,8(%rdi)
+ sbbq %r10,%r10
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
@@ -1651,10 +1944,9 @@
pushq %r13
pushq %r14
pushq %r15
-.byte 0x67
- movl %r9d,%r10d
+
shll $3,%r9d
- shll $3+2,%r10d
+ leaq (%r9,%r9,2),%r10
negq %r9
movq (%r8),%r8
@@ -1664,19 +1956,20 @@
- leaq -64(%rsp,%r9,2),%r11
- subq %rsi,%r11
+
+ leaq -320(%rsp,%r9,2),%r11
+ subq %rdi,%r11
andq $4095,%r11
cmpq %r11,%r10
jb L$from_sp_alt
subq %r11,%rsp
- leaq -64(%rsp,%r9,2),%rsp
+ leaq -320(%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
+ leaq 4096-320(,%r9,2),%r10
+ leaq -320(%rsp,%r9,2),%rsp
subq %r10,%r11
movq $0,%r10
cmovcq %r10,%r11
@@ -1727,7 +2020,8 @@
.byte 0x67
movq %rcx,%rbp
.byte 102,73,15,110,218
- call sqr8x_reduction
+ call __bn_sqr8x_reduction
+ call __bn_post4x_internal
pxor %xmm0,%xmm0
leaq 48(%rsp),%rax
@@ -1777,46 +2071,170 @@
.globl _bn_gather5
.private_extern _bn_gather5
-.p2align 4
+.p2align 5
_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
+L$SEH_begin_bn_gather5:
+.byte 0x4c,0x8d,0x14,0x24
+.byte 0x48,0x81,0xec,0x08,0x01,0x00,0x00
+ leaq L$inc(%rip),%rax
+ andq $-16,%rsp
+
+ movd %ecx,%xmm5
+ movdqa 0(%rax),%xmm0
+ movdqa 16(%rax),%xmm1
+ leaq 128(%rdx),%r11
+ leaq 128(%rsp),%rax
+
+ pshufd $0,%xmm5,%xmm5
+ movdqa %xmm1,%xmm4
+ movdqa %xmm1,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm4,%xmm3
+
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,-128(%rax)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,-112(%rax)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,-96(%rax)
+ movdqa %xmm4,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,-80(%rax)
+ movdqa %xmm4,%xmm3
+
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,-64(%rax)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,-48(%rax)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,-32(%rax)
+ movdqa %xmm4,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,-16(%rax)
+ movdqa %xmm4,%xmm3
+
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,0(%rax)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,16(%rax)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,32(%rax)
+ movdqa %xmm4,%xmm2
+ paddd %xmm0,%xmm1
+ pcmpeqd %xmm5,%xmm0
+ movdqa %xmm3,48(%rax)
+ movdqa %xmm4,%xmm3
+
+ paddd %xmm1,%xmm2
+ pcmpeqd %xmm5,%xmm1
+ movdqa %xmm0,64(%rax)
+ movdqa %xmm4,%xmm0
+
+ paddd %xmm2,%xmm3
+ pcmpeqd %xmm5,%xmm2
+ movdqa %xmm1,80(%rax)
+ movdqa %xmm4,%xmm1
+
+ paddd %xmm3,%xmm0
+ pcmpeqd %xmm5,%xmm3
+ movdqa %xmm2,96(%rax)
+ movdqa %xmm4,%xmm2
+ movdqa %xmm3,112(%rax)
+ jmp L$gather
+
+.p2align 5
+L$gather:
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+ movdqa -128(%r11),%xmm0
+ movdqa -112(%r11),%xmm1
+ movdqa -96(%r11),%xmm2
+ pand -128(%rax),%xmm0
+ movdqa -80(%r11),%xmm3
+ pand -112(%rax),%xmm1
+ por %xmm0,%xmm4
+ pand -96(%rax),%xmm2
+ por %xmm1,%xmm5
+ pand -80(%rax),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa -64(%r11),%xmm0
+ movdqa -48(%r11),%xmm1
+ movdqa -32(%r11),%xmm2
+ pand -64(%rax),%xmm0
+ movdqa -16(%r11),%xmm3
+ pand -48(%rax),%xmm1
+ por %xmm0,%xmm4
+ pand -32(%rax),%xmm2
+ por %xmm1,%xmm5
+ pand -16(%rax),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 0(%r11),%xmm0
+ movdqa 16(%r11),%xmm1
+ movdqa 32(%r11),%xmm2
+ pand 0(%rax),%xmm0
+ movdqa 48(%r11),%xmm3
+ pand 16(%rax),%xmm1
+ por %xmm0,%xmm4
+ pand 32(%rax),%xmm2
+ por %xmm1,%xmm5
+ pand 48(%rax),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ movdqa 64(%r11),%xmm0
+ movdqa 80(%r11),%xmm1
+ movdqa 96(%r11),%xmm2
+ pand 64(%rax),%xmm0
+ movdqa 112(%r11),%xmm3
+ pand 80(%rax),%xmm1
+ por %xmm0,%xmm4
+ pand 96(%rax),%xmm2
+ por %xmm1,%xmm5
+ pand 112(%rax),%xmm3
+ por %xmm2,%xmm4
+ por %xmm3,%xmm5
+ por %xmm5,%xmm4
+ leaq 256(%r11),%r11
+ pshufd $0x4e,%xmm4,%xmm0
+ por %xmm4,%xmm0
movq %xmm0,(%rdi)
leaq 8(%rdi),%rdi
subl $1,%esi
jnz L$gather
+
+ leaq (%r10),%rsp
.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
+L$inc:
+.long 0,0, 1,1
+.long 2,2, 2,2
.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/chacha/chacha-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/chacha/chacha-x86_64.S
new file mode 100644
index 0000000..c3554c8
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/chacha/chacha-x86_64.S
@@ -0,0 +1,1584 @@
+#if defined(__x86_64__)
+.text
+
+
+
+.p2align 6
+L$zero:
+.long 0,0,0,0
+L$one:
+.long 1,0,0,0
+L$inc:
+.long 0,1,2,3
+L$four:
+.long 4,4,4,4
+L$incy:
+.long 0,2,4,6,1,3,5,7
+L$eight:
+.long 8,8,8,8,8,8,8,8
+L$rot16:
+.byte 0x2,0x3,0x0,0x1, 0x6,0x7,0x4,0x5, 0xa,0xb,0x8,0x9, 0xe,0xf,0xc,0xd
+L$rot24:
+.byte 0x3,0x0,0x1,0x2, 0x7,0x4,0x5,0x6, 0xb,0x8,0x9,0xa, 0xf,0xc,0xd,0xe
+L$sigma:
+.byte 101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107,0
+.byte 67,104,97,67,104,97,50,48,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
+.globl _ChaCha20_ctr32
+.private_extern _ChaCha20_ctr32
+
+.p2align 6
+_ChaCha20_ctr32:
+ cmpq $0,%rdx
+ je L$no_data
+ movq _OPENSSL_ia32cap_P+4(%rip),%r10
+ testl $512,%r10d
+ jnz L$ChaCha20_ssse3
+
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ subq $64+24,%rsp
+
+
+ movdqu (%rcx),%xmm1
+ movdqu 16(%rcx),%xmm2
+ movdqu (%r8),%xmm3
+ movdqa L$one(%rip),%xmm4
+
+
+ movdqa %xmm1,16(%rsp)
+ movdqa %xmm2,32(%rsp)
+ movdqa %xmm3,48(%rsp)
+ movq %rdx,%rbp
+ jmp L$oop_outer
+
+.p2align 5
+L$oop_outer:
+ movl $0x61707865,%eax
+ movl $0x3320646e,%ebx
+ movl $0x79622d32,%ecx
+ movl $0x6b206574,%edx
+ movl 16(%rsp),%r8d
+ movl 20(%rsp),%r9d
+ movl 24(%rsp),%r10d
+ movl 28(%rsp),%r11d
+ movd %xmm3,%r12d
+ movl 52(%rsp),%r13d
+ movl 56(%rsp),%r14d
+ movl 60(%rsp),%r15d
+
+ movq %rbp,64+0(%rsp)
+ movl $10,%ebp
+ movq %rsi,64+8(%rsp)
+.byte 102,72,15,126,214
+ movq %rdi,64+16(%rsp)
+ movq %rsi,%rdi
+ shrq $32,%rdi
+ jmp L$oop
+
+.p2align 5
+L$oop:
+ addl %r8d,%eax
+ xorl %eax,%r12d
+ roll $16,%r12d
+ addl %r9d,%ebx
+ xorl %ebx,%r13d
+ roll $16,%r13d
+ addl %r12d,%esi
+ xorl %esi,%r8d
+ roll $12,%r8d
+ addl %r13d,%edi
+ xorl %edi,%r9d
+ roll $12,%r9d
+ addl %r8d,%eax
+ xorl %eax,%r12d
+ roll $8,%r12d
+ addl %r9d,%ebx
+ xorl %ebx,%r13d
+ roll $8,%r13d
+ addl %r12d,%esi
+ xorl %esi,%r8d
+ roll $7,%r8d
+ addl %r13d,%edi
+ xorl %edi,%r9d
+ roll $7,%r9d
+ movl %esi,32(%rsp)
+ movl %edi,36(%rsp)
+ movl 40(%rsp),%esi
+ movl 44(%rsp),%edi
+ addl %r10d,%ecx
+ xorl %ecx,%r14d
+ roll $16,%r14d
+ addl %r11d,%edx
+ xorl %edx,%r15d
+ roll $16,%r15d
+ addl %r14d,%esi
+ xorl %esi,%r10d
+ roll $12,%r10d
+ addl %r15d,%edi
+ xorl %edi,%r11d
+ roll $12,%r11d
+ addl %r10d,%ecx
+ xorl %ecx,%r14d
+ roll $8,%r14d
+ addl %r11d,%edx
+ xorl %edx,%r15d
+ roll $8,%r15d
+ addl %r14d,%esi
+ xorl %esi,%r10d
+ roll $7,%r10d
+ addl %r15d,%edi
+ xorl %edi,%r11d
+ roll $7,%r11d
+ addl %r9d,%eax
+ xorl %eax,%r15d
+ roll $16,%r15d
+ addl %r10d,%ebx
+ xorl %ebx,%r12d
+ roll $16,%r12d
+ addl %r15d,%esi
+ xorl %esi,%r9d
+ roll $12,%r9d
+ addl %r12d,%edi
+ xorl %edi,%r10d
+ roll $12,%r10d
+ addl %r9d,%eax
+ xorl %eax,%r15d
+ roll $8,%r15d
+ addl %r10d,%ebx
+ xorl %ebx,%r12d
+ roll $8,%r12d
+ addl %r15d,%esi
+ xorl %esi,%r9d
+ roll $7,%r9d
+ addl %r12d,%edi
+ xorl %edi,%r10d
+ roll $7,%r10d
+ movl %esi,40(%rsp)
+ movl %edi,44(%rsp)
+ movl 32(%rsp),%esi
+ movl 36(%rsp),%edi
+ addl %r11d,%ecx
+ xorl %ecx,%r13d
+ roll $16,%r13d
+ addl %r8d,%edx
+ xorl %edx,%r14d
+ roll $16,%r14d
+ addl %r13d,%esi
+ xorl %esi,%r11d
+ roll $12,%r11d
+ addl %r14d,%edi
+ xorl %edi,%r8d
+ roll $12,%r8d
+ addl %r11d,%ecx
+ xorl %ecx,%r13d
+ roll $8,%r13d
+ addl %r8d,%edx
+ xorl %edx,%r14d
+ roll $8,%r14d
+ addl %r13d,%esi
+ xorl %esi,%r11d
+ roll $7,%r11d
+ addl %r14d,%edi
+ xorl %edi,%r8d
+ roll $7,%r8d
+ decl %ebp
+ jnz L$oop
+ movl %edi,36(%rsp)
+ movl %esi,32(%rsp)
+ movq 64(%rsp),%rbp
+ movdqa %xmm2,%xmm1
+ movq 64+8(%rsp),%rsi
+ paddd %xmm4,%xmm3
+ movq 64+16(%rsp),%rdi
+
+ addl $0x61707865,%eax
+ addl $0x3320646e,%ebx
+ addl $0x79622d32,%ecx
+ addl $0x6b206574,%edx
+ addl 16(%rsp),%r8d
+ addl 20(%rsp),%r9d
+ addl 24(%rsp),%r10d
+ addl 28(%rsp),%r11d
+ addl 48(%rsp),%r12d
+ addl 52(%rsp),%r13d
+ addl 56(%rsp),%r14d
+ addl 60(%rsp),%r15d
+ paddd 32(%rsp),%xmm1
+
+ cmpq $64,%rbp
+ jb L$tail
+
+ xorl 0(%rsi),%eax
+ xorl 4(%rsi),%ebx
+ xorl 8(%rsi),%ecx
+ xorl 12(%rsi),%edx
+ xorl 16(%rsi),%r8d
+ xorl 20(%rsi),%r9d
+ xorl 24(%rsi),%r10d
+ xorl 28(%rsi),%r11d
+ movdqu 32(%rsi),%xmm0
+ xorl 48(%rsi),%r12d
+ xorl 52(%rsi),%r13d
+ xorl 56(%rsi),%r14d
+ xorl 60(%rsi),%r15d
+ leaq 64(%rsi),%rsi
+ pxor %xmm1,%xmm0
+
+ movdqa %xmm2,32(%rsp)
+ movd %xmm3,48(%rsp)
+
+ 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)
+ movdqu %xmm0,32(%rdi)
+ movl %r12d,48(%rdi)
+ movl %r13d,52(%rdi)
+ movl %r14d,56(%rdi)
+ movl %r15d,60(%rdi)
+ leaq 64(%rdi),%rdi
+
+ subq $64,%rbp
+ jnz L$oop_outer
+
+ jmp L$done
+
+.p2align 4
+L$tail:
+ movl %eax,0(%rsp)
+ movl %ebx,4(%rsp)
+ xorq %rbx,%rbx
+ movl %ecx,8(%rsp)
+ movl %edx,12(%rsp)
+ movl %r8d,16(%rsp)
+ movl %r9d,20(%rsp)
+ movl %r10d,24(%rsp)
+ movl %r11d,28(%rsp)
+ movdqa %xmm1,32(%rsp)
+ movl %r12d,48(%rsp)
+ movl %r13d,52(%rsp)
+ movl %r14d,56(%rsp)
+ movl %r15d,60(%rsp)
+
+L$oop_tail:
+ movzbl (%rsi,%rbx,1),%eax
+ movzbl (%rsp,%rbx,1),%edx
+ leaq 1(%rbx),%rbx
+ xorl %edx,%eax
+ movb %al,-1(%rdi,%rbx,1)
+ decq %rbp
+ jnz L$oop_tail
+
+L$done:
+ addq $64+24,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbp
+ popq %rbx
+L$no_data:
+ .byte 0xf3,0xc3
+
+
+.p2align 5
+ChaCha20_ssse3:
+L$ChaCha20_ssse3:
+ cmpq $128,%rdx
+ ja L$ChaCha20_4x
+
+L$do_sse3_after_all:
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+
+ subq $64+24,%rsp
+ movdqa L$sigma(%rip),%xmm0
+ movdqu (%rcx),%xmm1
+ movdqu 16(%rcx),%xmm2
+ movdqu (%r8),%xmm3
+ movdqa L$rot16(%rip),%xmm6
+ movdqa L$rot24(%rip),%xmm7
+
+ movdqa %xmm0,0(%rsp)
+ movdqa %xmm1,16(%rsp)
+ movdqa %xmm2,32(%rsp)
+ movdqa %xmm3,48(%rsp)
+ movl $10,%ebp
+ jmp L$oop_ssse3
+
+.p2align 5
+L$oop_outer_ssse3:
+ movdqa L$one(%rip),%xmm3
+ movdqa 0(%rsp),%xmm0
+ movdqa 16(%rsp),%xmm1
+ movdqa 32(%rsp),%xmm2
+ paddd 48(%rsp),%xmm3
+ movl $10,%ebp
+ movdqa %xmm3,48(%rsp)
+ jmp L$oop_ssse3
+
+.p2align 5
+L$oop_ssse3:
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,222
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $20,%xmm1
+ pslld $12,%xmm4
+ por %xmm4,%xmm1
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,223
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $25,%xmm1
+ pslld $7,%xmm4
+ por %xmm4,%xmm1
+ pshufd $78,%xmm2,%xmm2
+ pshufd $57,%xmm1,%xmm1
+ pshufd $147,%xmm3,%xmm3
+ nop
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,222
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $20,%xmm1
+ pslld $12,%xmm4
+ por %xmm4,%xmm1
+ paddd %xmm1,%xmm0
+ pxor %xmm0,%xmm3
+.byte 102,15,56,0,223
+ paddd %xmm3,%xmm2
+ pxor %xmm2,%xmm1
+ movdqa %xmm1,%xmm4
+ psrld $25,%xmm1
+ pslld $7,%xmm4
+ por %xmm4,%xmm1
+ pshufd $78,%xmm2,%xmm2
+ pshufd $147,%xmm1,%xmm1
+ pshufd $57,%xmm3,%xmm3
+ decl %ebp
+ jnz L$oop_ssse3
+ paddd 0(%rsp),%xmm0
+ paddd 16(%rsp),%xmm1
+ paddd 32(%rsp),%xmm2
+ paddd 48(%rsp),%xmm3
+
+ cmpq $64,%rdx
+ jb L$tail_ssse3
+
+ movdqu 0(%rsi),%xmm4
+ movdqu 16(%rsi),%xmm5
+ pxor %xmm4,%xmm0
+ movdqu 32(%rsi),%xmm4
+ pxor %xmm5,%xmm1
+ movdqu 48(%rsi),%xmm5
+ leaq 64(%rsi),%rsi
+ pxor %xmm4,%xmm2
+ pxor %xmm5,%xmm3
+
+ movdqu %xmm0,0(%rdi)
+ movdqu %xmm1,16(%rdi)
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm3,48(%rdi)
+ leaq 64(%rdi),%rdi
+
+ subq $64,%rdx
+ jnz L$oop_outer_ssse3
+
+ jmp L$done_ssse3
+
+.p2align 4
+L$tail_ssse3:
+ movdqa %xmm0,0(%rsp)
+ movdqa %xmm1,16(%rsp)
+ movdqa %xmm2,32(%rsp)
+ movdqa %xmm3,48(%rsp)
+ xorq %rbx,%rbx
+
+L$oop_tail_ssse3:
+ movzbl (%rsi,%rbx,1),%eax
+ movzbl (%rsp,%rbx,1),%ecx
+ leaq 1(%rbx),%rbx
+ xorl %ecx,%eax
+ movb %al,-1(%rdi,%rbx,1)
+ decq %rdx
+ jnz L$oop_tail_ssse3
+
+L$done_ssse3:
+ addq $64+24,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbp
+ popq %rbx
+ .byte 0xf3,0xc3
+
+
+.p2align 5
+ChaCha20_4x:
+L$ChaCha20_4x:
+ movq %r10,%r11
+ shrq $32,%r10
+ testq $32,%r10
+ jnz L$ChaCha20_8x
+ cmpq $192,%rdx
+ ja L$proceed4x
+
+ andq $71303168,%r11
+ cmpq $4194304,%r11
+ je L$do_sse3_after_all
+
+L$proceed4x:
+ leaq -120(%rsp),%r11
+ subq $0x148+0,%rsp
+ movdqa L$sigma(%rip),%xmm11
+ movdqu (%rcx),%xmm15
+ movdqu 16(%rcx),%xmm7
+ movdqu (%r8),%xmm3
+ leaq 256(%rsp),%rcx
+ leaq L$rot16(%rip),%r10
+ leaq L$rot24(%rip),%r11
+
+ pshufd $0x00,%xmm11,%xmm8
+ pshufd $0x55,%xmm11,%xmm9
+ movdqa %xmm8,64(%rsp)
+ pshufd $0xaa,%xmm11,%xmm10
+ movdqa %xmm9,80(%rsp)
+ pshufd $0xff,%xmm11,%xmm11
+ movdqa %xmm10,96(%rsp)
+ movdqa %xmm11,112(%rsp)
+
+ pshufd $0x00,%xmm15,%xmm12
+ pshufd $0x55,%xmm15,%xmm13
+ movdqa %xmm12,128-256(%rcx)
+ pshufd $0xaa,%xmm15,%xmm14
+ movdqa %xmm13,144-256(%rcx)
+ pshufd $0xff,%xmm15,%xmm15
+ movdqa %xmm14,160-256(%rcx)
+ movdqa %xmm15,176-256(%rcx)
+
+ pshufd $0x00,%xmm7,%xmm4
+ pshufd $0x55,%xmm7,%xmm5
+ movdqa %xmm4,192-256(%rcx)
+ pshufd $0xaa,%xmm7,%xmm6
+ movdqa %xmm5,208-256(%rcx)
+ pshufd $0xff,%xmm7,%xmm7
+ movdqa %xmm6,224-256(%rcx)
+ movdqa %xmm7,240-256(%rcx)
+
+ pshufd $0x00,%xmm3,%xmm0
+ pshufd $0x55,%xmm3,%xmm1
+ paddd L$inc(%rip),%xmm0
+ pshufd $0xaa,%xmm3,%xmm2
+ movdqa %xmm1,272-256(%rcx)
+ pshufd $0xff,%xmm3,%xmm3
+ movdqa %xmm2,288-256(%rcx)
+ movdqa %xmm3,304-256(%rcx)
+
+ jmp L$oop_enter4x
+
+.p2align 5
+L$oop_outer4x:
+ movdqa 64(%rsp),%xmm8
+ movdqa 80(%rsp),%xmm9
+ movdqa 96(%rsp),%xmm10
+ movdqa 112(%rsp),%xmm11
+ movdqa 128-256(%rcx),%xmm12
+ movdqa 144-256(%rcx),%xmm13
+ movdqa 160-256(%rcx),%xmm14
+ movdqa 176-256(%rcx),%xmm15
+ movdqa 192-256(%rcx),%xmm4
+ movdqa 208-256(%rcx),%xmm5
+ movdqa 224-256(%rcx),%xmm6
+ movdqa 240-256(%rcx),%xmm7
+ movdqa 256-256(%rcx),%xmm0
+ movdqa 272-256(%rcx),%xmm1
+ movdqa 288-256(%rcx),%xmm2
+ movdqa 304-256(%rcx),%xmm3
+ paddd L$four(%rip),%xmm0
+
+L$oop_enter4x:
+ movdqa %xmm6,32(%rsp)
+ movdqa %xmm7,48(%rsp)
+ movdqa (%r10),%xmm7
+ movl $10,%eax
+ movdqa %xmm0,256-256(%rcx)
+ jmp L$oop4x
+
+.p2align 5
+L$oop4x:
+ paddd %xmm12,%xmm8
+ paddd %xmm13,%xmm9
+ pxor %xmm8,%xmm0
+ pxor %xmm9,%xmm1
+.byte 102,15,56,0,199
+.byte 102,15,56,0,207
+ paddd %xmm0,%xmm4
+ paddd %xmm1,%xmm5
+ pxor %xmm4,%xmm12
+ pxor %xmm5,%xmm13
+ movdqa %xmm12,%xmm6
+ pslld $12,%xmm12
+ psrld $20,%xmm6
+ movdqa %xmm13,%xmm7
+ pslld $12,%xmm13
+ por %xmm6,%xmm12
+ psrld $20,%xmm7
+ movdqa (%r11),%xmm6
+ por %xmm7,%xmm13
+ paddd %xmm12,%xmm8
+ paddd %xmm13,%xmm9
+ pxor %xmm8,%xmm0
+ pxor %xmm9,%xmm1
+.byte 102,15,56,0,198
+.byte 102,15,56,0,206
+ paddd %xmm0,%xmm4
+ paddd %xmm1,%xmm5
+ pxor %xmm4,%xmm12
+ pxor %xmm5,%xmm13
+ movdqa %xmm12,%xmm7
+ pslld $7,%xmm12
+ psrld $25,%xmm7
+ movdqa %xmm13,%xmm6
+ pslld $7,%xmm13
+ por %xmm7,%xmm12
+ psrld $25,%xmm6
+ movdqa (%r10),%xmm7
+ por %xmm6,%xmm13
+ movdqa %xmm4,0(%rsp)
+ movdqa %xmm5,16(%rsp)
+ movdqa 32(%rsp),%xmm4
+ movdqa 48(%rsp),%xmm5
+ paddd %xmm14,%xmm10
+ paddd %xmm15,%xmm11
+ pxor %xmm10,%xmm2
+ pxor %xmm11,%xmm3
+.byte 102,15,56,0,215
+.byte 102,15,56,0,223
+ paddd %xmm2,%xmm4
+ paddd %xmm3,%xmm5
+ pxor %xmm4,%xmm14
+ pxor %xmm5,%xmm15
+ movdqa %xmm14,%xmm6
+ pslld $12,%xmm14
+ psrld $20,%xmm6
+ movdqa %xmm15,%xmm7
+ pslld $12,%xmm15
+ por %xmm6,%xmm14
+ psrld $20,%xmm7
+ movdqa (%r11),%xmm6
+ por %xmm7,%xmm15
+ paddd %xmm14,%xmm10
+ paddd %xmm15,%xmm11
+ pxor %xmm10,%xmm2
+ pxor %xmm11,%xmm3
+.byte 102,15,56,0,214
+.byte 102,15,56,0,222
+ paddd %xmm2,%xmm4
+ paddd %xmm3,%xmm5
+ pxor %xmm4,%xmm14
+ pxor %xmm5,%xmm15
+ movdqa %xmm14,%xmm7
+ pslld $7,%xmm14
+ psrld $25,%xmm7
+ movdqa %xmm15,%xmm6
+ pslld $7,%xmm15
+ por %xmm7,%xmm14
+ psrld $25,%xmm6
+ movdqa (%r10),%xmm7
+ por %xmm6,%xmm15
+ paddd %xmm13,%xmm8
+ paddd %xmm14,%xmm9
+ pxor %xmm8,%xmm3
+ pxor %xmm9,%xmm0
+.byte 102,15,56,0,223
+.byte 102,15,56,0,199
+ paddd %xmm3,%xmm4
+ paddd %xmm0,%xmm5
+ pxor %xmm4,%xmm13
+ pxor %xmm5,%xmm14
+ movdqa %xmm13,%xmm6
+ pslld $12,%xmm13
+ psrld $20,%xmm6
+ movdqa %xmm14,%xmm7
+ pslld $12,%xmm14
+ por %xmm6,%xmm13
+ psrld $20,%xmm7
+ movdqa (%r11),%xmm6
+ por %xmm7,%xmm14
+ paddd %xmm13,%xmm8
+ paddd %xmm14,%xmm9
+ pxor %xmm8,%xmm3
+ pxor %xmm9,%xmm0
+.byte 102,15,56,0,222
+.byte 102,15,56,0,198
+ paddd %xmm3,%xmm4
+ paddd %xmm0,%xmm5
+ pxor %xmm4,%xmm13
+ pxor %xmm5,%xmm14
+ movdqa %xmm13,%xmm7
+ pslld $7,%xmm13
+ psrld $25,%xmm7
+ movdqa %xmm14,%xmm6
+ pslld $7,%xmm14
+ por %xmm7,%xmm13
+ psrld $25,%xmm6
+ movdqa (%r10),%xmm7
+ por %xmm6,%xmm14
+ movdqa %xmm4,32(%rsp)
+ movdqa %xmm5,48(%rsp)
+ movdqa 0(%rsp),%xmm4
+ movdqa 16(%rsp),%xmm5
+ paddd %xmm15,%xmm10
+ paddd %xmm12,%xmm11
+ pxor %xmm10,%xmm1
+ pxor %xmm11,%xmm2
+.byte 102,15,56,0,207
+.byte 102,15,56,0,215
+ paddd %xmm1,%xmm4
+ paddd %xmm2,%xmm5
+ pxor %xmm4,%xmm15
+ pxor %xmm5,%xmm12
+ movdqa %xmm15,%xmm6
+ pslld $12,%xmm15
+ psrld $20,%xmm6
+ movdqa %xmm12,%xmm7
+ pslld $12,%xmm12
+ por %xmm6,%xmm15
+ psrld $20,%xmm7
+ movdqa (%r11),%xmm6
+ por %xmm7,%xmm12
+ paddd %xmm15,%xmm10
+ paddd %xmm12,%xmm11
+ pxor %xmm10,%xmm1
+ pxor %xmm11,%xmm2
+.byte 102,15,56,0,206
+.byte 102,15,56,0,214
+ paddd %xmm1,%xmm4
+ paddd %xmm2,%xmm5
+ pxor %xmm4,%xmm15
+ pxor %xmm5,%xmm12
+ movdqa %xmm15,%xmm7
+ pslld $7,%xmm15
+ psrld $25,%xmm7
+ movdqa %xmm12,%xmm6
+ pslld $7,%xmm12
+ por %xmm7,%xmm15
+ psrld $25,%xmm6
+ movdqa (%r10),%xmm7
+ por %xmm6,%xmm12
+ decl %eax
+ jnz L$oop4x
+
+ paddd 64(%rsp),%xmm8
+ paddd 80(%rsp),%xmm9
+ paddd 96(%rsp),%xmm10
+ paddd 112(%rsp),%xmm11
+
+ movdqa %xmm8,%xmm6
+ punpckldq %xmm9,%xmm8
+ movdqa %xmm10,%xmm7
+ punpckldq %xmm11,%xmm10
+ punpckhdq %xmm9,%xmm6
+ punpckhdq %xmm11,%xmm7
+ movdqa %xmm8,%xmm9
+ punpcklqdq %xmm10,%xmm8
+ movdqa %xmm6,%xmm11
+ punpcklqdq %xmm7,%xmm6
+ punpckhqdq %xmm10,%xmm9
+ punpckhqdq %xmm7,%xmm11
+ paddd 128-256(%rcx),%xmm12
+ paddd 144-256(%rcx),%xmm13
+ paddd 160-256(%rcx),%xmm14
+ paddd 176-256(%rcx),%xmm15
+
+ movdqa %xmm8,0(%rsp)
+ movdqa %xmm9,16(%rsp)
+ movdqa 32(%rsp),%xmm8
+ movdqa 48(%rsp),%xmm9
+
+ movdqa %xmm12,%xmm10
+ punpckldq %xmm13,%xmm12
+ movdqa %xmm14,%xmm7
+ punpckldq %xmm15,%xmm14
+ punpckhdq %xmm13,%xmm10
+ punpckhdq %xmm15,%xmm7
+ movdqa %xmm12,%xmm13
+ punpcklqdq %xmm14,%xmm12
+ movdqa %xmm10,%xmm15
+ punpcklqdq %xmm7,%xmm10
+ punpckhqdq %xmm14,%xmm13
+ punpckhqdq %xmm7,%xmm15
+ paddd 192-256(%rcx),%xmm4
+ paddd 208-256(%rcx),%xmm5
+ paddd 224-256(%rcx),%xmm8
+ paddd 240-256(%rcx),%xmm9
+
+ movdqa %xmm6,32(%rsp)
+ movdqa %xmm11,48(%rsp)
+
+ movdqa %xmm4,%xmm14
+ punpckldq %xmm5,%xmm4
+ movdqa %xmm8,%xmm7
+ punpckldq %xmm9,%xmm8
+ punpckhdq %xmm5,%xmm14
+ punpckhdq %xmm9,%xmm7
+ movdqa %xmm4,%xmm5
+ punpcklqdq %xmm8,%xmm4
+ movdqa %xmm14,%xmm9
+ punpcklqdq %xmm7,%xmm14
+ punpckhqdq %xmm8,%xmm5
+ punpckhqdq %xmm7,%xmm9
+ paddd 256-256(%rcx),%xmm0
+ paddd 272-256(%rcx),%xmm1
+ paddd 288-256(%rcx),%xmm2
+ paddd 304-256(%rcx),%xmm3
+
+ movdqa %xmm0,%xmm8
+ punpckldq %xmm1,%xmm0
+ movdqa %xmm2,%xmm7
+ punpckldq %xmm3,%xmm2
+ punpckhdq %xmm1,%xmm8
+ punpckhdq %xmm3,%xmm7
+ movdqa %xmm0,%xmm1
+ punpcklqdq %xmm2,%xmm0
+ movdqa %xmm8,%xmm3
+ punpcklqdq %xmm7,%xmm8
+ punpckhqdq %xmm2,%xmm1
+ punpckhqdq %xmm7,%xmm3
+ cmpq $256,%rdx
+ jb L$tail4x
+
+ movdqu 0(%rsi),%xmm6
+ movdqu 16(%rsi),%xmm11
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm7
+ pxor 0(%rsp),%xmm6
+ pxor %xmm12,%xmm11
+ pxor %xmm4,%xmm2
+ pxor %xmm0,%xmm7
+
+ movdqu %xmm6,0(%rdi)
+ movdqu 64(%rsi),%xmm6
+ movdqu %xmm11,16(%rdi)
+ movdqu 80(%rsi),%xmm11
+ movdqu %xmm2,32(%rdi)
+ movdqu 96(%rsi),%xmm2
+ movdqu %xmm7,48(%rdi)
+ movdqu 112(%rsi),%xmm7
+ leaq 128(%rsi),%rsi
+ pxor 16(%rsp),%xmm6
+ pxor %xmm13,%xmm11
+ pxor %xmm5,%xmm2
+ pxor %xmm1,%xmm7
+
+ movdqu %xmm6,64(%rdi)
+ movdqu 0(%rsi),%xmm6
+ movdqu %xmm11,80(%rdi)
+ movdqu 16(%rsi),%xmm11
+ movdqu %xmm2,96(%rdi)
+ movdqu 32(%rsi),%xmm2
+ movdqu %xmm7,112(%rdi)
+ leaq 128(%rdi),%rdi
+ movdqu 48(%rsi),%xmm7
+ pxor 32(%rsp),%xmm6
+ pxor %xmm10,%xmm11
+ pxor %xmm14,%xmm2
+ pxor %xmm8,%xmm7
+
+ movdqu %xmm6,0(%rdi)
+ movdqu 64(%rsi),%xmm6
+ movdqu %xmm11,16(%rdi)
+ movdqu 80(%rsi),%xmm11
+ movdqu %xmm2,32(%rdi)
+ movdqu 96(%rsi),%xmm2
+ movdqu %xmm7,48(%rdi)
+ movdqu 112(%rsi),%xmm7
+ leaq 128(%rsi),%rsi
+ pxor 48(%rsp),%xmm6
+ pxor %xmm15,%xmm11
+ pxor %xmm9,%xmm2
+ pxor %xmm3,%xmm7
+ movdqu %xmm6,64(%rdi)
+ movdqu %xmm11,80(%rdi)
+ movdqu %xmm2,96(%rdi)
+ movdqu %xmm7,112(%rdi)
+ leaq 128(%rdi),%rdi
+
+ subq $256,%rdx
+ jnz L$oop_outer4x
+
+ jmp L$done4x
+
+L$tail4x:
+ cmpq $192,%rdx
+ jae L$192_or_more4x
+ cmpq $128,%rdx
+ jae L$128_or_more4x
+ cmpq $64,%rdx
+ jae L$64_or_more4x
+
+
+ xorq %r10,%r10
+
+ movdqa %xmm12,16(%rsp)
+ movdqa %xmm4,32(%rsp)
+ movdqa %xmm0,48(%rsp)
+ jmp L$oop_tail4x
+
+.p2align 5
+L$64_or_more4x:
+ movdqu 0(%rsi),%xmm6
+ movdqu 16(%rsi),%xmm11
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm7
+ pxor 0(%rsp),%xmm6
+ pxor %xmm12,%xmm11
+ pxor %xmm4,%xmm2
+ pxor %xmm0,%xmm7
+ movdqu %xmm6,0(%rdi)
+ movdqu %xmm11,16(%rdi)
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm7,48(%rdi)
+ je L$done4x
+
+ movdqa 16(%rsp),%xmm6
+ leaq 64(%rsi),%rsi
+ xorq %r10,%r10
+ movdqa %xmm6,0(%rsp)
+ movdqa %xmm13,16(%rsp)
+ leaq 64(%rdi),%rdi
+ movdqa %xmm5,32(%rsp)
+ subq $64,%rdx
+ movdqa %xmm1,48(%rsp)
+ jmp L$oop_tail4x
+
+.p2align 5
+L$128_or_more4x:
+ movdqu 0(%rsi),%xmm6
+ movdqu 16(%rsi),%xmm11
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm7
+ pxor 0(%rsp),%xmm6
+ pxor %xmm12,%xmm11
+ pxor %xmm4,%xmm2
+ pxor %xmm0,%xmm7
+
+ movdqu %xmm6,0(%rdi)
+ movdqu 64(%rsi),%xmm6
+ movdqu %xmm11,16(%rdi)
+ movdqu 80(%rsi),%xmm11
+ movdqu %xmm2,32(%rdi)
+ movdqu 96(%rsi),%xmm2
+ movdqu %xmm7,48(%rdi)
+ movdqu 112(%rsi),%xmm7
+ pxor 16(%rsp),%xmm6
+ pxor %xmm13,%xmm11
+ pxor %xmm5,%xmm2
+ pxor %xmm1,%xmm7
+ movdqu %xmm6,64(%rdi)
+ movdqu %xmm11,80(%rdi)
+ movdqu %xmm2,96(%rdi)
+ movdqu %xmm7,112(%rdi)
+ je L$done4x
+
+ movdqa 32(%rsp),%xmm6
+ leaq 128(%rsi),%rsi
+ xorq %r10,%r10
+ movdqa %xmm6,0(%rsp)
+ movdqa %xmm10,16(%rsp)
+ leaq 128(%rdi),%rdi
+ movdqa %xmm14,32(%rsp)
+ subq $128,%rdx
+ movdqa %xmm8,48(%rsp)
+ jmp L$oop_tail4x
+
+.p2align 5
+L$192_or_more4x:
+ movdqu 0(%rsi),%xmm6
+ movdqu 16(%rsi),%xmm11
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm7
+ pxor 0(%rsp),%xmm6
+ pxor %xmm12,%xmm11
+ pxor %xmm4,%xmm2
+ pxor %xmm0,%xmm7
+
+ movdqu %xmm6,0(%rdi)
+ movdqu 64(%rsi),%xmm6
+ movdqu %xmm11,16(%rdi)
+ movdqu 80(%rsi),%xmm11
+ movdqu %xmm2,32(%rdi)
+ movdqu 96(%rsi),%xmm2
+ movdqu %xmm7,48(%rdi)
+ movdqu 112(%rsi),%xmm7
+ leaq 128(%rsi),%rsi
+ pxor 16(%rsp),%xmm6
+ pxor %xmm13,%xmm11
+ pxor %xmm5,%xmm2
+ pxor %xmm1,%xmm7
+
+ movdqu %xmm6,64(%rdi)
+ movdqu 0(%rsi),%xmm6
+ movdqu %xmm11,80(%rdi)
+ movdqu 16(%rsi),%xmm11
+ movdqu %xmm2,96(%rdi)
+ movdqu 32(%rsi),%xmm2
+ movdqu %xmm7,112(%rdi)
+ leaq 128(%rdi),%rdi
+ movdqu 48(%rsi),%xmm7
+ pxor 32(%rsp),%xmm6
+ pxor %xmm10,%xmm11
+ pxor %xmm14,%xmm2
+ pxor %xmm8,%xmm7
+ movdqu %xmm6,0(%rdi)
+ movdqu %xmm11,16(%rdi)
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm7,48(%rdi)
+ je L$done4x
+
+ movdqa 48(%rsp),%xmm6
+ leaq 64(%rsi),%rsi
+ xorq %r10,%r10
+ movdqa %xmm6,0(%rsp)
+ movdqa %xmm15,16(%rsp)
+ leaq 64(%rdi),%rdi
+ movdqa %xmm9,32(%rsp)
+ subq $192,%rdx
+ movdqa %xmm3,48(%rsp)
+
+L$oop_tail4x:
+ movzbl (%rsi,%r10,1),%eax
+ movzbl (%rsp,%r10,1),%ecx
+ leaq 1(%r10),%r10
+ xorl %ecx,%eax
+ movb %al,-1(%rdi,%r10,1)
+ decq %rdx
+ jnz L$oop_tail4x
+
+L$done4x:
+ addq $0x148+0,%rsp
+ .byte 0xf3,0xc3
+
+
+.p2align 5
+ChaCha20_8x:
+L$ChaCha20_8x:
+ movq %rsp,%r10
+ subq $0x280+8,%rsp
+ andq $-32,%rsp
+ vzeroupper
+ movq %r10,640(%rsp)
+
+
+
+
+
+
+
+
+
+
+ vbroadcasti128 L$sigma(%rip),%ymm11
+ vbroadcasti128 (%rcx),%ymm3
+ vbroadcasti128 16(%rcx),%ymm15
+ vbroadcasti128 (%r8),%ymm7
+ leaq 256(%rsp),%rcx
+ leaq 512(%rsp),%rax
+ leaq L$rot16(%rip),%r10
+ leaq L$rot24(%rip),%r11
+
+ vpshufd $0x00,%ymm11,%ymm8
+ vpshufd $0x55,%ymm11,%ymm9
+ vmovdqa %ymm8,128-256(%rcx)
+ vpshufd $0xaa,%ymm11,%ymm10
+ vmovdqa %ymm9,160-256(%rcx)
+ vpshufd $0xff,%ymm11,%ymm11
+ vmovdqa %ymm10,192-256(%rcx)
+ vmovdqa %ymm11,224-256(%rcx)
+
+ vpshufd $0x00,%ymm3,%ymm0
+ vpshufd $0x55,%ymm3,%ymm1
+ vmovdqa %ymm0,256-256(%rcx)
+ vpshufd $0xaa,%ymm3,%ymm2
+ vmovdqa %ymm1,288-256(%rcx)
+ vpshufd $0xff,%ymm3,%ymm3
+ vmovdqa %ymm2,320-256(%rcx)
+ vmovdqa %ymm3,352-256(%rcx)
+
+ vpshufd $0x00,%ymm15,%ymm12
+ vpshufd $0x55,%ymm15,%ymm13
+ vmovdqa %ymm12,384-512(%rax)
+ vpshufd $0xaa,%ymm15,%ymm14
+ vmovdqa %ymm13,416-512(%rax)
+ vpshufd $0xff,%ymm15,%ymm15
+ vmovdqa %ymm14,448-512(%rax)
+ vmovdqa %ymm15,480-512(%rax)
+
+ vpshufd $0x00,%ymm7,%ymm4
+ vpshufd $0x55,%ymm7,%ymm5
+ vpaddd L$incy(%rip),%ymm4,%ymm4
+ vpshufd $0xaa,%ymm7,%ymm6
+ vmovdqa %ymm5,544-512(%rax)
+ vpshufd $0xff,%ymm7,%ymm7
+ vmovdqa %ymm6,576-512(%rax)
+ vmovdqa %ymm7,608-512(%rax)
+
+ jmp L$oop_enter8x
+
+.p2align 5
+L$oop_outer8x:
+ vmovdqa 128-256(%rcx),%ymm8
+ vmovdqa 160-256(%rcx),%ymm9
+ vmovdqa 192-256(%rcx),%ymm10
+ vmovdqa 224-256(%rcx),%ymm11
+ vmovdqa 256-256(%rcx),%ymm0
+ vmovdqa 288-256(%rcx),%ymm1
+ vmovdqa 320-256(%rcx),%ymm2
+ vmovdqa 352-256(%rcx),%ymm3
+ vmovdqa 384-512(%rax),%ymm12
+ vmovdqa 416-512(%rax),%ymm13
+ vmovdqa 448-512(%rax),%ymm14
+ vmovdqa 480-512(%rax),%ymm15
+ vmovdqa 512-512(%rax),%ymm4
+ vmovdqa 544-512(%rax),%ymm5
+ vmovdqa 576-512(%rax),%ymm6
+ vmovdqa 608-512(%rax),%ymm7
+ vpaddd L$eight(%rip),%ymm4,%ymm4
+
+L$oop_enter8x:
+ vmovdqa %ymm14,64(%rsp)
+ vmovdqa %ymm15,96(%rsp)
+ vbroadcasti128 (%r10),%ymm15
+ vmovdqa %ymm4,512-512(%rax)
+ movl $10,%eax
+ jmp L$oop8x
+
+.p2align 5
+L$oop8x:
+ vpaddd %ymm0,%ymm8,%ymm8
+ vpxor %ymm4,%ymm8,%ymm4
+ vpshufb %ymm15,%ymm4,%ymm4
+ vpaddd %ymm1,%ymm9,%ymm9
+ vpxor %ymm5,%ymm9,%ymm5
+ vpshufb %ymm15,%ymm5,%ymm5
+ vpaddd %ymm4,%ymm12,%ymm12
+ vpxor %ymm0,%ymm12,%ymm0
+ vpslld $12,%ymm0,%ymm14
+ vpsrld $20,%ymm0,%ymm0
+ vpor %ymm0,%ymm14,%ymm0
+ vbroadcasti128 (%r11),%ymm14
+ vpaddd %ymm5,%ymm13,%ymm13
+ vpxor %ymm1,%ymm13,%ymm1
+ vpslld $12,%ymm1,%ymm15
+ vpsrld $20,%ymm1,%ymm1
+ vpor %ymm1,%ymm15,%ymm1
+ vpaddd %ymm0,%ymm8,%ymm8
+ vpxor %ymm4,%ymm8,%ymm4
+ vpshufb %ymm14,%ymm4,%ymm4
+ vpaddd %ymm1,%ymm9,%ymm9
+ vpxor %ymm5,%ymm9,%ymm5
+ vpshufb %ymm14,%ymm5,%ymm5
+ vpaddd %ymm4,%ymm12,%ymm12
+ vpxor %ymm0,%ymm12,%ymm0
+ vpslld $7,%ymm0,%ymm15
+ vpsrld $25,%ymm0,%ymm0
+ vpor %ymm0,%ymm15,%ymm0
+ vbroadcasti128 (%r10),%ymm15
+ vpaddd %ymm5,%ymm13,%ymm13
+ vpxor %ymm1,%ymm13,%ymm1
+ vpslld $7,%ymm1,%ymm14
+ vpsrld $25,%ymm1,%ymm1
+ vpor %ymm1,%ymm14,%ymm1
+ vmovdqa %ymm12,0(%rsp)
+ vmovdqa %ymm13,32(%rsp)
+ vmovdqa 64(%rsp),%ymm12
+ vmovdqa 96(%rsp),%ymm13
+ vpaddd %ymm2,%ymm10,%ymm10
+ vpxor %ymm6,%ymm10,%ymm6
+ vpshufb %ymm15,%ymm6,%ymm6
+ vpaddd %ymm3,%ymm11,%ymm11
+ vpxor %ymm7,%ymm11,%ymm7
+ vpshufb %ymm15,%ymm7,%ymm7
+ vpaddd %ymm6,%ymm12,%ymm12
+ vpxor %ymm2,%ymm12,%ymm2
+ vpslld $12,%ymm2,%ymm14
+ vpsrld $20,%ymm2,%ymm2
+ vpor %ymm2,%ymm14,%ymm2
+ vbroadcasti128 (%r11),%ymm14
+ vpaddd %ymm7,%ymm13,%ymm13
+ vpxor %ymm3,%ymm13,%ymm3
+ vpslld $12,%ymm3,%ymm15
+ vpsrld $20,%ymm3,%ymm3
+ vpor %ymm3,%ymm15,%ymm3
+ vpaddd %ymm2,%ymm10,%ymm10
+ vpxor %ymm6,%ymm10,%ymm6
+ vpshufb %ymm14,%ymm6,%ymm6
+ vpaddd %ymm3,%ymm11,%ymm11
+ vpxor %ymm7,%ymm11,%ymm7
+ vpshufb %ymm14,%ymm7,%ymm7
+ vpaddd %ymm6,%ymm12,%ymm12
+ vpxor %ymm2,%ymm12,%ymm2
+ vpslld $7,%ymm2,%ymm15
+ vpsrld $25,%ymm2,%ymm2
+ vpor %ymm2,%ymm15,%ymm2
+ vbroadcasti128 (%r10),%ymm15
+ vpaddd %ymm7,%ymm13,%ymm13
+ vpxor %ymm3,%ymm13,%ymm3
+ vpslld $7,%ymm3,%ymm14
+ vpsrld $25,%ymm3,%ymm3
+ vpor %ymm3,%ymm14,%ymm3
+ vpaddd %ymm1,%ymm8,%ymm8
+ vpxor %ymm7,%ymm8,%ymm7
+ vpshufb %ymm15,%ymm7,%ymm7
+ vpaddd %ymm2,%ymm9,%ymm9
+ vpxor %ymm4,%ymm9,%ymm4
+ vpshufb %ymm15,%ymm4,%ymm4
+ vpaddd %ymm7,%ymm12,%ymm12
+ vpxor %ymm1,%ymm12,%ymm1
+ vpslld $12,%ymm1,%ymm14
+ vpsrld $20,%ymm1,%ymm1
+ vpor %ymm1,%ymm14,%ymm1
+ vbroadcasti128 (%r11),%ymm14
+ vpaddd %ymm4,%ymm13,%ymm13
+ vpxor %ymm2,%ymm13,%ymm2
+ vpslld $12,%ymm2,%ymm15
+ vpsrld $20,%ymm2,%ymm2
+ vpor %ymm2,%ymm15,%ymm2
+ vpaddd %ymm1,%ymm8,%ymm8
+ vpxor %ymm7,%ymm8,%ymm7
+ vpshufb %ymm14,%ymm7,%ymm7
+ vpaddd %ymm2,%ymm9,%ymm9
+ vpxor %ymm4,%ymm9,%ymm4
+ vpshufb %ymm14,%ymm4,%ymm4
+ vpaddd %ymm7,%ymm12,%ymm12
+ vpxor %ymm1,%ymm12,%ymm1
+ vpslld $7,%ymm1,%ymm15
+ vpsrld $25,%ymm1,%ymm1
+ vpor %ymm1,%ymm15,%ymm1
+ vbroadcasti128 (%r10),%ymm15
+ vpaddd %ymm4,%ymm13,%ymm13
+ vpxor %ymm2,%ymm13,%ymm2
+ vpslld $7,%ymm2,%ymm14
+ vpsrld $25,%ymm2,%ymm2
+ vpor %ymm2,%ymm14,%ymm2
+ vmovdqa %ymm12,64(%rsp)
+ vmovdqa %ymm13,96(%rsp)
+ vmovdqa 0(%rsp),%ymm12
+ vmovdqa 32(%rsp),%ymm13
+ vpaddd %ymm3,%ymm10,%ymm10
+ vpxor %ymm5,%ymm10,%ymm5
+ vpshufb %ymm15,%ymm5,%ymm5
+ vpaddd %ymm0,%ymm11,%ymm11
+ vpxor %ymm6,%ymm11,%ymm6
+ vpshufb %ymm15,%ymm6,%ymm6
+ vpaddd %ymm5,%ymm12,%ymm12
+ vpxor %ymm3,%ymm12,%ymm3
+ vpslld $12,%ymm3,%ymm14
+ vpsrld $20,%ymm3,%ymm3
+ vpor %ymm3,%ymm14,%ymm3
+ vbroadcasti128 (%r11),%ymm14
+ vpaddd %ymm6,%ymm13,%ymm13
+ vpxor %ymm0,%ymm13,%ymm0
+ vpslld $12,%ymm0,%ymm15
+ vpsrld $20,%ymm0,%ymm0
+ vpor %ymm0,%ymm15,%ymm0
+ vpaddd %ymm3,%ymm10,%ymm10
+ vpxor %ymm5,%ymm10,%ymm5
+ vpshufb %ymm14,%ymm5,%ymm5
+ vpaddd %ymm0,%ymm11,%ymm11
+ vpxor %ymm6,%ymm11,%ymm6
+ vpshufb %ymm14,%ymm6,%ymm6
+ vpaddd %ymm5,%ymm12,%ymm12
+ vpxor %ymm3,%ymm12,%ymm3
+ vpslld $7,%ymm3,%ymm15
+ vpsrld $25,%ymm3,%ymm3
+ vpor %ymm3,%ymm15,%ymm3
+ vbroadcasti128 (%r10),%ymm15
+ vpaddd %ymm6,%ymm13,%ymm13
+ vpxor %ymm0,%ymm13,%ymm0
+ vpslld $7,%ymm0,%ymm14
+ vpsrld $25,%ymm0,%ymm0
+ vpor %ymm0,%ymm14,%ymm0
+ decl %eax
+ jnz L$oop8x
+
+ leaq 512(%rsp),%rax
+ vpaddd 128-256(%rcx),%ymm8,%ymm8
+ vpaddd 160-256(%rcx),%ymm9,%ymm9
+ vpaddd 192-256(%rcx),%ymm10,%ymm10
+ vpaddd 224-256(%rcx),%ymm11,%ymm11
+
+ vpunpckldq %ymm9,%ymm8,%ymm14
+ vpunpckldq %ymm11,%ymm10,%ymm15
+ vpunpckhdq %ymm9,%ymm8,%ymm8
+ vpunpckhdq %ymm11,%ymm10,%ymm10
+ vpunpcklqdq %ymm15,%ymm14,%ymm9
+ vpunpckhqdq %ymm15,%ymm14,%ymm14
+ vpunpcklqdq %ymm10,%ymm8,%ymm11
+ vpunpckhqdq %ymm10,%ymm8,%ymm8
+ vpaddd 256-256(%rcx),%ymm0,%ymm0
+ vpaddd 288-256(%rcx),%ymm1,%ymm1
+ vpaddd 320-256(%rcx),%ymm2,%ymm2
+ vpaddd 352-256(%rcx),%ymm3,%ymm3
+
+ vpunpckldq %ymm1,%ymm0,%ymm10
+ vpunpckldq %ymm3,%ymm2,%ymm15
+ vpunpckhdq %ymm1,%ymm0,%ymm0
+ vpunpckhdq %ymm3,%ymm2,%ymm2
+ vpunpcklqdq %ymm15,%ymm10,%ymm1
+ vpunpckhqdq %ymm15,%ymm10,%ymm10
+ vpunpcklqdq %ymm2,%ymm0,%ymm3
+ vpunpckhqdq %ymm2,%ymm0,%ymm0
+ vperm2i128 $0x20,%ymm1,%ymm9,%ymm15
+ vperm2i128 $0x31,%ymm1,%ymm9,%ymm1
+ vperm2i128 $0x20,%ymm10,%ymm14,%ymm9
+ vperm2i128 $0x31,%ymm10,%ymm14,%ymm10
+ vperm2i128 $0x20,%ymm3,%ymm11,%ymm14
+ vperm2i128 $0x31,%ymm3,%ymm11,%ymm3
+ vperm2i128 $0x20,%ymm0,%ymm8,%ymm11
+ vperm2i128 $0x31,%ymm0,%ymm8,%ymm0
+ vmovdqa %ymm15,0(%rsp)
+ vmovdqa %ymm9,32(%rsp)
+ vmovdqa 64(%rsp),%ymm15
+ vmovdqa 96(%rsp),%ymm9
+
+ vpaddd 384-512(%rax),%ymm12,%ymm12
+ vpaddd 416-512(%rax),%ymm13,%ymm13
+ vpaddd 448-512(%rax),%ymm15,%ymm15
+ vpaddd 480-512(%rax),%ymm9,%ymm9
+
+ vpunpckldq %ymm13,%ymm12,%ymm2
+ vpunpckldq %ymm9,%ymm15,%ymm8
+ vpunpckhdq %ymm13,%ymm12,%ymm12
+ vpunpckhdq %ymm9,%ymm15,%ymm15
+ vpunpcklqdq %ymm8,%ymm2,%ymm13
+ vpunpckhqdq %ymm8,%ymm2,%ymm2
+ vpunpcklqdq %ymm15,%ymm12,%ymm9
+ vpunpckhqdq %ymm15,%ymm12,%ymm12
+ vpaddd 512-512(%rax),%ymm4,%ymm4
+ vpaddd 544-512(%rax),%ymm5,%ymm5
+ vpaddd 576-512(%rax),%ymm6,%ymm6
+ vpaddd 608-512(%rax),%ymm7,%ymm7
+
+ vpunpckldq %ymm5,%ymm4,%ymm15
+ vpunpckldq %ymm7,%ymm6,%ymm8
+ vpunpckhdq %ymm5,%ymm4,%ymm4
+ vpunpckhdq %ymm7,%ymm6,%ymm6
+ vpunpcklqdq %ymm8,%ymm15,%ymm5
+ vpunpckhqdq %ymm8,%ymm15,%ymm15
+ vpunpcklqdq %ymm6,%ymm4,%ymm7
+ vpunpckhqdq %ymm6,%ymm4,%ymm4
+ vperm2i128 $0x20,%ymm5,%ymm13,%ymm8
+ vperm2i128 $0x31,%ymm5,%ymm13,%ymm5
+ vperm2i128 $0x20,%ymm15,%ymm2,%ymm13
+ vperm2i128 $0x31,%ymm15,%ymm2,%ymm15
+ vperm2i128 $0x20,%ymm7,%ymm9,%ymm2
+ vperm2i128 $0x31,%ymm7,%ymm9,%ymm7
+ vperm2i128 $0x20,%ymm4,%ymm12,%ymm9
+ vperm2i128 $0x31,%ymm4,%ymm12,%ymm4
+ vmovdqa 0(%rsp),%ymm6
+ vmovdqa 32(%rsp),%ymm12
+
+ cmpq $512,%rdx
+ jb L$tail8x
+
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ leaq 128(%rsi),%rsi
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ leaq 128(%rdi),%rdi
+
+ vpxor 0(%rsi),%ymm12,%ymm12
+ vpxor 32(%rsi),%ymm13,%ymm13
+ vpxor 64(%rsi),%ymm10,%ymm10
+ vpxor 96(%rsi),%ymm15,%ymm15
+ leaq 128(%rsi),%rsi
+ vmovdqu %ymm12,0(%rdi)
+ vmovdqu %ymm13,32(%rdi)
+ vmovdqu %ymm10,64(%rdi)
+ vmovdqu %ymm15,96(%rdi)
+ leaq 128(%rdi),%rdi
+
+ vpxor 0(%rsi),%ymm14,%ymm14
+ vpxor 32(%rsi),%ymm2,%ymm2
+ vpxor 64(%rsi),%ymm3,%ymm3
+ vpxor 96(%rsi),%ymm7,%ymm7
+ leaq 128(%rsi),%rsi
+ vmovdqu %ymm14,0(%rdi)
+ vmovdqu %ymm2,32(%rdi)
+ vmovdqu %ymm3,64(%rdi)
+ vmovdqu %ymm7,96(%rdi)
+ leaq 128(%rdi),%rdi
+
+ vpxor 0(%rsi),%ymm11,%ymm11
+ vpxor 32(%rsi),%ymm9,%ymm9
+ vpxor 64(%rsi),%ymm0,%ymm0
+ vpxor 96(%rsi),%ymm4,%ymm4
+ leaq 128(%rsi),%rsi
+ vmovdqu %ymm11,0(%rdi)
+ vmovdqu %ymm9,32(%rdi)
+ vmovdqu %ymm0,64(%rdi)
+ vmovdqu %ymm4,96(%rdi)
+ leaq 128(%rdi),%rdi
+
+ subq $512,%rdx
+ jnz L$oop_outer8x
+
+ jmp L$done8x
+
+L$tail8x:
+ cmpq $448,%rdx
+ jae L$448_or_more8x
+ cmpq $384,%rdx
+ jae L$384_or_more8x
+ cmpq $320,%rdx
+ jae L$320_or_more8x
+ cmpq $256,%rdx
+ jae L$256_or_more8x
+ cmpq $192,%rdx
+ jae L$192_or_more8x
+ cmpq $128,%rdx
+ jae L$128_or_more8x
+ cmpq $64,%rdx
+ jae L$64_or_more8x
+
+ xorq %r10,%r10
+ vmovdqa %ymm6,0(%rsp)
+ vmovdqa %ymm8,32(%rsp)
+ jmp L$oop_tail8x
+
+.p2align 5
+L$64_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ je L$done8x
+
+ leaq 64(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm1,0(%rsp)
+ leaq 64(%rdi),%rdi
+ subq $64,%rdx
+ vmovdqa %ymm5,32(%rsp)
+ jmp L$oop_tail8x
+
+.p2align 5
+L$128_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ je L$done8x
+
+ leaq 128(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm12,0(%rsp)
+ leaq 128(%rdi),%rdi
+ subq $128,%rdx
+ vmovdqa %ymm13,32(%rsp)
+ jmp L$oop_tail8x
+
+.p2align 5
+L$192_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ je L$done8x
+
+ leaq 192(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm10,0(%rsp)
+ leaq 192(%rdi),%rdi
+ subq $192,%rdx
+ vmovdqa %ymm15,32(%rsp)
+ jmp L$oop_tail8x
+
+.p2align 5
+L$256_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vpxor 192(%rsi),%ymm10,%ymm10
+ vpxor 224(%rsi),%ymm15,%ymm15
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ vmovdqu %ymm10,192(%rdi)
+ vmovdqu %ymm15,224(%rdi)
+ je L$done8x
+
+ leaq 256(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm14,0(%rsp)
+ leaq 256(%rdi),%rdi
+ subq $256,%rdx
+ vmovdqa %ymm2,32(%rsp)
+ jmp L$oop_tail8x
+
+.p2align 5
+L$320_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vpxor 192(%rsi),%ymm10,%ymm10
+ vpxor 224(%rsi),%ymm15,%ymm15
+ vpxor 256(%rsi),%ymm14,%ymm14
+ vpxor 288(%rsi),%ymm2,%ymm2
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ vmovdqu %ymm10,192(%rdi)
+ vmovdqu %ymm15,224(%rdi)
+ vmovdqu %ymm14,256(%rdi)
+ vmovdqu %ymm2,288(%rdi)
+ je L$done8x
+
+ leaq 320(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm3,0(%rsp)
+ leaq 320(%rdi),%rdi
+ subq $320,%rdx
+ vmovdqa %ymm7,32(%rsp)
+ jmp L$oop_tail8x
+
+.p2align 5
+L$384_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vpxor 192(%rsi),%ymm10,%ymm10
+ vpxor 224(%rsi),%ymm15,%ymm15
+ vpxor 256(%rsi),%ymm14,%ymm14
+ vpxor 288(%rsi),%ymm2,%ymm2
+ vpxor 320(%rsi),%ymm3,%ymm3
+ vpxor 352(%rsi),%ymm7,%ymm7
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ vmovdqu %ymm10,192(%rdi)
+ vmovdqu %ymm15,224(%rdi)
+ vmovdqu %ymm14,256(%rdi)
+ vmovdqu %ymm2,288(%rdi)
+ vmovdqu %ymm3,320(%rdi)
+ vmovdqu %ymm7,352(%rdi)
+ je L$done8x
+
+ leaq 384(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm11,0(%rsp)
+ leaq 384(%rdi),%rdi
+ subq $384,%rdx
+ vmovdqa %ymm9,32(%rsp)
+ jmp L$oop_tail8x
+
+.p2align 5
+L$448_or_more8x:
+ vpxor 0(%rsi),%ymm6,%ymm6
+ vpxor 32(%rsi),%ymm8,%ymm8
+ vpxor 64(%rsi),%ymm1,%ymm1
+ vpxor 96(%rsi),%ymm5,%ymm5
+ vpxor 128(%rsi),%ymm12,%ymm12
+ vpxor 160(%rsi),%ymm13,%ymm13
+ vpxor 192(%rsi),%ymm10,%ymm10
+ vpxor 224(%rsi),%ymm15,%ymm15
+ vpxor 256(%rsi),%ymm14,%ymm14
+ vpxor 288(%rsi),%ymm2,%ymm2
+ vpxor 320(%rsi),%ymm3,%ymm3
+ vpxor 352(%rsi),%ymm7,%ymm7
+ vpxor 384(%rsi),%ymm11,%ymm11
+ vpxor 416(%rsi),%ymm9,%ymm9
+ vmovdqu %ymm6,0(%rdi)
+ vmovdqu %ymm8,32(%rdi)
+ vmovdqu %ymm1,64(%rdi)
+ vmovdqu %ymm5,96(%rdi)
+ vmovdqu %ymm12,128(%rdi)
+ vmovdqu %ymm13,160(%rdi)
+ vmovdqu %ymm10,192(%rdi)
+ vmovdqu %ymm15,224(%rdi)
+ vmovdqu %ymm14,256(%rdi)
+ vmovdqu %ymm2,288(%rdi)
+ vmovdqu %ymm3,320(%rdi)
+ vmovdqu %ymm7,352(%rdi)
+ vmovdqu %ymm11,384(%rdi)
+ vmovdqu %ymm9,416(%rdi)
+ je L$done8x
+
+ leaq 448(%rsi),%rsi
+ xorq %r10,%r10
+ vmovdqa %ymm0,0(%rsp)
+ leaq 448(%rdi),%rdi
+ subq $448,%rdx
+ vmovdqa %ymm4,32(%rsp)
+
+L$oop_tail8x:
+ movzbl (%rsi,%r10,1),%eax
+ movzbl (%rsp,%r10,1),%ecx
+ leaq 1(%r10),%r10
+ xorl %ecx,%eax
+ movb %al,-1(%rdi,%r10,1)
+ decq %rdx
+ jnz L$oop_tail8x
+
+L$done8x:
+ vzeroall
+ movq 640(%rsp),%rsp
+ .byte 0xf3,0xc3
+
+#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 0dde04d..0000000
--- 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/ec/p256-x86_64-asm.S b/third_party/boringssl/mac-x86_64/crypto/ec/p256-x86_64-asm.S
new file mode 100644
index 0000000..1cd0cc3
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/ec/p256-x86_64-asm.S
@@ -0,0 +1,1788 @@
+#if defined(__x86_64__)
+.text
+
+
+
+.p2align 6
+L$poly:
+.quad 0xffffffffffffffff, 0x00000000ffffffff, 0x0000000000000000, 0xffffffff00000001
+
+L$One:
+.long 1,1,1,1,1,1,1,1
+L$Two:
+.long 2,2,2,2,2,2,2,2
+L$Three:
+.long 3,3,3,3,3,3,3,3
+L$ONE_mont:
+.quad 0x0000000000000001, 0xffffffff00000000, 0xffffffffffffffff, 0x00000000fffffffe
+
+
+.p2align 6
+ecp_nistz256_mul_by_2:
+ pushq %r12
+ pushq %r13
+
+ movq 0(%rsi),%r8
+ movq 8(%rsi),%r9
+ addq %r8,%r8
+ movq 16(%rsi),%r10
+ adcq %r9,%r9
+ movq 24(%rsi),%r11
+ leaq L$poly(%rip),%rsi
+ movq %r8,%rax
+ adcq %r10,%r10
+ adcq %r11,%r11
+ movq %r9,%rdx
+ sbbq %r13,%r13
+
+ subq 0(%rsi),%r8
+ movq %r10,%rcx
+ sbbq 8(%rsi),%r9
+ sbbq 16(%rsi),%r10
+ movq %r11,%r12
+ sbbq 24(%rsi),%r11
+ testq %r13,%r13
+
+ cmovzq %rax,%r8
+ cmovzq %rdx,%r9
+ movq %r8,0(%rdi)
+ cmovzq %rcx,%r10
+ movq %r9,8(%rdi)
+ cmovzq %r12,%r11
+ movq %r10,16(%rdi)
+ movq %r11,24(%rdi)
+
+ popq %r13
+ popq %r12
+ .byte 0xf3,0xc3
+
+
+
+
+.globl _ecp_nistz256_neg
+.private_extern _ecp_nistz256_neg
+
+.p2align 5
+_ecp_nistz256_neg:
+ pushq %r12
+ pushq %r13
+
+ xorq %r8,%r8
+ xorq %r9,%r9
+ xorq %r10,%r10
+ xorq %r11,%r11
+ xorq %r13,%r13
+
+ subq 0(%rsi),%r8
+ sbbq 8(%rsi),%r9
+ sbbq 16(%rsi),%r10
+ movq %r8,%rax
+ sbbq 24(%rsi),%r11
+ leaq L$poly(%rip),%rsi
+ movq %r9,%rdx
+ sbbq $0,%r13
+
+ addq 0(%rsi),%r8
+ movq %r10,%rcx
+ adcq 8(%rsi),%r9
+ adcq 16(%rsi),%r10
+ movq %r11,%r12
+ adcq 24(%rsi),%r11
+ testq %r13,%r13
+
+ cmovzq %rax,%r8
+ cmovzq %rdx,%r9
+ movq %r8,0(%rdi)
+ cmovzq %rcx,%r10
+ movq %r9,8(%rdi)
+ cmovzq %r12,%r11
+ movq %r10,16(%rdi)
+ movq %r11,24(%rdi)
+
+ popq %r13
+ popq %r12
+ .byte 0xf3,0xc3
+
+
+
+
+
+
+
+.globl _ecp_nistz256_mul_mont
+.private_extern _ecp_nistz256_mul_mont
+
+.p2align 5
+_ecp_nistz256_mul_mont:
+L$mul_mont:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq %rdx,%rbx
+ movq 0(%rdx),%rax
+ movq 0(%rsi),%r9
+ movq 8(%rsi),%r10
+ movq 16(%rsi),%r11
+ movq 24(%rsi),%r12
+
+ call __ecp_nistz256_mul_montq
+L$mul_mont_done:
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+
+
+
+.p2align 5
+__ecp_nistz256_mul_montq:
+
+
+ movq %rax,%rbp
+ mulq %r9
+ movq L$poly+8(%rip),%r14
+ movq %rax,%r8
+ movq %rbp,%rax
+ movq %rdx,%r9
+
+ mulq %r10
+ movq L$poly+24(%rip),%r15
+ addq %rax,%r9
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%r10
+
+ mulq %r11
+ addq %rax,%r10
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%r11
+
+ mulq %r12
+ addq %rax,%r11
+ movq %r8,%rax
+ adcq $0,%rdx
+ xorq %r13,%r13
+ movq %rdx,%r12
+
+
+
+
+
+
+
+
+
+
+ movq %r8,%rbp
+ shlq $32,%r8
+ mulq %r15
+ shrq $32,%rbp
+ addq %r8,%r9
+ adcq %rbp,%r10
+ adcq %rax,%r11
+ movq 8(%rbx),%rax
+ adcq %rdx,%r12
+ adcq $0,%r13
+ xorq %r8,%r8
+
+
+
+ movq %rax,%rbp
+ mulq 0(%rsi)
+ addq %rax,%r9
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 8(%rsi)
+ addq %rcx,%r10
+ adcq $0,%rdx
+ addq %rax,%r10
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 16(%rsi)
+ addq %rcx,%r11
+ adcq $0,%rdx
+ addq %rax,%r11
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 24(%rsi)
+ addq %rcx,%r12
+ adcq $0,%rdx
+ addq %rax,%r12
+ movq %r9,%rax
+ adcq %rdx,%r13
+ adcq $0,%r8
+
+
+
+ movq %r9,%rbp
+ shlq $32,%r9
+ mulq %r15
+ shrq $32,%rbp
+ addq %r9,%r10
+ adcq %rbp,%r11
+ adcq %rax,%r12
+ movq 16(%rbx),%rax
+ adcq %rdx,%r13
+ adcq $0,%r8
+ xorq %r9,%r9
+
+
+
+ movq %rax,%rbp
+ mulq 0(%rsi)
+ addq %rax,%r10
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 8(%rsi)
+ addq %rcx,%r11
+ adcq $0,%rdx
+ addq %rax,%r11
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 16(%rsi)
+ addq %rcx,%r12
+ adcq $0,%rdx
+ addq %rax,%r12
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 24(%rsi)
+ addq %rcx,%r13
+ adcq $0,%rdx
+ addq %rax,%r13
+ movq %r10,%rax
+ adcq %rdx,%r8
+ adcq $0,%r9
+
+
+
+ movq %r10,%rbp
+ shlq $32,%r10
+ mulq %r15
+ shrq $32,%rbp
+ addq %r10,%r11
+ adcq %rbp,%r12
+ adcq %rax,%r13
+ movq 24(%rbx),%rax
+ adcq %rdx,%r8
+ adcq $0,%r9
+ xorq %r10,%r10
+
+
+
+ movq %rax,%rbp
+ mulq 0(%rsi)
+ addq %rax,%r11
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 8(%rsi)
+ addq %rcx,%r12
+ adcq $0,%rdx
+ addq %rax,%r12
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 16(%rsi)
+ addq %rcx,%r13
+ adcq $0,%rdx
+ addq %rax,%r13
+ movq %rbp,%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq 24(%rsi)
+ addq %rcx,%r8
+ adcq $0,%rdx
+ addq %rax,%r8
+ movq %r11,%rax
+ adcq %rdx,%r9
+ adcq $0,%r10
+
+
+
+ movq %r11,%rbp
+ shlq $32,%r11
+ mulq %r15
+ shrq $32,%rbp
+ addq %r11,%r12
+ adcq %rbp,%r13
+ movq %r12,%rcx
+ adcq %rax,%r8
+ adcq %rdx,%r9
+ movq %r13,%rbp
+ adcq $0,%r10
+
+
+
+ subq $-1,%r12
+ movq %r8,%rbx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%rdx
+ sbbq %r15,%r9
+ sbbq $0,%r10
+
+ cmovcq %rcx,%r12
+ cmovcq %rbp,%r13
+ movq %r12,0(%rdi)
+ cmovcq %rbx,%r8
+ movq %r13,8(%rdi)
+ cmovcq %rdx,%r9
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+
+ .byte 0xf3,0xc3
+
+
+
+
+
+
+
+
+
+.globl _ecp_nistz256_sqr_mont
+.private_extern _ecp_nistz256_sqr_mont
+
+.p2align 5
+_ecp_nistz256_sqr_mont:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq 0(%rsi),%rax
+ movq 8(%rsi),%r14
+ movq 16(%rsi),%r15
+ movq 24(%rsi),%r8
+
+ call __ecp_nistz256_sqr_montq
+L$sqr_mont_done:
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+
+
+
+.p2align 5
+__ecp_nistz256_sqr_montq:
+ movq %rax,%r13
+ mulq %r14
+ movq %rax,%r9
+ movq %r15,%rax
+ movq %rdx,%r10
+
+ mulq %r13
+ addq %rax,%r10
+ movq %r8,%rax
+ adcq $0,%rdx
+ movq %rdx,%r11
+
+ mulq %r13
+ addq %rax,%r11
+ movq %r15,%rax
+ adcq $0,%rdx
+ movq %rdx,%r12
+
+
+ mulq %r14
+ addq %rax,%r11
+ movq %r8,%rax
+ adcq $0,%rdx
+ movq %rdx,%rbp
+
+ mulq %r14
+ addq %rax,%r12
+ movq %r8,%rax
+ adcq $0,%rdx
+ addq %rbp,%r12
+ movq %rdx,%r13
+ adcq $0,%r13
+
+
+ mulq %r15
+ xorq %r15,%r15
+ addq %rax,%r13
+ movq 0(%rsi),%rax
+ movq %rdx,%r14
+ adcq $0,%r14
+
+ addq %r9,%r9
+ adcq %r10,%r10
+ adcq %r11,%r11
+ adcq %r12,%r12
+ adcq %r13,%r13
+ adcq %r14,%r14
+ adcq $0,%r15
+
+ mulq %rax
+ movq %rax,%r8
+ movq 8(%rsi),%rax
+ movq %rdx,%rcx
+
+ mulq %rax
+ addq %rcx,%r9
+ adcq %rax,%r10
+ movq 16(%rsi),%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq %rax
+ addq %rcx,%r11
+ adcq %rax,%r12
+ movq 24(%rsi),%rax
+ adcq $0,%rdx
+ movq %rdx,%rcx
+
+ mulq %rax
+ addq %rcx,%r13
+ adcq %rax,%r14
+ movq %r8,%rax
+ adcq %rdx,%r15
+
+ movq L$poly+8(%rip),%rsi
+ movq L$poly+24(%rip),%rbp
+
+
+
+
+ movq %r8,%rcx
+ shlq $32,%r8
+ mulq %rbp
+ shrq $32,%rcx
+ addq %r8,%r9
+ adcq %rcx,%r10
+ adcq %rax,%r11
+ movq %r9,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r9,%rcx
+ shlq $32,%r9
+ movq %rdx,%r8
+ mulq %rbp
+ shrq $32,%rcx
+ addq %r9,%r10
+ adcq %rcx,%r11
+ adcq %rax,%r8
+ movq %r10,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r10,%rcx
+ shlq $32,%r10
+ movq %rdx,%r9
+ mulq %rbp
+ shrq $32,%rcx
+ addq %r10,%r11
+ adcq %rcx,%r8
+ adcq %rax,%r9
+ movq %r11,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r11,%rcx
+ shlq $32,%r11
+ movq %rdx,%r10
+ mulq %rbp
+ shrq $32,%rcx
+ addq %r11,%r8
+ adcq %rcx,%r9
+ adcq %rax,%r10
+ adcq $0,%rdx
+ xorq %r11,%r11
+
+
+
+ addq %r8,%r12
+ adcq %r9,%r13
+ movq %r12,%r8
+ adcq %r10,%r14
+ adcq %rdx,%r15
+ movq %r13,%r9
+ adcq $0,%r11
+
+ subq $-1,%r12
+ movq %r14,%r10
+ sbbq %rsi,%r13
+ sbbq $0,%r14
+ movq %r15,%rcx
+ sbbq %rbp,%r15
+ sbbq $0,%r11
+
+ cmovcq %r8,%r12
+ cmovcq %r9,%r13
+ movq %r12,0(%rdi)
+ cmovcq %r10,%r14
+ movq %r13,8(%rdi)
+ cmovcq %rcx,%r15
+ movq %r14,16(%rdi)
+ movq %r15,24(%rdi)
+
+ .byte 0xf3,0xc3
+
+
+
+
+
+
+
+.globl _ecp_nistz256_from_mont
+.private_extern _ecp_nistz256_from_mont
+
+.p2align 5
+_ecp_nistz256_from_mont:
+ pushq %r12
+ pushq %r13
+
+ movq 0(%rsi),%rax
+ movq L$poly+24(%rip),%r13
+ movq 8(%rsi),%r9
+ movq 16(%rsi),%r10
+ movq 24(%rsi),%r11
+ movq %rax,%r8
+ movq L$poly+8(%rip),%r12
+
+
+
+ movq %rax,%rcx
+ shlq $32,%r8
+ mulq %r13
+ shrq $32,%rcx
+ addq %r8,%r9
+ adcq %rcx,%r10
+ adcq %rax,%r11
+ movq %r9,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r9,%rcx
+ shlq $32,%r9
+ movq %rdx,%r8
+ mulq %r13
+ shrq $32,%rcx
+ addq %r9,%r10
+ adcq %rcx,%r11
+ adcq %rax,%r8
+ movq %r10,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r10,%rcx
+ shlq $32,%r10
+ movq %rdx,%r9
+ mulq %r13
+ shrq $32,%rcx
+ addq %r10,%r11
+ adcq %rcx,%r8
+ adcq %rax,%r9
+ movq %r11,%rax
+ adcq $0,%rdx
+
+
+
+ movq %r11,%rcx
+ shlq $32,%r11
+ movq %rdx,%r10
+ mulq %r13
+ shrq $32,%rcx
+ addq %r11,%r8
+ adcq %rcx,%r9
+ movq %r8,%rcx
+ adcq %rax,%r10
+ movq %r9,%rsi
+ adcq $0,%rdx
+
+ subq $-1,%r8
+ movq %r10,%rax
+ sbbq %r12,%r9
+ sbbq $0,%r10
+ movq %rdx,%r11
+ sbbq %r13,%rdx
+ sbbq %r13,%r13
+
+ cmovnzq %rcx,%r8
+ cmovnzq %rsi,%r9
+ movq %r8,0(%rdi)
+ cmovnzq %rax,%r10
+ movq %r9,8(%rdi)
+ cmovzq %rdx,%r11
+ movq %r10,16(%rdi)
+ movq %r11,24(%rdi)
+
+ popq %r13
+ popq %r12
+ .byte 0xf3,0xc3
+
+
+
+.globl _ecp_nistz256_select_w5
+.private_extern _ecp_nistz256_select_w5
+
+.p2align 5
+_ecp_nistz256_select_w5:
+ movdqa L$One(%rip),%xmm0
+ movd %edx,%xmm1
+
+ pxor %xmm2,%xmm2
+ pxor %xmm3,%xmm3
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+ pxor %xmm6,%xmm6
+ pxor %xmm7,%xmm7
+
+ movdqa %xmm0,%xmm8
+ pshufd $0,%xmm1,%xmm1
+
+ movq $16,%rax
+L$select_loop_sse_w5:
+
+ movdqa %xmm8,%xmm15
+ paddd %xmm0,%xmm8
+ pcmpeqd %xmm1,%xmm15
+
+ movdqa 0(%rsi),%xmm9
+ movdqa 16(%rsi),%xmm10
+ movdqa 32(%rsi),%xmm11
+ movdqa 48(%rsi),%xmm12
+ movdqa 64(%rsi),%xmm13
+ movdqa 80(%rsi),%xmm14
+ leaq 96(%rsi),%rsi
+
+ pand %xmm15,%xmm9
+ pand %xmm15,%xmm10
+ por %xmm9,%xmm2
+ pand %xmm15,%xmm11
+ por %xmm10,%xmm3
+ pand %xmm15,%xmm12
+ por %xmm11,%xmm4
+ pand %xmm15,%xmm13
+ por %xmm12,%xmm5
+ pand %xmm15,%xmm14
+ por %xmm13,%xmm6
+ por %xmm14,%xmm7
+
+ decq %rax
+ jnz L$select_loop_sse_w5
+
+ movdqu %xmm2,0(%rdi)
+ movdqu %xmm3,16(%rdi)
+ movdqu %xmm4,32(%rdi)
+ movdqu %xmm5,48(%rdi)
+ movdqu %xmm6,64(%rdi)
+ movdqu %xmm7,80(%rdi)
+ .byte 0xf3,0xc3
+
+
+
+
+.globl _ecp_nistz256_select_w7
+.private_extern _ecp_nistz256_select_w7
+
+.p2align 5
+_ecp_nistz256_select_w7:
+ movdqa L$One(%rip),%xmm8
+ movd %edx,%xmm1
+
+ pxor %xmm2,%xmm2
+ pxor %xmm3,%xmm3
+ pxor %xmm4,%xmm4
+ pxor %xmm5,%xmm5
+
+ movdqa %xmm8,%xmm0
+ pshufd $0,%xmm1,%xmm1
+ movq $64,%rax
+
+L$select_loop_sse_w7:
+ movdqa %xmm8,%xmm15
+ paddd %xmm0,%xmm8
+ movdqa 0(%rsi),%xmm9
+ movdqa 16(%rsi),%xmm10
+ pcmpeqd %xmm1,%xmm15
+ movdqa 32(%rsi),%xmm11
+ movdqa 48(%rsi),%xmm12
+ leaq 64(%rsi),%rsi
+
+ pand %xmm15,%xmm9
+ pand %xmm15,%xmm10
+ por %xmm9,%xmm2
+ pand %xmm15,%xmm11
+ por %xmm10,%xmm3
+ pand %xmm15,%xmm12
+ por %xmm11,%xmm4
+ prefetcht0 255(%rsi)
+ por %xmm12,%xmm5
+
+ decq %rax
+ jnz L$select_loop_sse_w7
+
+ movdqu %xmm2,0(%rdi)
+ movdqu %xmm3,16(%rdi)
+ movdqu %xmm4,32(%rdi)
+ movdqu %xmm5,48(%rdi)
+ .byte 0xf3,0xc3
+
+.globl _ecp_nistz256_avx2_select_w7
+.private_extern _ecp_nistz256_avx2_select_w7
+
+.p2align 5
+_ecp_nistz256_avx2_select_w7:
+.byte 0x0f,0x0b
+ .byte 0xf3,0xc3
+
+
+.p2align 5
+__ecp_nistz256_add_toq:
+ addq 0(%rbx),%r12
+ adcq 8(%rbx),%r13
+ movq %r12,%rax
+ adcq 16(%rbx),%r8
+ adcq 24(%rbx),%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ subq $-1,%r12
+ movq %r8,%rcx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%r10
+ sbbq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ cmovzq %rbp,%r13
+ movq %r12,0(%rdi)
+ cmovzq %rcx,%r8
+ movq %r13,8(%rdi)
+ cmovzq %r10,%r9
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+
+ .byte 0xf3,0xc3
+
+
+
+.p2align 5
+__ecp_nistz256_sub_fromq:
+ subq 0(%rbx),%r12
+ sbbq 8(%rbx),%r13
+ movq %r12,%rax
+ sbbq 16(%rbx),%r8
+ sbbq 24(%rbx),%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ addq $-1,%r12
+ movq %r8,%rcx
+ adcq %r14,%r13
+ adcq $0,%r8
+ movq %r9,%r10
+ adcq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ cmovzq %rbp,%r13
+ movq %r12,0(%rdi)
+ cmovzq %rcx,%r8
+ movq %r13,8(%rdi)
+ cmovzq %r10,%r9
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+
+ .byte 0xf3,0xc3
+
+
+
+.p2align 5
+__ecp_nistz256_subq:
+ subq %r12,%rax
+ sbbq %r13,%rbp
+ movq %rax,%r12
+ sbbq %r8,%rcx
+ sbbq %r9,%r10
+ movq %rbp,%r13
+ sbbq %r11,%r11
+
+ addq $-1,%rax
+ movq %rcx,%r8
+ adcq %r14,%rbp
+ adcq $0,%rcx
+ movq %r10,%r9
+ adcq %r15,%r10
+ testq %r11,%r11
+
+ cmovnzq %rax,%r12
+ cmovnzq %rbp,%r13
+ cmovnzq %rcx,%r8
+ cmovnzq %r10,%r9
+
+ .byte 0xf3,0xc3
+
+
+
+.p2align 5
+__ecp_nistz256_mul_by_2q:
+ addq %r12,%r12
+ adcq %r13,%r13
+ movq %r12,%rax
+ adcq %r8,%r8
+ adcq %r9,%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ subq $-1,%r12
+ movq %r8,%rcx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%r10
+ sbbq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ cmovzq %rbp,%r13
+ movq %r12,0(%rdi)
+ cmovzq %rcx,%r8
+ movq %r13,8(%rdi)
+ cmovzq %r10,%r9
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+
+ .byte 0xf3,0xc3
+
+.globl _ecp_nistz256_point_double
+.private_extern _ecp_nistz256_point_double
+
+.p2align 5
+_ecp_nistz256_point_double:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ subq $160+8,%rsp
+
+L$point_double_shortcutq:
+ movdqu 0(%rsi),%xmm0
+ movq %rsi,%rbx
+ movdqu 16(%rsi),%xmm1
+ movq 32+0(%rsi),%r12
+ movq 32+8(%rsi),%r13
+ movq 32+16(%rsi),%r8
+ movq 32+24(%rsi),%r9
+ movq L$poly+8(%rip),%r14
+ movq L$poly+24(%rip),%r15
+ movdqa %xmm0,96(%rsp)
+ movdqa %xmm1,96+16(%rsp)
+ leaq 32(%rdi),%r10
+ leaq 64(%rdi),%r11
+.byte 102,72,15,110,199
+.byte 102,73,15,110,202
+.byte 102,73,15,110,211
+
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_by_2q
+
+ movq 64+0(%rsi),%rax
+ movq 64+8(%rsi),%r14
+ movq 64+16(%rsi),%r15
+ movq 64+24(%rsi),%r8
+ leaq 64-0(%rsi),%rsi
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 0+0(%rsp),%rax
+ movq 8+0(%rsp),%r14
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r15
+ movq 24+0(%rsp),%r8
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 32(%rbx),%rax
+ movq 64+0(%rbx),%r9
+ movq 64+8(%rbx),%r10
+ movq 64+16(%rbx),%r11
+ movq 64+24(%rbx),%r12
+ leaq 64-0(%rbx),%rsi
+ leaq 32(%rbx),%rbx
+.byte 102,72,15,126,215
+ call __ecp_nistz256_mul_montq
+ call __ecp_nistz256_mul_by_2q
+
+ movq 96+0(%rsp),%r12
+ movq 96+8(%rsp),%r13
+ leaq 64(%rsp),%rbx
+ movq 96+16(%rsp),%r8
+ movq 96+24(%rsp),%r9
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_add_toq
+
+ movq 96+0(%rsp),%r12
+ movq 96+8(%rsp),%r13
+ leaq 64(%rsp),%rbx
+ movq 96+16(%rsp),%r8
+ movq 96+24(%rsp),%r9
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 0+0(%rsp),%rax
+ movq 8+0(%rsp),%r14
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r15
+ movq 24+0(%rsp),%r8
+.byte 102,72,15,126,207
+ call __ecp_nistz256_sqr_montq
+ xorq %r9,%r9
+ movq %r12,%rax
+ addq $-1,%r12
+ movq %r13,%r10
+ adcq %rsi,%r13
+ movq %r14,%rcx
+ adcq $0,%r14
+ movq %r15,%r8
+ adcq %rbp,%r15
+ adcq $0,%r9
+ xorq %rsi,%rsi
+ testq $1,%rax
+
+ cmovzq %rax,%r12
+ cmovzq %r10,%r13
+ cmovzq %rcx,%r14
+ cmovzq %r8,%r15
+ cmovzq %rsi,%r9
+
+ movq %r13,%rax
+ shrq $1,%r12
+ shlq $63,%rax
+ movq %r14,%r10
+ shrq $1,%r13
+ orq %rax,%r12
+ shlq $63,%r10
+ movq %r15,%rcx
+ shrq $1,%r14
+ orq %r10,%r13
+ shlq $63,%rcx
+ movq %r12,0(%rdi)
+ shrq $1,%r15
+ movq %r13,8(%rdi)
+ shlq $63,%r9
+ orq %rcx,%r14
+ orq %r9,%r15
+ movq %r14,16(%rdi)
+ movq %r15,24(%rdi)
+ movq 64(%rsp),%rax
+ leaq 64(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 128(%rsp),%rdi
+ call __ecp_nistz256_mul_by_2q
+
+ leaq 32(%rsp),%rbx
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_add_toq
+
+ movq 96(%rsp),%rax
+ leaq 96(%rsp),%rbx
+ movq 0+0(%rsp),%r9
+ movq 8+0(%rsp),%r10
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r11
+ movq 24+0(%rsp),%r12
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 128(%rsp),%rdi
+ call __ecp_nistz256_mul_by_2q
+
+ movq 0+32(%rsp),%rax
+ movq 8+32(%rsp),%r14
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r15
+ movq 24+32(%rsp),%r8
+.byte 102,72,15,126,199
+ call __ecp_nistz256_sqr_montq
+
+ leaq 128(%rsp),%rbx
+ movq %r14,%r8
+ movq %r15,%r9
+ movq %rsi,%r14
+ movq %rbp,%r15
+ call __ecp_nistz256_sub_fromq
+
+ movq 0+0(%rsp),%rax
+ movq 0+8(%rsp),%rbp
+ movq 0+16(%rsp),%rcx
+ movq 0+24(%rsp),%r10
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_subq
+
+ movq 32(%rsp),%rax
+ leaq 32(%rsp),%rbx
+ movq %r12,%r14
+ xorl %ecx,%ecx
+ movq %r12,0+0(%rsp)
+ movq %r13,%r10
+ movq %r13,0+8(%rsp)
+ cmovzq %r8,%r11
+ movq %r8,0+16(%rsp)
+ leaq 0-0(%rsp),%rsi
+ cmovzq %r9,%r12
+ movq %r9,0+24(%rsp)
+ movq %r14,%r9
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+.byte 102,72,15,126,203
+.byte 102,72,15,126,207
+ call __ecp_nistz256_sub_fromq
+
+ addq $160+8,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+
+.globl _ecp_nistz256_point_add
+.private_extern _ecp_nistz256_point_add
+
+.p2align 5
+_ecp_nistz256_point_add:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ subq $576+8,%rsp
+
+ movdqu 0(%rsi),%xmm0
+ movdqu 16(%rsi),%xmm1
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm3
+ movdqu 64(%rsi),%xmm4
+ movdqu 80(%rsi),%xmm5
+ movq %rsi,%rbx
+ movq %rdx,%rsi
+ movdqa %xmm0,384(%rsp)
+ movdqa %xmm1,384+16(%rsp)
+ por %xmm0,%xmm1
+ movdqa %xmm2,416(%rsp)
+ movdqa %xmm3,416+16(%rsp)
+ por %xmm2,%xmm3
+ movdqa %xmm4,448(%rsp)
+ movdqa %xmm5,448+16(%rsp)
+ por %xmm1,%xmm3
+
+ movdqu 0(%rsi),%xmm0
+ pshufd $0xb1,%xmm3,%xmm5
+ movdqu 16(%rsi),%xmm1
+ movdqu 32(%rsi),%xmm2
+ por %xmm3,%xmm5
+ movdqu 48(%rsi),%xmm3
+ movq 64+0(%rsi),%rax
+ movq 64+8(%rsi),%r14
+ movq 64+16(%rsi),%r15
+ movq 64+24(%rsi),%r8
+ movdqa %xmm0,480(%rsp)
+ pshufd $0x1e,%xmm5,%xmm4
+ movdqa %xmm1,480+16(%rsp)
+ por %xmm0,%xmm1
+.byte 102,72,15,110,199
+ movdqa %xmm2,512(%rsp)
+ movdqa %xmm3,512+16(%rsp)
+ por %xmm2,%xmm3
+ por %xmm4,%xmm5
+ pxor %xmm4,%xmm4
+ por %xmm1,%xmm3
+
+ leaq 64-0(%rsi),%rsi
+ movq %rax,544+0(%rsp)
+ movq %r14,544+8(%rsp)
+ movq %r15,544+16(%rsp)
+ movq %r8,544+24(%rsp)
+ leaq 96(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ pcmpeqd %xmm4,%xmm5
+ pshufd $0xb1,%xmm3,%xmm4
+ por %xmm3,%xmm4
+ pshufd $0,%xmm5,%xmm5
+ pshufd $0x1e,%xmm4,%xmm3
+ por %xmm3,%xmm4
+ pxor %xmm3,%xmm3
+ pcmpeqd %xmm3,%xmm4
+ pshufd $0,%xmm4,%xmm4
+ movq 64+0(%rbx),%rax
+ movq 64+8(%rbx),%r14
+ movq 64+16(%rbx),%r15
+ movq 64+24(%rbx),%r8
+.byte 102,72,15,110,203
+
+ leaq 64-0(%rbx),%rsi
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 544(%rsp),%rax
+ leaq 544(%rsp),%rbx
+ movq 0+96(%rsp),%r9
+ movq 8+96(%rsp),%r10
+ leaq 0+96(%rsp),%rsi
+ movq 16+96(%rsp),%r11
+ movq 24+96(%rsp),%r12
+ leaq 224(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 448(%rsp),%rax
+ leaq 448(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 256(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 416(%rsp),%rax
+ leaq 416(%rsp),%rbx
+ movq 0+224(%rsp),%r9
+ movq 8+224(%rsp),%r10
+ leaq 0+224(%rsp),%rsi
+ movq 16+224(%rsp),%r11
+ movq 24+224(%rsp),%r12
+ leaq 224(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 512(%rsp),%rax
+ leaq 512(%rsp),%rbx
+ movq 0+256(%rsp),%r9
+ movq 8+256(%rsp),%r10
+ leaq 0+256(%rsp),%rsi
+ movq 16+256(%rsp),%r11
+ movq 24+256(%rsp),%r12
+ leaq 256(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 224(%rsp),%rbx
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ orq %r13,%r12
+ movdqa %xmm4,%xmm2
+ orq %r8,%r12
+ orq %r9,%r12
+ por %xmm5,%xmm2
+.byte 102,73,15,110,220
+
+ movq 384(%rsp),%rax
+ leaq 384(%rsp),%rbx
+ movq 0+96(%rsp),%r9
+ movq 8+96(%rsp),%r10
+ leaq 0+96(%rsp),%rsi
+ movq 16+96(%rsp),%r11
+ movq 24+96(%rsp),%r12
+ leaq 160(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 480(%rsp),%rax
+ leaq 480(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 192(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 160(%rsp),%rbx
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ orq %r13,%r12
+ orq %r8,%r12
+ orq %r9,%r12
+
+.byte 0x3e
+ jnz L$add_proceedq
+.byte 102,73,15,126,208
+.byte 102,73,15,126,217
+ testq %r8,%r8
+ jnz L$add_proceedq
+ testq %r9,%r9
+ jz L$add_doubleq
+
+.byte 102,72,15,126,199
+ pxor %xmm0,%xmm0
+ movdqu %xmm0,0(%rdi)
+ movdqu %xmm0,16(%rdi)
+ movdqu %xmm0,32(%rdi)
+ movdqu %xmm0,48(%rdi)
+ movdqu %xmm0,64(%rdi)
+ movdqu %xmm0,80(%rdi)
+ jmp L$add_doneq
+
+.p2align 5
+L$add_doubleq:
+.byte 102,72,15,126,206
+.byte 102,72,15,126,199
+ addq $416,%rsp
+ jmp L$point_double_shortcutq
+
+.p2align 5
+L$add_proceedq:
+ movq 0+64(%rsp),%rax
+ movq 8+64(%rsp),%r14
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r15
+ movq 24+64(%rsp),%r8
+ leaq 96(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 448(%rsp),%rax
+ leaq 448(%rsp),%rbx
+ movq 0+0(%rsp),%r9
+ movq 8+0(%rsp),%r10
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r11
+ movq 24+0(%rsp),%r12
+ leaq 352(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 0+0(%rsp),%rax
+ movq 8+0(%rsp),%r14
+ leaq 0+0(%rsp),%rsi
+ movq 16+0(%rsp),%r15
+ movq 24+0(%rsp),%r8
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 544(%rsp),%rax
+ leaq 544(%rsp),%rbx
+ movq 0+352(%rsp),%r9
+ movq 8+352(%rsp),%r10
+ leaq 0+352(%rsp),%rsi
+ movq 16+352(%rsp),%r11
+ movq 24+352(%rsp),%r12
+ leaq 352(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 0(%rsp),%rax
+ leaq 0(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 128(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 160(%rsp),%rax
+ leaq 160(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 192(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+
+
+
+ addq %r12,%r12
+ leaq 96(%rsp),%rsi
+ adcq %r13,%r13
+ movq %r12,%rax
+ adcq %r8,%r8
+ adcq %r9,%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ subq $-1,%r12
+ movq %r8,%rcx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%r10
+ sbbq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ movq 0(%rsi),%rax
+ cmovzq %rbp,%r13
+ movq 8(%rsi),%rbp
+ cmovzq %rcx,%r8
+ movq 16(%rsi),%rcx
+ cmovzq %r10,%r9
+ movq 24(%rsi),%r10
+
+ call __ecp_nistz256_subq
+
+ leaq 128(%rsp),%rbx
+ leaq 288(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 192+0(%rsp),%rax
+ movq 192+8(%rsp),%rbp
+ movq 192+16(%rsp),%rcx
+ movq 192+24(%rsp),%r10
+ leaq 320(%rsp),%rdi
+
+ call __ecp_nistz256_subq
+
+ movq %r12,0(%rdi)
+ movq %r13,8(%rdi)
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+ movq 128(%rsp),%rax
+ leaq 128(%rsp),%rbx
+ movq 0+224(%rsp),%r9
+ movq 8+224(%rsp),%r10
+ leaq 0+224(%rsp),%rsi
+ movq 16+224(%rsp),%r11
+ movq 24+224(%rsp),%r12
+ leaq 256(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 320(%rsp),%rax
+ leaq 320(%rsp),%rbx
+ movq 0+64(%rsp),%r9
+ movq 8+64(%rsp),%r10
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r11
+ movq 24+64(%rsp),%r12
+ leaq 320(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 256(%rsp),%rbx
+ leaq 320(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+.byte 102,72,15,126,199
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 352(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 352+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 544(%rsp),%xmm2
+ pand 544+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 448(%rsp),%xmm2
+ pand 448+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,64(%rdi)
+ movdqu %xmm3,80(%rdi)
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 288(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 288+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 480(%rsp),%xmm2
+ pand 480+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 384(%rsp),%xmm2
+ pand 384+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,0(%rdi)
+ movdqu %xmm3,16(%rdi)
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 320(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 320+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 512(%rsp),%xmm2
+ pand 512+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 416(%rsp),%xmm2
+ pand 416+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm3,48(%rdi)
+
+L$add_doneq:
+ addq $576+8,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .byte 0xf3,0xc3
+
+.globl _ecp_nistz256_point_add_affine
+.private_extern _ecp_nistz256_point_add_affine
+
+.p2align 5
+_ecp_nistz256_point_add_affine:
+ pushq %rbp
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ subq $480+8,%rsp
+
+ movdqu 0(%rsi),%xmm0
+ movq %rdx,%rbx
+ movdqu 16(%rsi),%xmm1
+ movdqu 32(%rsi),%xmm2
+ movdqu 48(%rsi),%xmm3
+ movdqu 64(%rsi),%xmm4
+ movdqu 80(%rsi),%xmm5
+ movq 64+0(%rsi),%rax
+ movq 64+8(%rsi),%r14
+ movq 64+16(%rsi),%r15
+ movq 64+24(%rsi),%r8
+ movdqa %xmm0,320(%rsp)
+ movdqa %xmm1,320+16(%rsp)
+ por %xmm0,%xmm1
+ movdqa %xmm2,352(%rsp)
+ movdqa %xmm3,352+16(%rsp)
+ por %xmm2,%xmm3
+ movdqa %xmm4,384(%rsp)
+ movdqa %xmm5,384+16(%rsp)
+ por %xmm1,%xmm3
+
+ movdqu 0(%rbx),%xmm0
+ pshufd $0xb1,%xmm3,%xmm5
+ movdqu 16(%rbx),%xmm1
+ movdqu 32(%rbx),%xmm2
+ por %xmm3,%xmm5
+ movdqu 48(%rbx),%xmm3
+ movdqa %xmm0,416(%rsp)
+ pshufd $0x1e,%xmm5,%xmm4
+ movdqa %xmm1,416+16(%rsp)
+ por %xmm0,%xmm1
+.byte 102,72,15,110,199
+ movdqa %xmm2,448(%rsp)
+ movdqa %xmm3,448+16(%rsp)
+ por %xmm2,%xmm3
+ por %xmm4,%xmm5
+ pxor %xmm4,%xmm4
+ por %xmm1,%xmm3
+
+ leaq 64-0(%rsi),%rsi
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ pcmpeqd %xmm4,%xmm5
+ pshufd $0xb1,%xmm3,%xmm4
+ movq 0(%rbx),%rax
+
+ movq %r12,%r9
+ por %xmm3,%xmm4
+ pshufd $0,%xmm5,%xmm5
+ pshufd $0x1e,%xmm4,%xmm3
+ movq %r13,%r10
+ por %xmm3,%xmm4
+ pxor %xmm3,%xmm3
+ movq %r14,%r11
+ pcmpeqd %xmm3,%xmm4
+ pshufd $0,%xmm4,%xmm4
+
+ leaq 32-0(%rsp),%rsi
+ movq %r15,%r12
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 320(%rsp),%rbx
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 384(%rsp),%rax
+ leaq 384(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 384(%rsp),%rax
+ leaq 384(%rsp),%rbx
+ movq 0+64(%rsp),%r9
+ movq 8+64(%rsp),%r10
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r11
+ movq 24+64(%rsp),%r12
+ leaq 288(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 448(%rsp),%rax
+ leaq 448(%rsp),%rbx
+ movq 0+32(%rsp),%r9
+ movq 8+32(%rsp),%r10
+ leaq 0+32(%rsp),%rsi
+ movq 16+32(%rsp),%r11
+ movq 24+32(%rsp),%r12
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 352(%rsp),%rbx
+ leaq 96(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 0+64(%rsp),%rax
+ movq 8+64(%rsp),%r14
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r15
+ movq 24+64(%rsp),%r8
+ leaq 128(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 0+96(%rsp),%rax
+ movq 8+96(%rsp),%r14
+ leaq 0+96(%rsp),%rsi
+ movq 16+96(%rsp),%r15
+ movq 24+96(%rsp),%r8
+ leaq 192(%rsp),%rdi
+ call __ecp_nistz256_sqr_montq
+
+ movq 128(%rsp),%rax
+ leaq 128(%rsp),%rbx
+ movq 0+64(%rsp),%r9
+ movq 8+64(%rsp),%r10
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r11
+ movq 24+64(%rsp),%r12
+ leaq 160(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 320(%rsp),%rax
+ leaq 320(%rsp),%rbx
+ movq 0+128(%rsp),%r9
+ movq 8+128(%rsp),%r10
+ leaq 0+128(%rsp),%rsi
+ movq 16+128(%rsp),%r11
+ movq 24+128(%rsp),%r12
+ leaq 0(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+
+
+
+ addq %r12,%r12
+ leaq 192(%rsp),%rsi
+ adcq %r13,%r13
+ movq %r12,%rax
+ adcq %r8,%r8
+ adcq %r9,%r9
+ movq %r13,%rbp
+ sbbq %r11,%r11
+
+ subq $-1,%r12
+ movq %r8,%rcx
+ sbbq %r14,%r13
+ sbbq $0,%r8
+ movq %r9,%r10
+ sbbq %r15,%r9
+ testq %r11,%r11
+
+ cmovzq %rax,%r12
+ movq 0(%rsi),%rax
+ cmovzq %rbp,%r13
+ movq 8(%rsi),%rbp
+ cmovzq %rcx,%r8
+ movq 16(%rsi),%rcx
+ cmovzq %r10,%r9
+ movq 24(%rsi),%r10
+
+ call __ecp_nistz256_subq
+
+ leaq 160(%rsp),%rbx
+ leaq 224(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+ movq 0+0(%rsp),%rax
+ movq 0+8(%rsp),%rbp
+ movq 0+16(%rsp),%rcx
+ movq 0+24(%rsp),%r10
+ leaq 64(%rsp),%rdi
+
+ call __ecp_nistz256_subq
+
+ movq %r12,0(%rdi)
+ movq %r13,8(%rdi)
+ movq %r8,16(%rdi)
+ movq %r9,24(%rdi)
+ movq 352(%rsp),%rax
+ leaq 352(%rsp),%rbx
+ movq 0+160(%rsp),%r9
+ movq 8+160(%rsp),%r10
+ leaq 0+160(%rsp),%rsi
+ movq 16+160(%rsp),%r11
+ movq 24+160(%rsp),%r12
+ leaq 32(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ movq 96(%rsp),%rax
+ leaq 96(%rsp),%rbx
+ movq 0+64(%rsp),%r9
+ movq 8+64(%rsp),%r10
+ leaq 0+64(%rsp),%rsi
+ movq 16+64(%rsp),%r11
+ movq 24+64(%rsp),%r12
+ leaq 64(%rsp),%rdi
+ call __ecp_nistz256_mul_montq
+
+ leaq 32(%rsp),%rbx
+ leaq 256(%rsp),%rdi
+ call __ecp_nistz256_sub_fromq
+
+.byte 102,72,15,126,199
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 288(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 288+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand L$ONE_mont(%rip),%xmm2
+ pand L$ONE_mont+16(%rip),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 384(%rsp),%xmm2
+ pand 384+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,64(%rdi)
+ movdqu %xmm3,80(%rdi)
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 224(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 224+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 416(%rsp),%xmm2
+ pand 416+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 320(%rsp),%xmm2
+ pand 320+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,0(%rdi)
+ movdqu %xmm3,16(%rdi)
+
+ movdqa %xmm5,%xmm0
+ movdqa %xmm5,%xmm1
+ pandn 256(%rsp),%xmm0
+ movdqa %xmm5,%xmm2
+ pandn 256+16(%rsp),%xmm1
+ movdqa %xmm5,%xmm3
+ pand 448(%rsp),%xmm2
+ pand 448+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+
+ movdqa %xmm4,%xmm0
+ movdqa %xmm4,%xmm1
+ pandn %xmm2,%xmm0
+ movdqa %xmm4,%xmm2
+ pandn %xmm3,%xmm1
+ movdqa %xmm4,%xmm3
+ pand 352(%rsp),%xmm2
+ pand 352+16(%rsp),%xmm3
+ por %xmm0,%xmm2
+ por %xmm1,%xmm3
+ movdqu %xmm2,32(%rdi)
+ movdqu %xmm3,48(%rdi)
+
+ addq $480+8,%rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ popq %rbp
+ .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
index 1e61479..16fd2cc 100644
--- 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
@@ -495,14 +495,14 @@
movl %ecx,%r11d
addl %ecx,%ebx
movl 0(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%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
+ movl $0xffffffff,%r11d
roll $6,%eax
xorl %ecx,%r11d
addl %ebx,%eax
@@ -511,7 +511,7 @@
xorl %ebx,%r11d
addl %r11d,%edx
movl 56(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $10,%edx
xorl %ebx,%r11d
addl %eax,%edx
@@ -520,7 +520,7 @@
xorl %eax,%r11d
addl %r11d,%ecx
movl 20(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $15,%ecx
xorl %eax,%r11d
addl %edx,%ecx
@@ -529,7 +529,7 @@
xorl %edx,%r11d
addl %r11d,%ebx
movl 48(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $21,%ebx
xorl %edx,%r11d
addl %ecx,%ebx
@@ -538,7 +538,7 @@
xorl %ecx,%r11d
addl %r11d,%eax
movl 12(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $6,%eax
xorl %ecx,%r11d
addl %ebx,%eax
@@ -547,7 +547,7 @@
xorl %ebx,%r11d
addl %r11d,%edx
movl 40(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $10,%edx
xorl %ebx,%r11d
addl %eax,%edx
@@ -556,7 +556,7 @@
xorl %eax,%r11d
addl %r11d,%ecx
movl 4(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $15,%ecx
xorl %eax,%r11d
addl %edx,%ecx
@@ -565,7 +565,7 @@
xorl %edx,%r11d
addl %r11d,%ebx
movl 32(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $21,%ebx
xorl %edx,%r11d
addl %ecx,%ebx
@@ -574,7 +574,7 @@
xorl %ecx,%r11d
addl %r11d,%eax
movl 60(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $6,%eax
xorl %ecx,%r11d
addl %ebx,%eax
@@ -583,7 +583,7 @@
xorl %ebx,%r11d
addl %r11d,%edx
movl 24(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $10,%edx
xorl %ebx,%r11d
addl %eax,%edx
@@ -592,7 +592,7 @@
xorl %eax,%r11d
addl %r11d,%ecx
movl 52(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $15,%ecx
xorl %eax,%r11d
addl %edx,%ecx
@@ -601,7 +601,7 @@
xorl %edx,%r11d
addl %r11d,%ebx
movl 16(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $21,%ebx
xorl %edx,%r11d
addl %ecx,%ebx
@@ -610,7 +610,7 @@
xorl %ecx,%r11d
addl %r11d,%eax
movl 44(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $6,%eax
xorl %ecx,%r11d
addl %ebx,%eax
@@ -619,7 +619,7 @@
xorl %ebx,%r11d
addl %r11d,%edx
movl 8(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $10,%edx
xorl %ebx,%r11d
addl %eax,%edx
@@ -628,7 +628,7 @@
xorl %eax,%r11d
addl %r11d,%ecx
movl 36(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $15,%ecx
xorl %eax,%r11d
addl %edx,%ecx
@@ -637,7 +637,7 @@
xorl %edx,%r11d
addl %r11d,%ebx
movl 0(%rsi),%r10d
- movl $4294967295,%r11d
+ movl $0xffffffff,%r11d
roll $21,%ebx
xorl %edx,%r11d
addl %ecx,%ebx
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
index 305a91c..1072c7f 100644
--- 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
@@ -22,14 +22,14 @@
movq $14,%rcx
movq 8(%rsi,%rax,1),%r8
movq (%rsi,%rax,1),%r9
- andb $240,%bl
+ andb $0xf0,%bl
movq %r8,%rdx
jmp L$oop1
.p2align 4
L$oop1:
shrq $4,%r8
- andq $15,%rdx
+ andq $0xf,%rdx
movq %r9,%r10
movb (%rdi,%rcx,1),%al
shrq $4,%r9
@@ -45,13 +45,13 @@
js L$break1
shrq $4,%r8
- andq $15,%rdx
+ andq $0xf,%rdx
movq %r9,%r10
shrq $4,%r9
xorq 8(%rsi,%rax,1),%r8
shlq $60,%r10
xorq (%rsi,%rax,1),%r9
- andb $240,%bl
+ andb $0xf0,%bl
xorq (%r11,%rdx,8),%r9
movq %r8,%rdx
xorq %r10,%r8
@@ -60,19 +60,19 @@
.p2align 4
L$break1:
shrq $4,%r8
- andq $15,%rdx
+ andq $0xf,%rdx
movq %r9,%r10
shrq $4,%r9
xorq 8(%rsi,%rax,1),%r8
shlq $60,%r10
xorq (%rsi,%rax,1),%r9
- andb $240,%bl
+ andb $0xf0,%bl
xorq (%r11,%rdx,8),%r9
movq %r8,%rdx
xorq %r10,%r8
shrq $4,%r8
- andq $15,%rdx
+ andq $0xf,%rdx
movq %r9,%r10
shrq $4,%r9
xorq 8(%rsi,%rbx,1),%r8
@@ -880,20 +880,20 @@
movdqu 32(%rsi),%xmm7
.byte 102,65,15,56,0,194
- subq $16,%rcx
+ subq $0x10,%rcx
jz L$odd_tail
movdqu 16(%rsi),%xmm6
movl _OPENSSL_ia32cap_P+4(%rip),%eax
- cmpq $48,%rcx
+ cmpq $0x30,%rcx
jb L$skip4x
andl $71303168,%eax
cmpl $4194304,%eax
je L$skip4x
- subq $48,%rcx
- movq $11547335547999543296,%rax
+ subq $0x30,%rcx
+ movq $0xA040608020C0E000,%rax
movdqu 48(%rsi),%xmm14
movdqu 64(%rsi),%xmm15
@@ -940,7 +940,7 @@
xorps %xmm13,%xmm5
leaq 64(%rdx),%rdx
- subq $64,%rcx
+ subq $0x40,%rcx
jc L$tail4x
jmp L$mod4_loop
@@ -1023,7 +1023,7 @@
xorps %xmm13,%xmm5
leaq 64(%rdx),%rdx
- subq $64,%rcx
+ subq $0x40,%rcx
jnc L$mod4_loop
L$tail4x:
@@ -1067,10 +1067,10 @@
pxor %xmm4,%xmm0
psrlq $1,%xmm0
pxor %xmm1,%xmm0
- addq $64,%rcx
+ addq $0x40,%rcx
jz L$done
movdqu 32(%rsi),%xmm7
- subq $16,%rcx
+ subq $0x10,%rcx
jz L$odd_tail
L$skip4x:
@@ -1093,7 +1093,7 @@
leaq 32(%rdx),%rdx
nop
- subq $32,%rcx
+ subq $0x20,%rcx
jbe L$even_tail
nop
jmp L$mod_loop
@@ -1156,7 +1156,7 @@
.byte 102,15,58,68,231,0
pxor %xmm1,%xmm0
- subq $32,%rcx
+ subq $0x20,%rcx
ja L$mod_loop
L$even_tail:
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 31ee7d2..0000000
--- 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/sha/sha1-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/sha/sha1-x86_64.S
index 044dc5b..0509d45 100644
--- 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
@@ -12,6 +12,11 @@
movl _OPENSSL_ia32cap_P+8(%rip),%r10d
testl $512,%r8d
jz L$ialu
+ andl $268435456,%r8d
+ andl $1073741824,%r9d
+ orl %r9d,%r8d
+ cmpl $1342177280,%r8d
+ je _avx_shortcut
jmp _ssse3_shortcut
.p2align 4
@@ -2407,6 +2412,1122 @@
L$epilogue_ssse3:
.byte 0xf3,0xc3
+
+.p2align 4
+sha1_block_data_order_avx:
+_avx_shortcut:
+ movq %rsp,%rax
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ leaq -64(%rsp),%rsp
+ vzeroupper
+ 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
+
+ vmovdqa 64(%r11),%xmm6
+ vmovdqa -64(%r11),%xmm11
+ vmovdqu 0(%r9),%xmm0
+ vmovdqu 16(%r9),%xmm1
+ vmovdqu 32(%r9),%xmm2
+ vmovdqu 48(%r9),%xmm3
+ vpshufb %xmm6,%xmm0,%xmm0
+ addq $64,%r9
+ vpshufb %xmm6,%xmm1,%xmm1
+ vpshufb %xmm6,%xmm2,%xmm2
+ vpshufb %xmm6,%xmm3,%xmm3
+ vpaddd %xmm11,%xmm0,%xmm4
+ vpaddd %xmm11,%xmm1,%xmm5
+ vpaddd %xmm11,%xmm2,%xmm6
+ vmovdqa %xmm4,0(%rsp)
+ vmovdqa %xmm5,16(%rsp)
+ vmovdqa %xmm6,32(%rsp)
+ jmp L$oop_avx
+.p2align 4
+L$oop_avx:
+ shrdl $2,%ebx,%ebx
+ xorl %edx,%esi
+ vpalignr $8,%xmm0,%xmm1,%xmm4
+ movl %eax,%edi
+ addl 0(%rsp),%ebp
+ vpaddd %xmm3,%xmm11,%xmm9
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpsrldq $4,%xmm3,%xmm8
+ addl %esi,%ebp
+ andl %ebx,%edi
+ vpxor %xmm0,%xmm4,%xmm4
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ vpxor %xmm2,%xmm8,%xmm8
+ shrdl $7,%eax,%eax
+ xorl %ecx,%edi
+ movl %ebp,%esi
+ addl 4(%rsp),%edx
+ vpxor %xmm8,%xmm4,%xmm4
+ xorl %ebx,%eax
+ shldl $5,%ebp,%ebp
+ vmovdqa %xmm9,48(%rsp)
+ addl %edi,%edx
+ andl %eax,%esi
+ vpsrld $31,%xmm4,%xmm8
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ shrdl $7,%ebp,%ebp
+ xorl %ebx,%esi
+ vpslldq $12,%xmm4,%xmm10
+ vpaddd %xmm4,%xmm4,%xmm4
+ movl %edx,%edi
+ addl 8(%rsp),%ecx
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ vpsrld $30,%xmm10,%xmm9
+ vpor %xmm8,%xmm4,%xmm4
+ addl %esi,%ecx
+ andl %ebp,%edi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ vpslld $2,%xmm10,%xmm10
+ vpxor %xmm9,%xmm4,%xmm4
+ shrdl $7,%edx,%edx
+ xorl %eax,%edi
+ movl %ecx,%esi
+ addl 12(%rsp),%ebx
+ vpxor %xmm10,%xmm4,%xmm4
+ xorl %ebp,%edx
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ andl %edx,%esi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ shrdl $7,%ecx,%ecx
+ xorl %ebp,%esi
+ vpalignr $8,%xmm1,%xmm2,%xmm5
+ movl %ebx,%edi
+ addl 16(%rsp),%eax
+ vpaddd %xmm4,%xmm11,%xmm9
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vpsrldq $4,%xmm4,%xmm8
+ addl %esi,%eax
+ andl %ecx,%edi
+ vpxor %xmm1,%xmm5,%xmm5
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpxor %xmm3,%xmm8,%xmm8
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%edi
+ movl %eax,%esi
+ addl 20(%rsp),%ebp
+ vpxor %xmm8,%xmm5,%xmm5
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vmovdqa %xmm9,0(%rsp)
+ addl %edi,%ebp
+ andl %ebx,%esi
+ vpsrld $31,%xmm5,%xmm8
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ shrdl $7,%eax,%eax
+ xorl %ecx,%esi
+ vpslldq $12,%xmm5,%xmm10
+ vpaddd %xmm5,%xmm5,%xmm5
+ movl %ebp,%edi
+ addl 24(%rsp),%edx
+ xorl %ebx,%eax
+ shldl $5,%ebp,%ebp
+ vpsrld $30,%xmm10,%xmm9
+ vpor %xmm8,%xmm5,%xmm5
+ addl %esi,%edx
+ andl %eax,%edi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ vpslld $2,%xmm10,%xmm10
+ vpxor %xmm9,%xmm5,%xmm5
+ shrdl $7,%ebp,%ebp
+ xorl %ebx,%edi
+ movl %edx,%esi
+ addl 28(%rsp),%ecx
+ vpxor %xmm10,%xmm5,%xmm5
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ vmovdqa -32(%r11),%xmm11
+ addl %edi,%ecx
+ andl %ebp,%esi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ shrdl $7,%edx,%edx
+ xorl %eax,%esi
+ vpalignr $8,%xmm2,%xmm3,%xmm6
+ movl %ecx,%edi
+ addl 32(%rsp),%ebx
+ vpaddd %xmm5,%xmm11,%xmm9
+ xorl %ebp,%edx
+ shldl $5,%ecx,%ecx
+ vpsrldq $4,%xmm5,%xmm8
+ addl %esi,%ebx
+ andl %edx,%edi
+ vpxor %xmm2,%xmm6,%xmm6
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ vpxor %xmm4,%xmm8,%xmm8
+ shrdl $7,%ecx,%ecx
+ xorl %ebp,%edi
+ movl %ebx,%esi
+ addl 36(%rsp),%eax
+ vpxor %xmm8,%xmm6,%xmm6
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vmovdqa %xmm9,16(%rsp)
+ addl %edi,%eax
+ andl %ecx,%esi
+ vpsrld $31,%xmm6,%xmm8
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%esi
+ vpslldq $12,%xmm6,%xmm10
+ vpaddd %xmm6,%xmm6,%xmm6
+ movl %eax,%edi
+ addl 40(%rsp),%ebp
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ vpsrld $30,%xmm10,%xmm9
+ vpor %xmm8,%xmm6,%xmm6
+ addl %esi,%ebp
+ andl %ebx,%edi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ vpslld $2,%xmm10,%xmm10
+ vpxor %xmm9,%xmm6,%xmm6
+ shrdl $7,%eax,%eax
+ xorl %ecx,%edi
+ movl %ebp,%esi
+ addl 44(%rsp),%edx
+ vpxor %xmm10,%xmm6,%xmm6
+ xorl %ebx,%eax
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ andl %eax,%esi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ shrdl $7,%ebp,%ebp
+ xorl %ebx,%esi
+ vpalignr $8,%xmm3,%xmm4,%xmm7
+ movl %edx,%edi
+ addl 48(%rsp),%ecx
+ vpaddd %xmm6,%xmm11,%xmm9
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ vpsrldq $4,%xmm6,%xmm8
+ addl %esi,%ecx
+ andl %ebp,%edi
+ vpxor %xmm3,%xmm7,%xmm7
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ vpxor %xmm5,%xmm8,%xmm8
+ shrdl $7,%edx,%edx
+ xorl %eax,%edi
+ movl %ecx,%esi
+ addl 52(%rsp),%ebx
+ vpxor %xmm8,%xmm7,%xmm7
+ xorl %ebp,%edx
+ shldl $5,%ecx,%ecx
+ vmovdqa %xmm9,32(%rsp)
+ addl %edi,%ebx
+ andl %edx,%esi
+ vpsrld $31,%xmm7,%xmm8
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ shrdl $7,%ecx,%ecx
+ xorl %ebp,%esi
+ vpslldq $12,%xmm7,%xmm10
+ vpaddd %xmm7,%xmm7,%xmm7
+ movl %ebx,%edi
+ addl 56(%rsp),%eax
+ xorl %edx,%ecx
+ shldl $5,%ebx,%ebx
+ vpsrld $30,%xmm10,%xmm9
+ vpor %xmm8,%xmm7,%xmm7
+ addl %esi,%eax
+ andl %ecx,%edi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpslld $2,%xmm10,%xmm10
+ vpxor %xmm9,%xmm7,%xmm7
+ shrdl $7,%ebx,%ebx
+ xorl %edx,%edi
+ movl %eax,%esi
+ addl 60(%rsp),%ebp
+ vpxor %xmm10,%xmm7,%xmm7
+ xorl %ecx,%ebx
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ andl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ vpalignr $8,%xmm6,%xmm7,%xmm8
+ vpxor %xmm4,%xmm0,%xmm0
+ shrdl $7,%eax,%eax
+ xorl %ecx,%esi
+ movl %ebp,%edi
+ addl 0(%rsp),%edx
+ vpxor %xmm1,%xmm0,%xmm0
+ xorl %ebx,%eax
+ shldl $5,%ebp,%ebp
+ vpaddd %xmm7,%xmm11,%xmm9
+ addl %esi,%edx
+ andl %eax,%edi
+ vpxor %xmm8,%xmm0,%xmm0
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ shrdl $7,%ebp,%ebp
+ xorl %ebx,%edi
+ vpsrld $30,%xmm0,%xmm8
+ vmovdqa %xmm9,48(%rsp)
+ movl %edx,%esi
+ addl 4(%rsp),%ecx
+ xorl %eax,%ebp
+ shldl $5,%edx,%edx
+ vpslld $2,%xmm0,%xmm0
+ addl %edi,%ecx
+ andl %ebp,%esi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ shrdl $7,%edx,%edx
+ xorl %eax,%esi
+ movl %ecx,%edi
+ addl 8(%rsp),%ebx
+ vpor %xmm8,%xmm0,%xmm0
+ xorl %ebp,%edx
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ andl %edx,%edi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ addl 12(%rsp),%eax
+ xorl %ebp,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpalignr $8,%xmm7,%xmm0,%xmm8
+ vpxor %xmm5,%xmm1,%xmm1
+ addl 16(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ vpxor %xmm2,%xmm1,%xmm1
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ vpaddd %xmm0,%xmm11,%xmm9
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpxor %xmm8,%xmm1,%xmm1
+ addl 20(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ vpsrld $30,%xmm1,%xmm8
+ vmovdqa %xmm9,0(%rsp)
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpslld $2,%xmm1,%xmm1
+ addl 24(%rsp),%ecx
+ xorl %eax,%esi
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%edi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpor %xmm8,%xmm1,%xmm1
+ addl 28(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpalignr $8,%xmm0,%xmm1,%xmm8
+ vpxor %xmm6,%xmm2,%xmm2
+ addl 32(%rsp),%eax
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ vpxor %xmm3,%xmm2,%xmm2
+ addl %esi,%eax
+ xorl %edx,%edi
+ vpaddd %xmm1,%xmm11,%xmm9
+ vmovdqa 0(%r11),%xmm11
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpxor %xmm8,%xmm2,%xmm2
+ addl 36(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ vpsrld $30,%xmm2,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpslld $2,%xmm2,%xmm2
+ addl 40(%rsp),%edx
+ xorl %ebx,%esi
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ xorl %ebx,%edi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpor %xmm8,%xmm2,%xmm2
+ addl 44(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpalignr $8,%xmm1,%xmm2,%xmm8
+ vpxor %xmm7,%xmm3,%xmm3
+ addl 48(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ vpxor %xmm4,%xmm3,%xmm3
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ vpaddd %xmm2,%xmm11,%xmm9
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpxor %xmm8,%xmm3,%xmm3
+ addl 52(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ vpsrld $30,%xmm3,%xmm8
+ vmovdqa %xmm9,32(%rsp)
+ addl %edi,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpslld $2,%xmm3,%xmm3
+ addl 56(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpor %xmm8,%xmm3,%xmm3
+ addl 60(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpalignr $8,%xmm2,%xmm3,%xmm8
+ vpxor %xmm0,%xmm4,%xmm4
+ addl 0(%rsp),%ecx
+ xorl %eax,%esi
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ vpxor %xmm5,%xmm4,%xmm4
+ addl %esi,%ecx
+ xorl %eax,%edi
+ vpaddd %xmm3,%xmm11,%xmm9
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpxor %xmm8,%xmm4,%xmm4
+ addl 4(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ vpsrld $30,%xmm4,%xmm8
+ vmovdqa %xmm9,48(%rsp)
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpslld $2,%xmm4,%xmm4
+ addl 8(%rsp),%eax
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%edi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vpor %xmm8,%xmm4,%xmm4
+ addl 12(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpalignr $8,%xmm3,%xmm4,%xmm8
+ vpxor %xmm1,%xmm5,%xmm5
+ addl 16(%rsp),%edx
+ xorl %ebx,%esi
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ vpxor %xmm6,%xmm5,%xmm5
+ addl %esi,%edx
+ xorl %ebx,%edi
+ vpaddd %xmm4,%xmm11,%xmm9
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpxor %xmm8,%xmm5,%xmm5
+ addl 20(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ vpsrld $30,%xmm5,%xmm8
+ vmovdqa %xmm9,0(%rsp)
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpslld $2,%xmm5,%xmm5
+ addl 24(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vpor %xmm8,%xmm5,%xmm5
+ addl 28(%rsp),%eax
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ xorl %edx,%edi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %ecx,%esi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ vpalignr $8,%xmm4,%xmm5,%xmm8
+ vpxor %xmm2,%xmm6,%xmm6
+ addl 32(%rsp),%ebp
+ andl %ecx,%esi
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %eax,%edi
+ xorl %ecx,%esi
+ vpaddd %xmm5,%xmm11,%xmm9
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ vpxor %xmm8,%xmm6,%xmm6
+ xorl %ebx,%edi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ addl 36(%rsp),%edx
+ vpsrld $30,%xmm6,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ andl %ebx,%edi
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %ebp,%esi
+ vpslld $2,%xmm6,%xmm6
+ xorl %ebx,%edi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %eax,%esi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ addl 40(%rsp),%ecx
+ andl %eax,%esi
+ vpor %xmm8,%xmm6,%xmm6
+ xorl %ebx,%eax
+ shrdl $7,%ebp,%ebp
+ movl %edx,%edi
+ xorl %eax,%esi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %ebp,%edi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ addl 44(%rsp),%ebx
+ andl %ebp,%edi
+ xorl %eax,%ebp
+ shrdl $7,%edx,%edx
+ movl %ecx,%esi
+ xorl %ebp,%edi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %edx,%esi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ vpalignr $8,%xmm5,%xmm6,%xmm8
+ vpxor %xmm3,%xmm7,%xmm7
+ addl 48(%rsp),%eax
+ andl %edx,%esi
+ xorl %ebp,%edx
+ shrdl $7,%ecx,%ecx
+ vpxor %xmm0,%xmm7,%xmm7
+ movl %ebx,%edi
+ xorl %edx,%esi
+ vpaddd %xmm6,%xmm11,%xmm9
+ vmovdqa 32(%r11),%xmm11
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ vpxor %xmm8,%xmm7,%xmm7
+ xorl %ecx,%edi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 52(%rsp),%ebp
+ vpsrld $30,%xmm7,%xmm8
+ vmovdqa %xmm9,32(%rsp)
+ andl %ecx,%edi
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%esi
+ vpslld $2,%xmm7,%xmm7
+ xorl %ecx,%edi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ addl 56(%rsp),%edx
+ andl %ebx,%esi
+ vpor %xmm8,%xmm7,%xmm7
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %ebp,%edi
+ xorl %ebx,%esi
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ xorl %eax,%edi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ addl 60(%rsp),%ecx
+ andl %eax,%edi
+ xorl %ebx,%eax
+ shrdl $7,%ebp,%ebp
+ movl %edx,%esi
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %ebp,%esi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ vpalignr $8,%xmm6,%xmm7,%xmm8
+ vpxor %xmm4,%xmm0,%xmm0
+ addl 0(%rsp),%ebx
+ andl %ebp,%esi
+ xorl %eax,%ebp
+ shrdl $7,%edx,%edx
+ vpxor %xmm1,%xmm0,%xmm0
+ movl %ecx,%edi
+ xorl %ebp,%esi
+ vpaddd %xmm7,%xmm11,%xmm9
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ vpxor %xmm8,%xmm0,%xmm0
+ xorl %edx,%edi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ addl 4(%rsp),%eax
+ vpsrld $30,%xmm0,%xmm8
+ vmovdqa %xmm9,48(%rsp)
+ andl %edx,%edi
+ xorl %ebp,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ vpslld $2,%xmm0,%xmm0
+ xorl %edx,%edi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %ecx,%esi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 8(%rsp),%ebp
+ andl %ecx,%esi
+ vpor %xmm8,%xmm0,%xmm0
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%edi
+ xorl %ecx,%esi
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ xorl %ebx,%edi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ addl 12(%rsp),%edx
+ andl %ebx,%edi
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ movl %ebp,%esi
+ xorl %ebx,%edi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %eax,%esi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ vpalignr $8,%xmm7,%xmm0,%xmm8
+ vpxor %xmm5,%xmm1,%xmm1
+ addl 16(%rsp),%ecx
+ andl %eax,%esi
+ xorl %ebx,%eax
+ shrdl $7,%ebp,%ebp
+ vpxor %xmm2,%xmm1,%xmm1
+ movl %edx,%edi
+ xorl %eax,%esi
+ vpaddd %xmm0,%xmm11,%xmm9
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ vpxor %xmm8,%xmm1,%xmm1
+ xorl %ebp,%edi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ addl 20(%rsp),%ebx
+ vpsrld $30,%xmm1,%xmm8
+ vmovdqa %xmm9,0(%rsp)
+ andl %ebp,%edi
+ xorl %eax,%ebp
+ shrdl $7,%edx,%edx
+ movl %ecx,%esi
+ vpslld $2,%xmm1,%xmm1
+ xorl %ebp,%edi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %edx,%esi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ addl 24(%rsp),%eax
+ andl %edx,%esi
+ vpor %xmm8,%xmm1,%xmm1
+ xorl %ebp,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%edi
+ xorl %edx,%esi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %ecx,%edi
+ xorl %edx,%ecx
+ addl %ebx,%eax
+ addl 28(%rsp),%ebp
+ andl %ecx,%edi
+ xorl %edx,%ecx
+ shrdl $7,%ebx,%ebx
+ movl %eax,%esi
+ xorl %ecx,%edi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ebx,%esi
+ xorl %ecx,%ebx
+ addl %eax,%ebp
+ vpalignr $8,%xmm0,%xmm1,%xmm8
+ vpxor %xmm6,%xmm2,%xmm2
+ addl 32(%rsp),%edx
+ andl %ebx,%esi
+ xorl %ecx,%ebx
+ shrdl $7,%eax,%eax
+ vpxor %xmm3,%xmm2,%xmm2
+ movl %ebp,%edi
+ xorl %ebx,%esi
+ vpaddd %xmm1,%xmm11,%xmm9
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ vpxor %xmm8,%xmm2,%xmm2
+ xorl %eax,%edi
+ xorl %ebx,%eax
+ addl %ebp,%edx
+ addl 36(%rsp),%ecx
+ vpsrld $30,%xmm2,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ andl %eax,%edi
+ xorl %ebx,%eax
+ shrdl $7,%ebp,%ebp
+ movl %edx,%esi
+ vpslld $2,%xmm2,%xmm2
+ xorl %eax,%edi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %ebp,%esi
+ xorl %eax,%ebp
+ addl %edx,%ecx
+ addl 40(%rsp),%ebx
+ andl %ebp,%esi
+ vpor %xmm8,%xmm2,%xmm2
+ xorl %eax,%ebp
+ shrdl $7,%edx,%edx
+ movl %ecx,%edi
+ xorl %ebp,%esi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %edx,%edi
+ xorl %ebp,%edx
+ addl %ecx,%ebx
+ addl 44(%rsp),%eax
+ andl %edx,%edi
+ xorl %ebp,%edx
+ shrdl $7,%ecx,%ecx
+ movl %ebx,%esi
+ xorl %edx,%edi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %edx,%esi
+ addl %ebx,%eax
+ vpalignr $8,%xmm1,%xmm2,%xmm8
+ vpxor %xmm7,%xmm3,%xmm3
+ addl 48(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ vpxor %xmm4,%xmm3,%xmm3
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ vpaddd %xmm2,%xmm11,%xmm9
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ vpxor %xmm8,%xmm3,%xmm3
+ addl 52(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ vpsrld $30,%xmm3,%xmm8
+ vmovdqa %xmm9,32(%rsp)
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vpslld $2,%xmm3,%xmm3
+ addl 56(%rsp),%ecx
+ xorl %eax,%esi
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%edi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vpor %xmm8,%xmm3,%xmm3
+ addl 60(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 0(%rsp),%eax
+ vpaddd %xmm3,%xmm11,%xmm9
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ vmovdqa %xmm9,48(%rsp)
+ xorl %edx,%edi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 4(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 8(%rsp),%edx
+ xorl %ebx,%esi
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ xorl %ebx,%edi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ addl 12(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ cmpq %r10,%r9
+ je L$done_avx
+ vmovdqa 64(%r11),%xmm6
+ vmovdqa -64(%r11),%xmm11
+ vmovdqu 0(%r9),%xmm0
+ vmovdqu 16(%r9),%xmm1
+ vmovdqu 32(%r9),%xmm2
+ vmovdqu 48(%r9),%xmm3
+ vpshufb %xmm6,%xmm0,%xmm0
+ addq $64,%r9
+ addl 16(%rsp),%ebx
+ xorl %ebp,%esi
+ vpshufb %xmm6,%xmm1,%xmm1
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ vpaddd %xmm11,%xmm0,%xmm4
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ vmovdqa %xmm4,0(%rsp)
+ addl 20(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 24(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 28(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ addl 32(%rsp),%ecx
+ xorl %eax,%esi
+ vpshufb %xmm6,%xmm2,%xmm2
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ vpaddd %xmm11,%xmm1,%xmm5
+ addl %esi,%ecx
+ xorl %eax,%edi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ vmovdqa %xmm5,16(%rsp)
+ addl 36(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 40(%rsp),%eax
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%edi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 44(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 48(%rsp),%edx
+ xorl %ebx,%esi
+ vpshufb %xmm6,%xmm3,%xmm3
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ vpaddd %xmm11,%xmm2,%xmm6
+ addl %esi,%edx
+ xorl %ebx,%edi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ vmovdqa %xmm6,32(%rsp)
+ addl 52(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ addl 56(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 60(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ shrdl $7,%ecx,%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_avx
+
+.p2align 4
+L$done_avx:
+ addl 16(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 20(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ xorl %edx,%esi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 24(%rsp),%ebp
+ xorl %ecx,%esi
+ movl %eax,%edi
+ shldl $5,%eax,%eax
+ addl %esi,%ebp
+ xorl %ecx,%edi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 28(%rsp),%edx
+ xorl %ebx,%edi
+ movl %ebp,%esi
+ shldl $5,%ebp,%ebp
+ addl %edi,%edx
+ xorl %ebx,%esi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ addl 32(%rsp),%ecx
+ xorl %eax,%esi
+ movl %edx,%edi
+ shldl $5,%edx,%edx
+ addl %esi,%ecx
+ xorl %eax,%edi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ addl 36(%rsp),%ebx
+ xorl %ebp,%edi
+ movl %ecx,%esi
+ shldl $5,%ecx,%ecx
+ addl %edi,%ebx
+ xorl %ebp,%esi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 40(%rsp),%eax
+ xorl %edx,%esi
+ movl %ebx,%edi
+ shldl $5,%ebx,%ebx
+ addl %esi,%eax
+ xorl %edx,%edi
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ addl 44(%rsp),%ebp
+ xorl %ecx,%edi
+ movl %eax,%esi
+ shldl $5,%eax,%eax
+ addl %edi,%ebp
+ xorl %ecx,%esi
+ shrdl $7,%ebx,%ebx
+ addl %eax,%ebp
+ addl 48(%rsp),%edx
+ xorl %ebx,%esi
+ movl %ebp,%edi
+ shldl $5,%ebp,%ebp
+ addl %esi,%edx
+ xorl %ebx,%edi
+ shrdl $7,%eax,%eax
+ addl %ebp,%edx
+ addl 52(%rsp),%ecx
+ xorl %eax,%edi
+ movl %edx,%esi
+ shldl $5,%edx,%edx
+ addl %edi,%ecx
+ xorl %eax,%esi
+ shrdl $7,%ebp,%ebp
+ addl %edx,%ecx
+ addl 56(%rsp),%ebx
+ xorl %ebp,%esi
+ movl %ecx,%edi
+ shldl $5,%ecx,%ecx
+ addl %esi,%ebx
+ xorl %ebp,%edi
+ shrdl $7,%edx,%edx
+ addl %ecx,%ebx
+ addl 60(%rsp),%eax
+ xorl %edx,%edi
+ movl %ebx,%esi
+ shldl $5,%ebx,%ebx
+ addl %edi,%eax
+ shrdl $7,%ecx,%ecx
+ addl %ebx,%eax
+ vzeroupper
+
+ 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_avx:
+ .byte 0xf3,0xc3
+
.p2align 6
K_XX_XX:
.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999
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
index da02d4c..0146ff5 100644
--- 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
@@ -11,6 +11,11 @@
movl 0(%r11),%r9d
movl 4(%r11),%r10d
movl 8(%r11),%r11d
+ andl $1073741824,%r9d
+ andl $268435968,%r10d
+ orl %r9d,%r10d
+ cmpl $1342177792,%r10d
+ je L$avx_shortcut
testl $512,%r10d
jnz L$ssse3_shortcut
pushq %rbx
@@ -2840,4 +2845,1061 @@
L$epilogue_ssse3:
.byte 0xf3,0xc3
+
+.p2align 6
+sha256_block_data_order_avx:
+L$avx_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_avx:
+
+ vzeroupper
+ 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
+ vmovdqa K256+512+32(%rip),%xmm8
+ vmovdqa K256+512+64(%rip),%xmm9
+ jmp L$loop_avx
+.p2align 4
+L$loop_avx:
+ vmovdqa K256+512(%rip),%xmm7
+ vmovdqu 0(%rsi),%xmm0
+ vmovdqu 16(%rsi),%xmm1
+ vmovdqu 32(%rsi),%xmm2
+ vmovdqu 48(%rsi),%xmm3
+ vpshufb %xmm7,%xmm0,%xmm0
+ leaq K256(%rip),%rbp
+ vpshufb %xmm7,%xmm1,%xmm1
+ vpshufb %xmm7,%xmm2,%xmm2
+ vpaddd 0(%rbp),%xmm0,%xmm4
+ vpshufb %xmm7,%xmm3,%xmm3
+ vpaddd 32(%rbp),%xmm1,%xmm5
+ vpaddd 64(%rbp),%xmm2,%xmm6
+ vpaddd 96(%rbp),%xmm3,%xmm7
+ vmovdqa %xmm4,0(%rsp)
+ movl %eax,%r14d
+ vmovdqa %xmm5,16(%rsp)
+ movl %ebx,%edi
+ vmovdqa %xmm6,32(%rsp)
+ xorl %ecx,%edi
+ vmovdqa %xmm7,48(%rsp)
+ movl %r8d,%r13d
+ jmp L$avx_00_47
+
+.p2align 4
+L$avx_00_47:
+ subq $-128,%rbp
+ vpalignr $4,%xmm0,%xmm1,%xmm4
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%eax
+ movl %r9d,%r12d
+ vpalignr $4,%xmm2,%xmm3,%xmm7
+ shrdl $9,%r14d,%r14d
+ xorl %r8d,%r13d
+ xorl %r10d,%r12d
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%r13d,%r13d
+ xorl %eax,%r14d
+ andl %r8d,%r12d
+ vpaddd %xmm7,%xmm0,%xmm0
+ xorl %r8d,%r13d
+ addl 0(%rsp),%r11d
+ movl %eax,%r15d
+ vpsrld $3,%xmm4,%xmm7
+ xorl %r10d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ebx,%r15d
+ vpslld $14,%xmm4,%xmm5
+ addl %r12d,%r11d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%r14d
+ addl %r13d,%r11d
+ xorl %ebx,%edi
+ vpshufd $250,%xmm3,%xmm7
+ shrdl $2,%r14d,%r14d
+ addl %r11d,%edx
+ addl %edi,%r11d
+ vpsrld $11,%xmm6,%xmm6
+ movl %edx,%r13d
+ addl %r11d,%r14d
+ shrdl $14,%r13d,%r13d
+ vpxor %xmm5,%xmm4,%xmm4
+ movl %r14d,%r11d
+ movl %r8d,%r12d
+ shrdl $9,%r14d,%r14d
+ vpslld $11,%xmm5,%xmm5
+ xorl %edx,%r13d
+ xorl %r9d,%r12d
+ shrdl $5,%r13d,%r13d
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %r11d,%r14d
+ andl %edx,%r12d
+ xorl %edx,%r13d
+ vpsrld $10,%xmm7,%xmm6
+ addl 4(%rsp),%r10d
+ movl %r11d,%edi
+ xorl %r9d,%r12d
+ vpxor %xmm5,%xmm4,%xmm4
+ shrdl $11,%r14d,%r14d
+ xorl %eax,%edi
+ addl %r12d,%r10d
+ vpsrlq $17,%xmm7,%xmm7
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r11d,%r14d
+ vpaddd %xmm4,%xmm0,%xmm0
+ addl %r13d,%r10d
+ xorl %eax,%r15d
+ shrdl $2,%r14d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ addl %r10d,%ecx
+ addl %r15d,%r10d
+ movl %ecx,%r13d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %r10d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r10d
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %edx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ecx,%r13d
+ vpshufb %xmm8,%xmm6,%xmm6
+ xorl %r8d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r10d,%r14d
+ vpaddd %xmm6,%xmm0,%xmm0
+ andl %ecx,%r12d
+ xorl %ecx,%r13d
+ addl 8(%rsp),%r9d
+ vpshufd $80,%xmm0,%xmm7
+ movl %r10d,%r15d
+ xorl %r8d,%r12d
+ shrdl $11,%r14d,%r14d
+ vpsrld $10,%xmm7,%xmm6
+ xorl %r11d,%r15d
+ addl %r12d,%r9d
+ shrdl $6,%r13d,%r13d
+ vpsrlq $17,%xmm7,%xmm7
+ andl %r15d,%edi
+ xorl %r10d,%r14d
+ addl %r13d,%r9d
+ vpxor %xmm7,%xmm6,%xmm6
+ xorl %r11d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r9d,%ebx
+ vpsrlq $2,%xmm7,%xmm7
+ addl %edi,%r9d
+ movl %ebx,%r13d
+ addl %r9d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r9d
+ movl %ecx,%r12d
+ vpshufb %xmm9,%xmm6,%xmm6
+ shrdl $9,%r14d,%r14d
+ xorl %ebx,%r13d
+ xorl %edx,%r12d
+ vpaddd %xmm6,%xmm0,%xmm0
+ shrdl $5,%r13d,%r13d
+ xorl %r9d,%r14d
+ andl %ebx,%r12d
+ vpaddd 0(%rbp),%xmm0,%xmm6
+ xorl %ebx,%r13d
+ addl 12(%rsp),%r8d
+ movl %r9d,%edi
+ xorl %edx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r10d,%edi
+ addl %r12d,%r8d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r9d,%r14d
+ addl %r13d,%r8d
+ xorl %r10d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r8d,%eax
+ addl %r15d,%r8d
+ movl %eax,%r13d
+ addl %r8d,%r14d
+ vmovdqa %xmm6,0(%rsp)
+ vpalignr $4,%xmm1,%xmm2,%xmm4
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r8d
+ movl %ebx,%r12d
+ vpalignr $4,%xmm3,%xmm0,%xmm7
+ shrdl $9,%r14d,%r14d
+ xorl %eax,%r13d
+ xorl %ecx,%r12d
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%r13d,%r13d
+ xorl %r8d,%r14d
+ andl %eax,%r12d
+ vpaddd %xmm7,%xmm1,%xmm1
+ xorl %eax,%r13d
+ addl 16(%rsp),%edx
+ movl %r8d,%r15d
+ vpsrld $3,%xmm4,%xmm7
+ xorl %ecx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r9d,%r15d
+ vpslld $14,%xmm4,%xmm5
+ addl %r12d,%edx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %r8d,%r14d
+ addl %r13d,%edx
+ xorl %r9d,%edi
+ vpshufd $250,%xmm0,%xmm7
+ shrdl $2,%r14d,%r14d
+ addl %edx,%r11d
+ addl %edi,%edx
+ vpsrld $11,%xmm6,%xmm6
+ movl %r11d,%r13d
+ addl %edx,%r14d
+ shrdl $14,%r13d,%r13d
+ vpxor %xmm5,%xmm4,%xmm4
+ movl %r14d,%edx
+ movl %eax,%r12d
+ shrdl $9,%r14d,%r14d
+ vpslld $11,%xmm5,%xmm5
+ xorl %r11d,%r13d
+ xorl %ebx,%r12d
+ shrdl $5,%r13d,%r13d
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %edx,%r14d
+ andl %r11d,%r12d
+ xorl %r11d,%r13d
+ vpsrld $10,%xmm7,%xmm6
+ addl 20(%rsp),%ecx
+ movl %edx,%edi
+ xorl %ebx,%r12d
+ vpxor %xmm5,%xmm4,%xmm4
+ shrdl $11,%r14d,%r14d
+ xorl %r8d,%edi
+ addl %r12d,%ecx
+ vpsrlq $17,%xmm7,%xmm7
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %edx,%r14d
+ vpaddd %xmm4,%xmm1,%xmm1
+ addl %r13d,%ecx
+ xorl %r8d,%r15d
+ shrdl $2,%r14d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ addl %ecx,%r10d
+ addl %r15d,%ecx
+ movl %r10d,%r13d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %ecx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %r11d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r10d,%r13d
+ vpshufb %xmm8,%xmm6,%xmm6
+ xorl %eax,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ecx,%r14d
+ vpaddd %xmm6,%xmm1,%xmm1
+ andl %r10d,%r12d
+ xorl %r10d,%r13d
+ addl 24(%rsp),%ebx
+ vpshufd $80,%xmm1,%xmm7
+ movl %ecx,%r15d
+ xorl %eax,%r12d
+ shrdl $11,%r14d,%r14d
+ vpsrld $10,%xmm7,%xmm6
+ xorl %edx,%r15d
+ addl %r12d,%ebx
+ shrdl $6,%r13d,%r13d
+ vpsrlq $17,%xmm7,%xmm7
+ andl %r15d,%edi
+ xorl %ecx,%r14d
+ addl %r13d,%ebx
+ vpxor %xmm7,%xmm6,%xmm6
+ xorl %edx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %ebx,%r9d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %edi,%ebx
+ movl %r9d,%r13d
+ addl %ebx,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ebx
+ movl %r10d,%r12d
+ vpshufb %xmm9,%xmm6,%xmm6
+ shrdl $9,%r14d,%r14d
+ xorl %r9d,%r13d
+ xorl %r11d,%r12d
+ vpaddd %xmm6,%xmm1,%xmm1
+ shrdl $5,%r13d,%r13d
+ xorl %ebx,%r14d
+ andl %r9d,%r12d
+ vpaddd 32(%rbp),%xmm1,%xmm6
+ xorl %r9d,%r13d
+ addl 28(%rsp),%eax
+ movl %ebx,%edi
+ xorl %r11d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ecx,%edi
+ addl %r12d,%eax
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %ebx,%r14d
+ addl %r13d,%eax
+ xorl %ecx,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %eax,%r8d
+ addl %r15d,%eax
+ movl %r8d,%r13d
+ addl %eax,%r14d
+ vmovdqa %xmm6,16(%rsp)
+ vpalignr $4,%xmm2,%xmm3,%xmm4
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%eax
+ movl %r9d,%r12d
+ vpalignr $4,%xmm0,%xmm1,%xmm7
+ shrdl $9,%r14d,%r14d
+ xorl %r8d,%r13d
+ xorl %r10d,%r12d
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%r13d,%r13d
+ xorl %eax,%r14d
+ andl %r8d,%r12d
+ vpaddd %xmm7,%xmm2,%xmm2
+ xorl %r8d,%r13d
+ addl 32(%rsp),%r11d
+ movl %eax,%r15d
+ vpsrld $3,%xmm4,%xmm7
+ xorl %r10d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ebx,%r15d
+ vpslld $14,%xmm4,%xmm5
+ addl %r12d,%r11d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %eax,%r14d
+ addl %r13d,%r11d
+ xorl %ebx,%edi
+ vpshufd $250,%xmm1,%xmm7
+ shrdl $2,%r14d,%r14d
+ addl %r11d,%edx
+ addl %edi,%r11d
+ vpsrld $11,%xmm6,%xmm6
+ movl %edx,%r13d
+ addl %r11d,%r14d
+ shrdl $14,%r13d,%r13d
+ vpxor %xmm5,%xmm4,%xmm4
+ movl %r14d,%r11d
+ movl %r8d,%r12d
+ shrdl $9,%r14d,%r14d
+ vpslld $11,%xmm5,%xmm5
+ xorl %edx,%r13d
+ xorl %r9d,%r12d
+ shrdl $5,%r13d,%r13d
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %r11d,%r14d
+ andl %edx,%r12d
+ xorl %edx,%r13d
+ vpsrld $10,%xmm7,%xmm6
+ addl 36(%rsp),%r10d
+ movl %r11d,%edi
+ xorl %r9d,%r12d
+ vpxor %xmm5,%xmm4,%xmm4
+ shrdl $11,%r14d,%r14d
+ xorl %eax,%edi
+ addl %r12d,%r10d
+ vpsrlq $17,%xmm7,%xmm7
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r11d,%r14d
+ vpaddd %xmm4,%xmm2,%xmm2
+ addl %r13d,%r10d
+ xorl %eax,%r15d
+ shrdl $2,%r14d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ addl %r10d,%ecx
+ addl %r15d,%r10d
+ movl %ecx,%r13d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %r10d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r10d
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %edx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ecx,%r13d
+ vpshufb %xmm8,%xmm6,%xmm6
+ xorl %r8d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r10d,%r14d
+ vpaddd %xmm6,%xmm2,%xmm2
+ andl %ecx,%r12d
+ xorl %ecx,%r13d
+ addl 40(%rsp),%r9d
+ vpshufd $80,%xmm2,%xmm7
+ movl %r10d,%r15d
+ xorl %r8d,%r12d
+ shrdl $11,%r14d,%r14d
+ vpsrld $10,%xmm7,%xmm6
+ xorl %r11d,%r15d
+ addl %r12d,%r9d
+ shrdl $6,%r13d,%r13d
+ vpsrlq $17,%xmm7,%xmm7
+ andl %r15d,%edi
+ xorl %r10d,%r14d
+ addl %r13d,%r9d
+ vpxor %xmm7,%xmm6,%xmm6
+ xorl %r11d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r9d,%ebx
+ vpsrlq $2,%xmm7,%xmm7
+ addl %edi,%r9d
+ movl %ebx,%r13d
+ addl %r9d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r9d
+ movl %ecx,%r12d
+ vpshufb %xmm9,%xmm6,%xmm6
+ shrdl $9,%r14d,%r14d
+ xorl %ebx,%r13d
+ xorl %edx,%r12d
+ vpaddd %xmm6,%xmm2,%xmm2
+ shrdl $5,%r13d,%r13d
+ xorl %r9d,%r14d
+ andl %ebx,%r12d
+ vpaddd 64(%rbp),%xmm2,%xmm6
+ xorl %ebx,%r13d
+ addl 44(%rsp),%r8d
+ movl %r9d,%edi
+ xorl %edx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r10d,%edi
+ addl %r12d,%r8d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r9d,%r14d
+ addl %r13d,%r8d
+ xorl %r10d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r8d,%eax
+ addl %r15d,%r8d
+ movl %eax,%r13d
+ addl %r8d,%r14d
+ vmovdqa %xmm6,32(%rsp)
+ vpalignr $4,%xmm3,%xmm0,%xmm4
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r8d
+ movl %ebx,%r12d
+ vpalignr $4,%xmm1,%xmm2,%xmm7
+ shrdl $9,%r14d,%r14d
+ xorl %eax,%r13d
+ xorl %ecx,%r12d
+ vpsrld $7,%xmm4,%xmm6
+ shrdl $5,%r13d,%r13d
+ xorl %r8d,%r14d
+ andl %eax,%r12d
+ vpaddd %xmm7,%xmm3,%xmm3
+ xorl %eax,%r13d
+ addl 48(%rsp),%edx
+ movl %r8d,%r15d
+ vpsrld $3,%xmm4,%xmm7
+ xorl %ecx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r9d,%r15d
+ vpslld $14,%xmm4,%xmm5
+ addl %r12d,%edx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ vpxor %xmm6,%xmm7,%xmm4
+ xorl %r8d,%r14d
+ addl %r13d,%edx
+ xorl %r9d,%edi
+ vpshufd $250,%xmm2,%xmm7
+ shrdl $2,%r14d,%r14d
+ addl %edx,%r11d
+ addl %edi,%edx
+ vpsrld $11,%xmm6,%xmm6
+ movl %r11d,%r13d
+ addl %edx,%r14d
+ shrdl $14,%r13d,%r13d
+ vpxor %xmm5,%xmm4,%xmm4
+ movl %r14d,%edx
+ movl %eax,%r12d
+ shrdl $9,%r14d,%r14d
+ vpslld $11,%xmm5,%xmm5
+ xorl %r11d,%r13d
+ xorl %ebx,%r12d
+ shrdl $5,%r13d,%r13d
+ vpxor %xmm6,%xmm4,%xmm4
+ xorl %edx,%r14d
+ andl %r11d,%r12d
+ xorl %r11d,%r13d
+ vpsrld $10,%xmm7,%xmm6
+ addl 52(%rsp),%ecx
+ movl %edx,%edi
+ xorl %ebx,%r12d
+ vpxor %xmm5,%xmm4,%xmm4
+ shrdl $11,%r14d,%r14d
+ xorl %r8d,%edi
+ addl %r12d,%ecx
+ vpsrlq $17,%xmm7,%xmm7
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %edx,%r14d
+ vpaddd %xmm4,%xmm3,%xmm3
+ addl %r13d,%ecx
+ xorl %r8d,%r15d
+ shrdl $2,%r14d,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ addl %ecx,%r10d
+ addl %r15d,%ecx
+ movl %r10d,%r13d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %ecx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ecx
+ vpxor %xmm7,%xmm6,%xmm6
+ movl %r11d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r10d,%r13d
+ vpshufb %xmm8,%xmm6,%xmm6
+ xorl %eax,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ecx,%r14d
+ vpaddd %xmm6,%xmm3,%xmm3
+ andl %r10d,%r12d
+ xorl %r10d,%r13d
+ addl 56(%rsp),%ebx
+ vpshufd $80,%xmm3,%xmm7
+ movl %ecx,%r15d
+ xorl %eax,%r12d
+ shrdl $11,%r14d,%r14d
+ vpsrld $10,%xmm7,%xmm6
+ xorl %edx,%r15d
+ addl %r12d,%ebx
+ shrdl $6,%r13d,%r13d
+ vpsrlq $17,%xmm7,%xmm7
+ andl %r15d,%edi
+ xorl %ecx,%r14d
+ addl %r13d,%ebx
+ vpxor %xmm7,%xmm6,%xmm6
+ xorl %edx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %ebx,%r9d
+ vpsrlq $2,%xmm7,%xmm7
+ addl %edi,%ebx
+ movl %r9d,%r13d
+ addl %ebx,%r14d
+ vpxor %xmm7,%xmm6,%xmm6
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ebx
+ movl %r10d,%r12d
+ vpshufb %xmm9,%xmm6,%xmm6
+ shrdl $9,%r14d,%r14d
+ xorl %r9d,%r13d
+ xorl %r11d,%r12d
+ vpaddd %xmm6,%xmm3,%xmm3
+ shrdl $5,%r13d,%r13d
+ xorl %ebx,%r14d
+ andl %r9d,%r12d
+ vpaddd 96(%rbp),%xmm3,%xmm6
+ xorl %r9d,%r13d
+ addl 60(%rsp),%eax
+ movl %ebx,%edi
+ xorl %r11d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ecx,%edi
+ addl %r12d,%eax
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %ebx,%r14d
+ addl %r13d,%eax
+ xorl %ecx,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %eax,%r8d
+ addl %r15d,%eax
+ movl %r8d,%r13d
+ addl %eax,%r14d
+ vmovdqa %xmm6,48(%rsp)
+ cmpb $0,131(%rbp)
+ jne L$avx_00_47
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%eax
+ movl %r9d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r8d,%r13d
+ xorl %r10d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %eax,%r14d
+ andl %r8d,%r12d
+ xorl %r8d,%r13d
+ addl 0(%rsp),%r11d
+ movl %eax,%r15d
+ xorl %r10d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ebx,%r15d
+ addl %r12d,%r11d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %eax,%r14d
+ addl %r13d,%r11d
+ xorl %ebx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r11d,%edx
+ addl %edi,%r11d
+ movl %edx,%r13d
+ addl %r11d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r11d
+ movl %r8d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %edx,%r13d
+ xorl %r9d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r11d,%r14d
+ andl %edx,%r12d
+ xorl %edx,%r13d
+ addl 4(%rsp),%r10d
+ movl %r11d,%edi
+ xorl %r9d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %eax,%edi
+ addl %r12d,%r10d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r11d,%r14d
+ addl %r13d,%r10d
+ xorl %eax,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r10d,%ecx
+ addl %r15d,%r10d
+ movl %ecx,%r13d
+ addl %r10d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r10d
+ movl %edx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ecx,%r13d
+ xorl %r8d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r10d,%r14d
+ andl %ecx,%r12d
+ xorl %ecx,%r13d
+ addl 8(%rsp),%r9d
+ movl %r10d,%r15d
+ xorl %r8d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r11d,%r15d
+ addl %r12d,%r9d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %r10d,%r14d
+ addl %r13d,%r9d
+ xorl %r11d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r9d,%ebx
+ addl %edi,%r9d
+ movl %ebx,%r13d
+ addl %r9d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r9d
+ movl %ecx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ebx,%r13d
+ xorl %edx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r9d,%r14d
+ andl %ebx,%r12d
+ xorl %ebx,%r13d
+ addl 12(%rsp),%r8d
+ movl %r9d,%edi
+ xorl %edx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r10d,%edi
+ addl %r12d,%r8d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r9d,%r14d
+ addl %r13d,%r8d
+ xorl %r10d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r8d,%eax
+ addl %r15d,%r8d
+ movl %eax,%r13d
+ addl %r8d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r8d
+ movl %ebx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %eax,%r13d
+ xorl %ecx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r8d,%r14d
+ andl %eax,%r12d
+ xorl %eax,%r13d
+ addl 16(%rsp),%edx
+ movl %r8d,%r15d
+ xorl %ecx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r9d,%r15d
+ addl %r12d,%edx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %r8d,%r14d
+ addl %r13d,%edx
+ xorl %r9d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %edx,%r11d
+ addl %edi,%edx
+ movl %r11d,%r13d
+ addl %edx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%edx
+ movl %eax,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r11d,%r13d
+ xorl %ebx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %edx,%r14d
+ andl %r11d,%r12d
+ xorl %r11d,%r13d
+ addl 20(%rsp),%ecx
+ movl %edx,%edi
+ xorl %ebx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r8d,%edi
+ addl %r12d,%ecx
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %edx,%r14d
+ addl %r13d,%ecx
+ xorl %r8d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %ecx,%r10d
+ addl %r15d,%ecx
+ movl %r10d,%r13d
+ addl %ecx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ecx
+ movl %r11d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r10d,%r13d
+ xorl %eax,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ecx,%r14d
+ andl %r10d,%r12d
+ xorl %r10d,%r13d
+ addl 24(%rsp),%ebx
+ movl %ecx,%r15d
+ xorl %eax,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %edx,%r15d
+ addl %r12d,%ebx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %ecx,%r14d
+ addl %r13d,%ebx
+ xorl %edx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %ebx,%r9d
+ addl %edi,%ebx
+ movl %r9d,%r13d
+ addl %ebx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ebx
+ movl %r10d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r9d,%r13d
+ xorl %r11d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ebx,%r14d
+ andl %r9d,%r12d
+ xorl %r9d,%r13d
+ addl 28(%rsp),%eax
+ movl %ebx,%edi
+ xorl %r11d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ecx,%edi
+ addl %r12d,%eax
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %ebx,%r14d
+ addl %r13d,%eax
+ xorl %ecx,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %eax,%r8d
+ addl %r15d,%eax
+ movl %r8d,%r13d
+ addl %eax,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%eax
+ movl %r9d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r8d,%r13d
+ xorl %r10d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %eax,%r14d
+ andl %r8d,%r12d
+ xorl %r8d,%r13d
+ addl 32(%rsp),%r11d
+ movl %eax,%r15d
+ xorl %r10d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ebx,%r15d
+ addl %r12d,%r11d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %eax,%r14d
+ addl %r13d,%r11d
+ xorl %ebx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r11d,%edx
+ addl %edi,%r11d
+ movl %edx,%r13d
+ addl %r11d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r11d
+ movl %r8d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %edx,%r13d
+ xorl %r9d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r11d,%r14d
+ andl %edx,%r12d
+ xorl %edx,%r13d
+ addl 36(%rsp),%r10d
+ movl %r11d,%edi
+ xorl %r9d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %eax,%edi
+ addl %r12d,%r10d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r11d,%r14d
+ addl %r13d,%r10d
+ xorl %eax,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r10d,%ecx
+ addl %r15d,%r10d
+ movl %ecx,%r13d
+ addl %r10d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r10d
+ movl %edx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ecx,%r13d
+ xorl %r8d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r10d,%r14d
+ andl %ecx,%r12d
+ xorl %ecx,%r13d
+ addl 40(%rsp),%r9d
+ movl %r10d,%r15d
+ xorl %r8d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r11d,%r15d
+ addl %r12d,%r9d
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %r10d,%r14d
+ addl %r13d,%r9d
+ xorl %r11d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %r9d,%ebx
+ addl %edi,%r9d
+ movl %ebx,%r13d
+ addl %r9d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r9d
+ movl %ecx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %ebx,%r13d
+ xorl %edx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r9d,%r14d
+ andl %ebx,%r12d
+ xorl %ebx,%r13d
+ addl 44(%rsp),%r8d
+ movl %r9d,%edi
+ xorl %edx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r10d,%edi
+ addl %r12d,%r8d
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %r9d,%r14d
+ addl %r13d,%r8d
+ xorl %r10d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %r8d,%eax
+ addl %r15d,%r8d
+ movl %eax,%r13d
+ addl %r8d,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%r8d
+ movl %ebx,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %eax,%r13d
+ xorl %ecx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %r8d,%r14d
+ andl %eax,%r12d
+ xorl %eax,%r13d
+ addl 48(%rsp),%edx
+ movl %r8d,%r15d
+ xorl %ecx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r9d,%r15d
+ addl %r12d,%edx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %r8d,%r14d
+ addl %r13d,%edx
+ xorl %r9d,%edi
+ shrdl $2,%r14d,%r14d
+ addl %edx,%r11d
+ addl %edi,%edx
+ movl %r11d,%r13d
+ addl %edx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%edx
+ movl %eax,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r11d,%r13d
+ xorl %ebx,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %edx,%r14d
+ andl %r11d,%r12d
+ xorl %r11d,%r13d
+ addl 52(%rsp),%ecx
+ movl %edx,%edi
+ xorl %ebx,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %r8d,%edi
+ addl %r12d,%ecx
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %edx,%r14d
+ addl %r13d,%ecx
+ xorl %r8d,%r15d
+ shrdl $2,%r14d,%r14d
+ addl %ecx,%r10d
+ addl %r15d,%ecx
+ movl %r10d,%r13d
+ addl %ecx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ecx
+ movl %r11d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r10d,%r13d
+ xorl %eax,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ecx,%r14d
+ andl %r10d,%r12d
+ xorl %r10d,%r13d
+ addl 56(%rsp),%ebx
+ movl %ecx,%r15d
+ xorl %eax,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %edx,%r15d
+ addl %r12d,%ebx
+ shrdl $6,%r13d,%r13d
+ andl %r15d,%edi
+ xorl %ecx,%r14d
+ addl %r13d,%ebx
+ xorl %edx,%edi
+ shrdl $2,%r14d,%r14d
+ addl %ebx,%r9d
+ addl %edi,%ebx
+ movl %r9d,%r13d
+ addl %ebx,%r14d
+ shrdl $14,%r13d,%r13d
+ movl %r14d,%ebx
+ movl %r10d,%r12d
+ shrdl $9,%r14d,%r14d
+ xorl %r9d,%r13d
+ xorl %r11d,%r12d
+ shrdl $5,%r13d,%r13d
+ xorl %ebx,%r14d
+ andl %r9d,%r12d
+ xorl %r9d,%r13d
+ addl 60(%rsp),%eax
+ movl %ebx,%edi
+ xorl %r11d,%r12d
+ shrdl $11,%r14d,%r14d
+ xorl %ecx,%edi
+ addl %r12d,%eax
+ shrdl $6,%r13d,%r13d
+ andl %edi,%r15d
+ xorl %ebx,%r14d
+ addl %r13d,%eax
+ xorl %ecx,%r15d
+ shrdl $2,%r14d,%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_avx
+
+ movq 64+24(%rsp),%rsi
+ vzeroupper
+ 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_avx:
+ .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
index 2f5d912..aeabd3f 100644
--- 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
@@ -7,6 +7,17 @@
.p2align 4
_sha512_block_data_order:
+ leaq _OPENSSL_ia32cap_P(%rip),%r11
+ movl 0(%r11),%r9d
+ movl 4(%r11),%r10d
+ movl 8(%r11),%r11d
+ testl $2048,%r10d
+ jnz L$xop_shortcut
+ andl $1073741824,%r9d
+ andl $268435968,%r10d
+ orl %r9d,%r10d
+ cmpl $1342177792,%r10d
+ je L$avx_shortcut
pushq %rbx
pushq %rbp
pushq %r12
@@ -1783,4 +1794,2234 @@
.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
+
+.p2align 6
+sha512_block_data_order_xop:
+L$xop_shortcut:
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq %rsp,%r11
+ shlq $4,%rdx
+ subq $160,%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_xop:
+
+ vzeroupper
+ 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_xop
+.p2align 4
+L$loop_xop:
+ vmovdqa K512+1280(%rip),%xmm11
+ vmovdqu 0(%rsi),%xmm0
+ leaq K512+128(%rip),%rbp
+ vmovdqu 16(%rsi),%xmm1
+ vmovdqu 32(%rsi),%xmm2
+ vpshufb %xmm11,%xmm0,%xmm0
+ vmovdqu 48(%rsi),%xmm3
+ vpshufb %xmm11,%xmm1,%xmm1
+ vmovdqu 64(%rsi),%xmm4
+ vpshufb %xmm11,%xmm2,%xmm2
+ vmovdqu 80(%rsi),%xmm5
+ vpshufb %xmm11,%xmm3,%xmm3
+ vmovdqu 96(%rsi),%xmm6
+ vpshufb %xmm11,%xmm4,%xmm4
+ vmovdqu 112(%rsi),%xmm7
+ vpshufb %xmm11,%xmm5,%xmm5
+ vpaddq -128(%rbp),%xmm0,%xmm8
+ vpshufb %xmm11,%xmm6,%xmm6
+ vpaddq -96(%rbp),%xmm1,%xmm9
+ vpshufb %xmm11,%xmm7,%xmm7
+ vpaddq -64(%rbp),%xmm2,%xmm10
+ vpaddq -32(%rbp),%xmm3,%xmm11
+ vmovdqa %xmm8,0(%rsp)
+ vpaddq 0(%rbp),%xmm4,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ vpaddq 32(%rbp),%xmm5,%xmm9
+ vmovdqa %xmm10,32(%rsp)
+ vpaddq 64(%rbp),%xmm6,%xmm10
+ vmovdqa %xmm11,48(%rsp)
+ vpaddq 96(%rbp),%xmm7,%xmm11
+ vmovdqa %xmm8,64(%rsp)
+ movq %rax,%r14
+ vmovdqa %xmm9,80(%rsp)
+ movq %rbx,%rdi
+ vmovdqa %xmm10,96(%rsp)
+ xorq %rcx,%rdi
+ vmovdqa %xmm11,112(%rsp)
+ movq %r8,%r13
+ jmp L$xop_00_47
+
+.p2align 4
+L$xop_00_47:
+ addq $256,%rbp
+ vpalignr $8,%xmm0,%xmm1,%xmm8
+ rorq $23,%r13
+ movq %r14,%rax
+ vpalignr $8,%xmm4,%xmm5,%xmm11
+ movq %r9,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %r8,%r13
+ xorq %r10,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %rax,%r14
+ vpaddq %xmm11,%xmm0,%xmm0
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 0(%rsp),%r11
+ movq %rax,%r15
+.byte 143,72,120,195,209,7
+ xorq %r10,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %rbx,%r15
+ addq %r12,%r11
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,223,3
+ xorq %rax,%r14
+ addq %r13,%r11
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rbx,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm7,%xmm10
+ addq %r11,%rdx
+ addq %rdi,%r11
+ vpaddq %xmm8,%xmm0,%xmm0
+ movq %rdx,%r13
+ addq %r11,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%r11
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %r8,%r12
+ rorq $5,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ vpaddq %xmm11,%xmm0,%xmm0
+ addq 8(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ rorq $6,%r14
+ vpaddq -128(%rbp),%xmm0,%xmm10
+ xorq %rax,%rdi
+ addq %r12,%r10
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ rorq $28,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ vmovdqa %xmm10,0(%rsp)
+ vpalignr $8,%xmm1,%xmm2,%xmm8
+ rorq $23,%r13
+ movq %r14,%r10
+ vpalignr $8,%xmm5,%xmm6,%xmm11
+ movq %rdx,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %r10,%r14
+ vpaddq %xmm11,%xmm1,%xmm1
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 16(%rsp),%r9
+ movq %r10,%r15
+.byte 143,72,120,195,209,7
+ xorq %r8,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %r11,%r15
+ addq %r12,%r9
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,216,3
+ xorq %r10,%r14
+ addq %r13,%r9
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r11,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm0,%xmm10
+ addq %r9,%rbx
+ addq %rdi,%r9
+ vpaddq %xmm8,%xmm1,%xmm1
+ movq %rbx,%r13
+ addq %r9,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%r9
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %rcx,%r12
+ rorq $5,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ vpaddq %xmm11,%xmm1,%xmm1
+ addq 24(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ rorq $6,%r14
+ vpaddq -96(%rbp),%xmm1,%xmm10
+ xorq %r10,%rdi
+ addq %r12,%r8
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ rorq $28,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ vmovdqa %xmm10,16(%rsp)
+ vpalignr $8,%xmm2,%xmm3,%xmm8
+ rorq $23,%r13
+ movq %r14,%r8
+ vpalignr $8,%xmm6,%xmm7,%xmm11
+ movq %rbx,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %r8,%r14
+ vpaddq %xmm11,%xmm2,%xmm2
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 32(%rsp),%rdx
+ movq %r8,%r15
+.byte 143,72,120,195,209,7
+ xorq %rcx,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %r9,%r15
+ addq %r12,%rdx
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,217,3
+ xorq %r8,%r14
+ addq %r13,%rdx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r9,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm1,%xmm10
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ vpaddq %xmm8,%xmm2,%xmm2
+ movq %r11,%r13
+ addq %rdx,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%rdx
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %rax,%r12
+ rorq $5,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ vpaddq %xmm11,%xmm2,%xmm2
+ addq 40(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ rorq $6,%r14
+ vpaddq -64(%rbp),%xmm2,%xmm10
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ rorq $28,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ vmovdqa %xmm10,32(%rsp)
+ vpalignr $8,%xmm3,%xmm4,%xmm8
+ rorq $23,%r13
+ movq %r14,%rcx
+ vpalignr $8,%xmm7,%xmm0,%xmm11
+ movq %r11,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %r10,%r13
+ xorq %rax,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %rcx,%r14
+ vpaddq %xmm11,%xmm3,%xmm3
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 48(%rsp),%rbx
+ movq %rcx,%r15
+.byte 143,72,120,195,209,7
+ xorq %rax,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,218,3
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rdx,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm2,%xmm10
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ vpaddq %xmm8,%xmm3,%xmm3
+ movq %r9,%r13
+ addq %rbx,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%rbx
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %r10,%r12
+ rorq $5,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ vpaddq %xmm11,%xmm3,%xmm3
+ addq 56(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ rorq $6,%r14
+ vpaddq -32(%rbp),%xmm3,%xmm10
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ rorq $28,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ vmovdqa %xmm10,48(%rsp)
+ vpalignr $8,%xmm4,%xmm5,%xmm8
+ rorq $23,%r13
+ movq %r14,%rax
+ vpalignr $8,%xmm0,%xmm1,%xmm11
+ movq %r9,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %r8,%r13
+ xorq %r10,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %rax,%r14
+ vpaddq %xmm11,%xmm4,%xmm4
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 64(%rsp),%r11
+ movq %rax,%r15
+.byte 143,72,120,195,209,7
+ xorq %r10,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %rbx,%r15
+ addq %r12,%r11
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,219,3
+ xorq %rax,%r14
+ addq %r13,%r11
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rbx,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm3,%xmm10
+ addq %r11,%rdx
+ addq %rdi,%r11
+ vpaddq %xmm8,%xmm4,%xmm4
+ movq %rdx,%r13
+ addq %r11,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%r11
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %r8,%r12
+ rorq $5,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ vpaddq %xmm11,%xmm4,%xmm4
+ addq 72(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ rorq $6,%r14
+ vpaddq 0(%rbp),%xmm4,%xmm10
+ xorq %rax,%rdi
+ addq %r12,%r10
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ rorq $28,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ vmovdqa %xmm10,64(%rsp)
+ vpalignr $8,%xmm5,%xmm6,%xmm8
+ rorq $23,%r13
+ movq %r14,%r10
+ vpalignr $8,%xmm1,%xmm2,%xmm11
+ movq %rdx,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %r10,%r14
+ vpaddq %xmm11,%xmm5,%xmm5
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 80(%rsp),%r9
+ movq %r10,%r15
+.byte 143,72,120,195,209,7
+ xorq %r8,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %r11,%r15
+ addq %r12,%r9
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,220,3
+ xorq %r10,%r14
+ addq %r13,%r9
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r11,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm4,%xmm10
+ addq %r9,%rbx
+ addq %rdi,%r9
+ vpaddq %xmm8,%xmm5,%xmm5
+ movq %rbx,%r13
+ addq %r9,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%r9
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %rcx,%r12
+ rorq $5,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ vpaddq %xmm11,%xmm5,%xmm5
+ addq 88(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ rorq $6,%r14
+ vpaddq 32(%rbp),%xmm5,%xmm10
+ xorq %r10,%rdi
+ addq %r12,%r8
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ rorq $28,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ vmovdqa %xmm10,80(%rsp)
+ vpalignr $8,%xmm6,%xmm7,%xmm8
+ rorq $23,%r13
+ movq %r14,%r8
+ vpalignr $8,%xmm2,%xmm3,%xmm11
+ movq %rbx,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %r8,%r14
+ vpaddq %xmm11,%xmm6,%xmm6
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 96(%rsp),%rdx
+ movq %r8,%r15
+.byte 143,72,120,195,209,7
+ xorq %rcx,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %r9,%r15
+ addq %r12,%rdx
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,221,3
+ xorq %r8,%r14
+ addq %r13,%rdx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r9,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm5,%xmm10
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ vpaddq %xmm8,%xmm6,%xmm6
+ movq %r11,%r13
+ addq %rdx,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%rdx
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %rax,%r12
+ rorq $5,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ vpaddq %xmm11,%xmm6,%xmm6
+ addq 104(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ rorq $6,%r14
+ vpaddq 64(%rbp),%xmm6,%xmm10
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ rorq $28,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ vmovdqa %xmm10,96(%rsp)
+ vpalignr $8,%xmm7,%xmm0,%xmm8
+ rorq $23,%r13
+ movq %r14,%rcx
+ vpalignr $8,%xmm3,%xmm4,%xmm11
+ movq %r11,%r12
+ rorq $5,%r14
+.byte 143,72,120,195,200,56
+ xorq %r10,%r13
+ xorq %rax,%r12
+ vpsrlq $7,%xmm8,%xmm8
+ rorq $4,%r13
+ xorq %rcx,%r14
+ vpaddq %xmm11,%xmm7,%xmm7
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 112(%rsp),%rbx
+ movq %rcx,%r15
+.byte 143,72,120,195,209,7
+ xorq %rax,%r12
+ rorq $6,%r14
+ vpxor %xmm9,%xmm8,%xmm8
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ rorq $14,%r13
+ andq %r15,%rdi
+.byte 143,104,120,195,222,3
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rdx,%rdi
+ rorq $28,%r14
+ vpsrlq $6,%xmm6,%xmm10
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ vpaddq %xmm8,%xmm7,%xmm7
+ movq %r9,%r13
+ addq %rbx,%r14
+.byte 143,72,120,195,203,42
+ rorq $23,%r13
+ movq %r14,%rbx
+ vpxor %xmm10,%xmm11,%xmm11
+ movq %r10,%r12
+ rorq $5,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ vpxor %xmm9,%xmm11,%xmm11
+ rorq $4,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ vpaddq %xmm11,%xmm7,%xmm7
+ addq 120(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ rorq $6,%r14
+ vpaddq 96(%rbp),%xmm7,%xmm10
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ rorq $28,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ vmovdqa %xmm10,112(%rsp)
+ cmpb $0,135(%rbp)
+ jne L$xop_00_47
+ rorq $23,%r13
+ movq %r14,%rax
+ movq %r9,%r12
+ rorq $5,%r14
+ xorq %r8,%r13
+ xorq %r10,%r12
+ rorq $4,%r13
+ xorq %rax,%r14
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 0(%rsp),%r11
+ movq %rax,%r15
+ xorq %r10,%r12
+ rorq $6,%r14
+ xorq %rbx,%r15
+ addq %r12,%r11
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %rax,%r14
+ addq %r13,%r11
+ xorq %rbx,%rdi
+ rorq $28,%r14
+ addq %r11,%rdx
+ addq %rdi,%r11
+ movq %rdx,%r13
+ addq %r11,%r14
+ rorq $23,%r13
+ movq %r14,%r11
+ movq %r8,%r12
+ rorq $5,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ rorq $4,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ addq 8(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ rorq $6,%r14
+ xorq %rax,%rdi
+ addq %r12,%r10
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ rorq $28,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ rorq $23,%r13
+ movq %r14,%r10
+ movq %rdx,%r12
+ rorq $5,%r14
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ rorq $4,%r13
+ xorq %r10,%r14
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 16(%rsp),%r9
+ movq %r10,%r15
+ xorq %r8,%r12
+ rorq $6,%r14
+ xorq %r11,%r15
+ addq %r12,%r9
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %r10,%r14
+ addq %r13,%r9
+ xorq %r11,%rdi
+ rorq $28,%r14
+ addq %r9,%rbx
+ addq %rdi,%r9
+ movq %rbx,%r13
+ addq %r9,%r14
+ rorq $23,%r13
+ movq %r14,%r9
+ movq %rcx,%r12
+ rorq $5,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ rorq $4,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ addq 24(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ rorq $6,%r14
+ xorq %r10,%rdi
+ addq %r12,%r8
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ rorq $28,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ rorq $23,%r13
+ movq %r14,%r8
+ movq %rbx,%r12
+ rorq $5,%r14
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ rorq $4,%r13
+ xorq %r8,%r14
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 32(%rsp),%rdx
+ movq %r8,%r15
+ xorq %rcx,%r12
+ rorq $6,%r14
+ xorq %r9,%r15
+ addq %r12,%rdx
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %r8,%r14
+ addq %r13,%rdx
+ xorq %r9,%rdi
+ rorq $28,%r14
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ movq %r11,%r13
+ addq %rdx,%r14
+ rorq $23,%r13
+ movq %r14,%rdx
+ movq %rax,%r12
+ rorq $5,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ rorq $4,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ addq 40(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ rorq $6,%r14
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ rorq $28,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ rorq $23,%r13
+ movq %r14,%rcx
+ movq %r11,%r12
+ rorq $5,%r14
+ xorq %r10,%r13
+ xorq %rax,%r12
+ rorq $4,%r13
+ xorq %rcx,%r14
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 48(%rsp),%rbx
+ movq %rcx,%r15
+ xorq %rax,%r12
+ rorq $6,%r14
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ xorq %rdx,%rdi
+ rorq $28,%r14
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ movq %r9,%r13
+ addq %rbx,%r14
+ rorq $23,%r13
+ movq %r14,%rbx
+ movq %r10,%r12
+ rorq $5,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ rorq $4,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ addq 56(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ rorq $6,%r14
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ rorq $28,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ rorq $23,%r13
+ movq %r14,%rax
+ movq %r9,%r12
+ rorq $5,%r14
+ xorq %r8,%r13
+ xorq %r10,%r12
+ rorq $4,%r13
+ xorq %rax,%r14
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 64(%rsp),%r11
+ movq %rax,%r15
+ xorq %r10,%r12
+ rorq $6,%r14
+ xorq %rbx,%r15
+ addq %r12,%r11
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %rax,%r14
+ addq %r13,%r11
+ xorq %rbx,%rdi
+ rorq $28,%r14
+ addq %r11,%rdx
+ addq %rdi,%r11
+ movq %rdx,%r13
+ addq %r11,%r14
+ rorq $23,%r13
+ movq %r14,%r11
+ movq %r8,%r12
+ rorq $5,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ rorq $4,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ addq 72(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ rorq $6,%r14
+ xorq %rax,%rdi
+ addq %r12,%r10
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ rorq $28,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ rorq $23,%r13
+ movq %r14,%r10
+ movq %rdx,%r12
+ rorq $5,%r14
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ rorq $4,%r13
+ xorq %r10,%r14
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 80(%rsp),%r9
+ movq %r10,%r15
+ xorq %r8,%r12
+ rorq $6,%r14
+ xorq %r11,%r15
+ addq %r12,%r9
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %r10,%r14
+ addq %r13,%r9
+ xorq %r11,%rdi
+ rorq $28,%r14
+ addq %r9,%rbx
+ addq %rdi,%r9
+ movq %rbx,%r13
+ addq %r9,%r14
+ rorq $23,%r13
+ movq %r14,%r9
+ movq %rcx,%r12
+ rorq $5,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ rorq $4,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ addq 88(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ rorq $6,%r14
+ xorq %r10,%rdi
+ addq %r12,%r8
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ rorq $28,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ rorq $23,%r13
+ movq %r14,%r8
+ movq %rbx,%r12
+ rorq $5,%r14
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ rorq $4,%r13
+ xorq %r8,%r14
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 96(%rsp),%rdx
+ movq %r8,%r15
+ xorq %rcx,%r12
+ rorq $6,%r14
+ xorq %r9,%r15
+ addq %r12,%rdx
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %r8,%r14
+ addq %r13,%rdx
+ xorq %r9,%rdi
+ rorq $28,%r14
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ movq %r11,%r13
+ addq %rdx,%r14
+ rorq $23,%r13
+ movq %r14,%rdx
+ movq %rax,%r12
+ rorq $5,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ rorq $4,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ addq 104(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ rorq $6,%r14
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ rorq $28,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ rorq $23,%r13
+ movq %r14,%rcx
+ movq %r11,%r12
+ rorq $5,%r14
+ xorq %r10,%r13
+ xorq %rax,%r12
+ rorq $4,%r13
+ xorq %rcx,%r14
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 112(%rsp),%rbx
+ movq %rcx,%r15
+ xorq %rax,%r12
+ rorq $6,%r14
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ rorq $14,%r13
+ andq %r15,%rdi
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ xorq %rdx,%rdi
+ rorq $28,%r14
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ movq %r9,%r13
+ addq %rbx,%r14
+ rorq $23,%r13
+ movq %r14,%rbx
+ movq %r10,%r12
+ rorq $5,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ rorq $4,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ addq 120(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ rorq $6,%r14
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ rorq $14,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ rorq $28,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ movq 128+0(%rsp),%rdi
+ movq %r14,%rax
+
+ addq 0(%rdi),%rax
+ leaq 128(%rsi),%rsi
+ 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_xop
+
+ movq 128+24(%rsp),%rsi
+ vzeroupper
+ 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_xop:
+ .byte 0xf3,0xc3
+
+
+.p2align 6
+sha512_block_data_order_avx:
+L$avx_shortcut:
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq %rsp,%r11
+ shlq $4,%rdx
+ subq $160,%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_avx:
+
+ vzeroupper
+ 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_avx
+.p2align 4
+L$loop_avx:
+ vmovdqa K512+1280(%rip),%xmm11
+ vmovdqu 0(%rsi),%xmm0
+ leaq K512+128(%rip),%rbp
+ vmovdqu 16(%rsi),%xmm1
+ vmovdqu 32(%rsi),%xmm2
+ vpshufb %xmm11,%xmm0,%xmm0
+ vmovdqu 48(%rsi),%xmm3
+ vpshufb %xmm11,%xmm1,%xmm1
+ vmovdqu 64(%rsi),%xmm4
+ vpshufb %xmm11,%xmm2,%xmm2
+ vmovdqu 80(%rsi),%xmm5
+ vpshufb %xmm11,%xmm3,%xmm3
+ vmovdqu 96(%rsi),%xmm6
+ vpshufb %xmm11,%xmm4,%xmm4
+ vmovdqu 112(%rsi),%xmm7
+ vpshufb %xmm11,%xmm5,%xmm5
+ vpaddq -128(%rbp),%xmm0,%xmm8
+ vpshufb %xmm11,%xmm6,%xmm6
+ vpaddq -96(%rbp),%xmm1,%xmm9
+ vpshufb %xmm11,%xmm7,%xmm7
+ vpaddq -64(%rbp),%xmm2,%xmm10
+ vpaddq -32(%rbp),%xmm3,%xmm11
+ vmovdqa %xmm8,0(%rsp)
+ vpaddq 0(%rbp),%xmm4,%xmm8
+ vmovdqa %xmm9,16(%rsp)
+ vpaddq 32(%rbp),%xmm5,%xmm9
+ vmovdqa %xmm10,32(%rsp)
+ vpaddq 64(%rbp),%xmm6,%xmm10
+ vmovdqa %xmm11,48(%rsp)
+ vpaddq 96(%rbp),%xmm7,%xmm11
+ vmovdqa %xmm8,64(%rsp)
+ movq %rax,%r14
+ vmovdqa %xmm9,80(%rsp)
+ movq %rbx,%rdi
+ vmovdqa %xmm10,96(%rsp)
+ xorq %rcx,%rdi
+ vmovdqa %xmm11,112(%rsp)
+ movq %r8,%r13
+ jmp L$avx_00_47
+
+.p2align 4
+L$avx_00_47:
+ addq $256,%rbp
+ vpalignr $8,%xmm0,%xmm1,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%rax
+ vpalignr $8,%xmm4,%xmm5,%xmm11
+ movq %r9,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %r8,%r13
+ xorq %r10,%r12
+ vpaddq %xmm11,%xmm0,%xmm0
+ shrdq $4,%r13,%r13
+ xorq %rax,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %r8,%r12
+ xorq %r8,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 0(%rsp),%r11
+ movq %rax,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %r10,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %rbx,%r15
+ addq %r12,%r11
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %rax,%r14
+ addq %r13,%r11
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rbx,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm7,%xmm11
+ addq %r11,%rdx
+ addq %rdi,%r11
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %rdx,%r13
+ addq %r11,%r14
+ vpsllq $3,%xmm7,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%r11
+ vpaddq %xmm8,%xmm0,%xmm0
+ movq %r8,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm7,%xmm9
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %r11,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 8(%rsp),%r10
+ movq %r11,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %r9,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %rax,%rdi
+ addq %r12,%r10
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm0,%xmm0
+ xorq %r11,%r14
+ addq %r13,%r10
+ vpaddq -128(%rbp),%xmm0,%xmm10
+ xorq %rax,%r15
+ shrdq $28,%r14,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ vmovdqa %xmm10,0(%rsp)
+ vpalignr $8,%xmm1,%xmm2,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%r10
+ vpalignr $8,%xmm5,%xmm6,%xmm11
+ movq %rdx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ vpaddq %xmm11,%xmm1,%xmm1
+ shrdq $4,%r13,%r13
+ xorq %r10,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 16(%rsp),%r9
+ movq %r10,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %r8,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %r11,%r15
+ addq %r12,%r9
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %r10,%r14
+ addq %r13,%r9
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r11,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm0,%xmm11
+ addq %r9,%rbx
+ addq %rdi,%r9
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %rbx,%r13
+ addq %r9,%r14
+ vpsllq $3,%xmm0,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%r9
+ vpaddq %xmm8,%xmm1,%xmm1
+ movq %rcx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm0,%xmm9
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %r9,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 24(%rsp),%r8
+ movq %r9,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %rdx,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %r10,%rdi
+ addq %r12,%r8
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm1,%xmm1
+ xorq %r9,%r14
+ addq %r13,%r8
+ vpaddq -96(%rbp),%xmm1,%xmm10
+ xorq %r10,%r15
+ shrdq $28,%r14,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ vmovdqa %xmm10,16(%rsp)
+ vpalignr $8,%xmm2,%xmm3,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%r8
+ vpalignr $8,%xmm6,%xmm7,%xmm11
+ movq %rbx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ vpaddq %xmm11,%xmm2,%xmm2
+ shrdq $4,%r13,%r13
+ xorq %r8,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %rax,%r12
+ xorq %rax,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 32(%rsp),%rdx
+ movq %r8,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %rcx,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %r9,%r15
+ addq %r12,%rdx
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %r8,%r14
+ addq %r13,%rdx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r9,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm1,%xmm11
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %r11,%r13
+ addq %rdx,%r14
+ vpsllq $3,%xmm1,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%rdx
+ vpaddq %xmm8,%xmm2,%xmm2
+ movq %rax,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm1,%xmm9
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %rdx,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %r11,%r12
+ xorq %r11,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 40(%rsp),%rcx
+ movq %rdx,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %rbx,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm2,%xmm2
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ vpaddq -64(%rbp),%xmm2,%xmm10
+ xorq %r8,%r15
+ shrdq $28,%r14,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ vmovdqa %xmm10,32(%rsp)
+ vpalignr $8,%xmm3,%xmm4,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%rcx
+ vpalignr $8,%xmm7,%xmm0,%xmm11
+ movq %r11,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %r10,%r13
+ xorq %rax,%r12
+ vpaddq %xmm11,%xmm3,%xmm3
+ shrdq $4,%r13,%r13
+ xorq %rcx,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %r10,%r12
+ xorq %r10,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 48(%rsp),%rbx
+ movq %rcx,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %rax,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rdx,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm2,%xmm11
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %r9,%r13
+ addq %rbx,%r14
+ vpsllq $3,%xmm2,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%rbx
+ vpaddq %xmm8,%xmm3,%xmm3
+ movq %r10,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm2,%xmm9
+ xorq %r9,%r13
+ xorq %r11,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %rbx,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %r9,%r12
+ xorq %r9,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 56(%rsp),%rax
+ movq %rbx,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %r11,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm3,%xmm3
+ xorq %rbx,%r14
+ addq %r13,%rax
+ vpaddq -32(%rbp),%xmm3,%xmm10
+ xorq %rcx,%r15
+ shrdq $28,%r14,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ vmovdqa %xmm10,48(%rsp)
+ vpalignr $8,%xmm4,%xmm5,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%rax
+ vpalignr $8,%xmm0,%xmm1,%xmm11
+ movq %r9,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %r8,%r13
+ xorq %r10,%r12
+ vpaddq %xmm11,%xmm4,%xmm4
+ shrdq $4,%r13,%r13
+ xorq %rax,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %r8,%r12
+ xorq %r8,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 64(%rsp),%r11
+ movq %rax,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %r10,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %rbx,%r15
+ addq %r12,%r11
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %rax,%r14
+ addq %r13,%r11
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rbx,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm3,%xmm11
+ addq %r11,%rdx
+ addq %rdi,%r11
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %rdx,%r13
+ addq %r11,%r14
+ vpsllq $3,%xmm3,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%r11
+ vpaddq %xmm8,%xmm4,%xmm4
+ movq %r8,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm3,%xmm9
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %r11,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 72(%rsp),%r10
+ movq %r11,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %r9,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %rax,%rdi
+ addq %r12,%r10
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm4,%xmm4
+ xorq %r11,%r14
+ addq %r13,%r10
+ vpaddq 0(%rbp),%xmm4,%xmm10
+ xorq %rax,%r15
+ shrdq $28,%r14,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ vmovdqa %xmm10,64(%rsp)
+ vpalignr $8,%xmm5,%xmm6,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%r10
+ vpalignr $8,%xmm1,%xmm2,%xmm11
+ movq %rdx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ vpaddq %xmm11,%xmm5,%xmm5
+ shrdq $4,%r13,%r13
+ xorq %r10,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 80(%rsp),%r9
+ movq %r10,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %r8,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %r11,%r15
+ addq %r12,%r9
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %r10,%r14
+ addq %r13,%r9
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r11,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm4,%xmm11
+ addq %r9,%rbx
+ addq %rdi,%r9
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %rbx,%r13
+ addq %r9,%r14
+ vpsllq $3,%xmm4,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%r9
+ vpaddq %xmm8,%xmm5,%xmm5
+ movq %rcx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm4,%xmm9
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %r9,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 88(%rsp),%r8
+ movq %r9,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %rdx,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %r10,%rdi
+ addq %r12,%r8
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm5,%xmm5
+ xorq %r9,%r14
+ addq %r13,%r8
+ vpaddq 32(%rbp),%xmm5,%xmm10
+ xorq %r10,%r15
+ shrdq $28,%r14,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ vmovdqa %xmm10,80(%rsp)
+ vpalignr $8,%xmm6,%xmm7,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%r8
+ vpalignr $8,%xmm2,%xmm3,%xmm11
+ movq %rbx,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ vpaddq %xmm11,%xmm6,%xmm6
+ shrdq $4,%r13,%r13
+ xorq %r8,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %rax,%r12
+ xorq %rax,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 96(%rsp),%rdx
+ movq %r8,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %rcx,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %r9,%r15
+ addq %r12,%rdx
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %r8,%r14
+ addq %r13,%rdx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %r9,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm5,%xmm11
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %r11,%r13
+ addq %rdx,%r14
+ vpsllq $3,%xmm5,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%rdx
+ vpaddq %xmm8,%xmm6,%xmm6
+ movq %rax,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm5,%xmm9
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %rdx,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %r11,%r12
+ xorq %r11,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 104(%rsp),%rcx
+ movq %rdx,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %rbx,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm6,%xmm6
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ vpaddq 64(%rbp),%xmm6,%xmm10
+ xorq %r8,%r15
+ shrdq $28,%r14,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ vmovdqa %xmm10,96(%rsp)
+ vpalignr $8,%xmm7,%xmm0,%xmm8
+ shrdq $23,%r13,%r13
+ movq %r14,%rcx
+ vpalignr $8,%xmm3,%xmm4,%xmm11
+ movq %r11,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $1,%xmm8,%xmm10
+ xorq %r10,%r13
+ xorq %rax,%r12
+ vpaddq %xmm11,%xmm7,%xmm7
+ shrdq $4,%r13,%r13
+ xorq %rcx,%r14
+ vpsrlq $7,%xmm8,%xmm11
+ andq %r10,%r12
+ xorq %r10,%r13
+ vpsllq $56,%xmm8,%xmm9
+ addq 112(%rsp),%rbx
+ movq %rcx,%r15
+ vpxor %xmm10,%xmm11,%xmm8
+ xorq %rax,%r12
+ shrdq $6,%r14,%r14
+ vpsrlq $7,%xmm10,%xmm10
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ vpxor %xmm9,%xmm8,%xmm8
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ vpsllq $7,%xmm9,%xmm9
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ vpxor %xmm10,%xmm8,%xmm8
+ xorq %rdx,%rdi
+ shrdq $28,%r14,%r14
+ vpsrlq $6,%xmm6,%xmm11
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ vpxor %xmm9,%xmm8,%xmm8
+ movq %r9,%r13
+ addq %rbx,%r14
+ vpsllq $3,%xmm6,%xmm10
+ shrdq $23,%r13,%r13
+ movq %r14,%rbx
+ vpaddq %xmm8,%xmm7,%xmm7
+ movq %r10,%r12
+ shrdq $5,%r14,%r14
+ vpsrlq $19,%xmm6,%xmm9
+ xorq %r9,%r13
+ xorq %r11,%r12
+ vpxor %xmm10,%xmm11,%xmm11
+ shrdq $4,%r13,%r13
+ xorq %rbx,%r14
+ vpsllq $42,%xmm10,%xmm10
+ andq %r9,%r12
+ xorq %r9,%r13
+ vpxor %xmm9,%xmm11,%xmm11
+ addq 120(%rsp),%rax
+ movq %rbx,%rdi
+ vpsrlq $42,%xmm9,%xmm9
+ xorq %r11,%r12
+ shrdq $6,%r14,%r14
+ vpxor %xmm10,%xmm11,%xmm11
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ vpxor %xmm9,%xmm11,%xmm11
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ vpaddq %xmm11,%xmm7,%xmm7
+ xorq %rbx,%r14
+ addq %r13,%rax
+ vpaddq 96(%rbp),%xmm7,%xmm10
+ xorq %rcx,%r15
+ shrdq $28,%r14,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ vmovdqa %xmm10,112(%rsp)
+ cmpb $0,135(%rbp)
+ jne L$avx_00_47
+ shrdq $23,%r13,%r13
+ movq %r14,%rax
+ movq %r9,%r12
+ shrdq $5,%r14,%r14
+ xorq %r8,%r13
+ xorq %r10,%r12
+ shrdq $4,%r13,%r13
+ xorq %rax,%r14
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 0(%rsp),%r11
+ movq %rax,%r15
+ xorq %r10,%r12
+ shrdq $6,%r14,%r14
+ xorq %rbx,%r15
+ addq %r12,%r11
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %rax,%r14
+ addq %r13,%r11
+ xorq %rbx,%rdi
+ shrdq $28,%r14,%r14
+ addq %r11,%rdx
+ addq %rdi,%r11
+ movq %rdx,%r13
+ addq %r11,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r11
+ movq %r8,%r12
+ shrdq $5,%r14,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ shrdq $4,%r13,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ addq 8(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ shrdq $6,%r14,%r14
+ xorq %rax,%rdi
+ addq %r12,%r10
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ shrdq $28,%r14,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r10
+ movq %rdx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ shrdq $4,%r13,%r13
+ xorq %r10,%r14
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 16(%rsp),%r9
+ movq %r10,%r15
+ xorq %r8,%r12
+ shrdq $6,%r14,%r14
+ xorq %r11,%r15
+ addq %r12,%r9
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %r10,%r14
+ addq %r13,%r9
+ xorq %r11,%rdi
+ shrdq $28,%r14,%r14
+ addq %r9,%rbx
+ addq %rdi,%r9
+ movq %rbx,%r13
+ addq %r9,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r9
+ movq %rcx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ shrdq $4,%r13,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ addq 24(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r10,%rdi
+ addq %r12,%r8
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ shrdq $28,%r14,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r8
+ movq %rbx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ shrdq $4,%r13,%r13
+ xorq %r8,%r14
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 32(%rsp),%rdx
+ movq %r8,%r15
+ xorq %rcx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r9,%r15
+ addq %r12,%rdx
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %r8,%r14
+ addq %r13,%rdx
+ xorq %r9,%rdi
+ shrdq $28,%r14,%r14
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ movq %r11,%r13
+ addq %rdx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rdx
+ movq %rax,%r12
+ shrdq $5,%r14,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ shrdq $4,%r13,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ addq 40(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ shrdq $28,%r14,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rcx
+ movq %r11,%r12
+ shrdq $5,%r14,%r14
+ xorq %r10,%r13
+ xorq %rax,%r12
+ shrdq $4,%r13,%r13
+ xorq %rcx,%r14
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 48(%rsp),%rbx
+ movq %rcx,%r15
+ xorq %rax,%r12
+ shrdq $6,%r14,%r14
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ xorq %rdx,%rdi
+ shrdq $28,%r14,%r14
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ movq %r9,%r13
+ addq %rbx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rbx
+ movq %r10,%r12
+ shrdq $5,%r14,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ shrdq $4,%r13,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ addq 56(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ shrdq $6,%r14,%r14
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ shrdq $28,%r14,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rax
+ movq %r9,%r12
+ shrdq $5,%r14,%r14
+ xorq %r8,%r13
+ xorq %r10,%r12
+ shrdq $4,%r13,%r13
+ xorq %rax,%r14
+ andq %r8,%r12
+ xorq %r8,%r13
+ addq 64(%rsp),%r11
+ movq %rax,%r15
+ xorq %r10,%r12
+ shrdq $6,%r14,%r14
+ xorq %rbx,%r15
+ addq %r12,%r11
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %rax,%r14
+ addq %r13,%r11
+ xorq %rbx,%rdi
+ shrdq $28,%r14,%r14
+ addq %r11,%rdx
+ addq %rdi,%r11
+ movq %rdx,%r13
+ addq %r11,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r11
+ movq %r8,%r12
+ shrdq $5,%r14,%r14
+ xorq %rdx,%r13
+ xorq %r9,%r12
+ shrdq $4,%r13,%r13
+ xorq %r11,%r14
+ andq %rdx,%r12
+ xorq %rdx,%r13
+ addq 72(%rsp),%r10
+ movq %r11,%rdi
+ xorq %r9,%r12
+ shrdq $6,%r14,%r14
+ xorq %rax,%rdi
+ addq %r12,%r10
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %r11,%r14
+ addq %r13,%r10
+ xorq %rax,%r15
+ shrdq $28,%r14,%r14
+ addq %r10,%rcx
+ addq %r15,%r10
+ movq %rcx,%r13
+ addq %r10,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r10
+ movq %rdx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rcx,%r13
+ xorq %r8,%r12
+ shrdq $4,%r13,%r13
+ xorq %r10,%r14
+ andq %rcx,%r12
+ xorq %rcx,%r13
+ addq 80(%rsp),%r9
+ movq %r10,%r15
+ xorq %r8,%r12
+ shrdq $6,%r14,%r14
+ xorq %r11,%r15
+ addq %r12,%r9
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %r10,%r14
+ addq %r13,%r9
+ xorq %r11,%rdi
+ shrdq $28,%r14,%r14
+ addq %r9,%rbx
+ addq %rdi,%r9
+ movq %rbx,%r13
+ addq %r9,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r9
+ movq %rcx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rbx,%r13
+ xorq %rdx,%r12
+ shrdq $4,%r13,%r13
+ xorq %r9,%r14
+ andq %rbx,%r12
+ xorq %rbx,%r13
+ addq 88(%rsp),%r8
+ movq %r9,%rdi
+ xorq %rdx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r10,%rdi
+ addq %r12,%r8
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %r9,%r14
+ addq %r13,%r8
+ xorq %r10,%r15
+ shrdq $28,%r14,%r14
+ addq %r8,%rax
+ addq %r15,%r8
+ movq %rax,%r13
+ addq %r8,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%r8
+ movq %rbx,%r12
+ shrdq $5,%r14,%r14
+ xorq %rax,%r13
+ xorq %rcx,%r12
+ shrdq $4,%r13,%r13
+ xorq %r8,%r14
+ andq %rax,%r12
+ xorq %rax,%r13
+ addq 96(%rsp),%rdx
+ movq %r8,%r15
+ xorq %rcx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r9,%r15
+ addq %r12,%rdx
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %r8,%r14
+ addq %r13,%rdx
+ xorq %r9,%rdi
+ shrdq $28,%r14,%r14
+ addq %rdx,%r11
+ addq %rdi,%rdx
+ movq %r11,%r13
+ addq %rdx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rdx
+ movq %rax,%r12
+ shrdq $5,%r14,%r14
+ xorq %r11,%r13
+ xorq %rbx,%r12
+ shrdq $4,%r13,%r13
+ xorq %rdx,%r14
+ andq %r11,%r12
+ xorq %r11,%r13
+ addq 104(%rsp),%rcx
+ movq %rdx,%rdi
+ xorq %rbx,%r12
+ shrdq $6,%r14,%r14
+ xorq %r8,%rdi
+ addq %r12,%rcx
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %rdx,%r14
+ addq %r13,%rcx
+ xorq %r8,%r15
+ shrdq $28,%r14,%r14
+ addq %rcx,%r10
+ addq %r15,%rcx
+ movq %r10,%r13
+ addq %rcx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rcx
+ movq %r11,%r12
+ shrdq $5,%r14,%r14
+ xorq %r10,%r13
+ xorq %rax,%r12
+ shrdq $4,%r13,%r13
+ xorq %rcx,%r14
+ andq %r10,%r12
+ xorq %r10,%r13
+ addq 112(%rsp),%rbx
+ movq %rcx,%r15
+ xorq %rax,%r12
+ shrdq $6,%r14,%r14
+ xorq %rdx,%r15
+ addq %r12,%rbx
+ shrdq $14,%r13,%r13
+ andq %r15,%rdi
+ xorq %rcx,%r14
+ addq %r13,%rbx
+ xorq %rdx,%rdi
+ shrdq $28,%r14,%r14
+ addq %rbx,%r9
+ addq %rdi,%rbx
+ movq %r9,%r13
+ addq %rbx,%r14
+ shrdq $23,%r13,%r13
+ movq %r14,%rbx
+ movq %r10,%r12
+ shrdq $5,%r14,%r14
+ xorq %r9,%r13
+ xorq %r11,%r12
+ shrdq $4,%r13,%r13
+ xorq %rbx,%r14
+ andq %r9,%r12
+ xorq %r9,%r13
+ addq 120(%rsp),%rax
+ movq %rbx,%rdi
+ xorq %r11,%r12
+ shrdq $6,%r14,%r14
+ xorq %rcx,%rdi
+ addq %r12,%rax
+ shrdq $14,%r13,%r13
+ andq %rdi,%r15
+ xorq %rbx,%r14
+ addq %r13,%rax
+ xorq %rcx,%r15
+ shrdq $28,%r14,%r14
+ addq %rax,%r8
+ addq %r15,%rax
+ movq %r8,%r13
+ addq %rax,%r14
+ movq 128+0(%rsp),%rdi
+ movq %r14,%rax
+
+ addq 0(%rdi),%rax
+ leaq 128(%rsi),%rsi
+ 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_avx
+
+ movq 128+24(%rsp),%rsi
+ vzeroupper
+ 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_avx:
+ .byte 0xf3,0xc3
+
#endif
diff --git a/third_party/boringssl/win-x86/crypto/chacha/chacha-x86.asm b/third_party/boringssl/win-x86/crypto/chacha/chacha-x86.asm
new file mode 100644
index 0000000..3ba31a2
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/chacha/chacha-x86.asm
@@ -0,0 +1,977 @@
+%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 _ChaCha20_ctr32
+align 16
+_ChaCha20_ctr32:
+L$_ChaCha20_ctr32_begin:
+ push ebp
+ push ebx
+ push esi
+ push edi
+ xor eax,eax
+ cmp eax,DWORD [28+esp]
+ je NEAR L$000no_data
+ call L$pic_point
+L$pic_point:
+ pop eax
+ lea ebp,[_OPENSSL_ia32cap_P]
+ test DWORD [ebp],16777216
+ jz NEAR L$001x86
+ test DWORD [4+ebp],512
+ jz NEAR L$001x86
+ jmp NEAR L$ssse3_shortcut
+L$001x86:
+ mov esi,DWORD [32+esp]
+ mov edi,DWORD [36+esp]
+ sub esp,132
+ mov eax,DWORD [esi]
+ mov ebx,DWORD [4+esi]
+ mov ecx,DWORD [8+esi]
+ mov edx,DWORD [12+esi]
+ mov DWORD [80+esp],eax
+ mov DWORD [84+esp],ebx
+ mov DWORD [88+esp],ecx
+ mov DWORD [92+esp],edx
+ mov eax,DWORD [16+esi]
+ mov ebx,DWORD [20+esi]
+ mov ecx,DWORD [24+esi]
+ mov edx,DWORD [28+esi]
+ mov DWORD [96+esp],eax
+ mov DWORD [100+esp],ebx
+ mov DWORD [104+esp],ecx
+ mov DWORD [108+esp],edx
+ mov eax,DWORD [edi]
+ mov ebx,DWORD [4+edi]
+ mov ecx,DWORD [8+edi]
+ mov edx,DWORD [12+edi]
+ sub eax,1
+ mov DWORD [112+esp],eax
+ mov DWORD [116+esp],ebx
+ mov DWORD [120+esp],ecx
+ mov DWORD [124+esp],edx
+ jmp NEAR L$002entry
+align 16
+L$003outer_loop:
+ mov DWORD [156+esp],ebx
+ mov DWORD [152+esp],eax
+ mov DWORD [160+esp],ecx
+L$002entry:
+ mov eax,1634760805
+ mov DWORD [4+esp],857760878
+ mov DWORD [8+esp],2036477234
+ mov DWORD [12+esp],1797285236
+ mov ebx,DWORD [84+esp]
+ mov ebp,DWORD [88+esp]
+ mov ecx,DWORD [104+esp]
+ mov esi,DWORD [108+esp]
+ mov edx,DWORD [116+esp]
+ mov edi,DWORD [120+esp]
+ mov DWORD [20+esp],ebx
+ mov DWORD [24+esp],ebp
+ mov DWORD [40+esp],ecx
+ mov DWORD [44+esp],esi
+ mov DWORD [52+esp],edx
+ mov DWORD [56+esp],edi
+ mov ebx,DWORD [92+esp]
+ mov edi,DWORD [124+esp]
+ mov edx,DWORD [112+esp]
+ mov ebp,DWORD [80+esp]
+ mov ecx,DWORD [96+esp]
+ mov esi,DWORD [100+esp]
+ add edx,1
+ mov DWORD [28+esp],ebx
+ mov DWORD [60+esp],edi
+ mov DWORD [112+esp],edx
+ mov ebx,10
+ jmp NEAR L$004loop
+align 16
+L$004loop:
+ add eax,ebp
+ mov DWORD [128+esp],ebx
+ mov ebx,ebp
+ xor edx,eax
+ rol edx,16
+ add ecx,edx
+ xor ebx,ecx
+ mov edi,DWORD [52+esp]
+ rol ebx,12
+ mov ebp,DWORD [20+esp]
+ add eax,ebx
+ xor edx,eax
+ mov DWORD [esp],eax
+ rol edx,8
+ mov eax,DWORD [4+esp]
+ add ecx,edx
+ mov DWORD [48+esp],edx
+ xor ebx,ecx
+ add eax,ebp
+ rol ebx,7
+ xor edi,eax
+ mov DWORD [32+esp],ecx
+ rol edi,16
+ mov DWORD [16+esp],ebx
+ add esi,edi
+ mov ecx,DWORD [40+esp]
+ xor ebp,esi
+ mov edx,DWORD [56+esp]
+ rol ebp,12
+ mov ebx,DWORD [24+esp]
+ add eax,ebp
+ xor edi,eax
+ mov DWORD [4+esp],eax
+ rol edi,8
+ mov eax,DWORD [8+esp]
+ add esi,edi
+ mov DWORD [52+esp],edi
+ xor ebp,esi
+ add eax,ebx
+ rol ebp,7
+ xor edx,eax
+ mov DWORD [36+esp],esi
+ rol edx,16
+ mov DWORD [20+esp],ebp
+ add ecx,edx
+ mov esi,DWORD [44+esp]
+ xor ebx,ecx
+ mov edi,DWORD [60+esp]
+ rol ebx,12
+ mov ebp,DWORD [28+esp]
+ add eax,ebx
+ xor edx,eax
+ mov DWORD [8+esp],eax
+ rol edx,8
+ mov eax,DWORD [12+esp]
+ add ecx,edx
+ mov DWORD [56+esp],edx
+ xor ebx,ecx
+ add eax,ebp
+ rol ebx,7
+ xor edi,eax
+ rol edi,16
+ mov DWORD [24+esp],ebx
+ add esi,edi
+ xor ebp,esi
+ rol ebp,12
+ mov ebx,DWORD [20+esp]
+ add eax,ebp
+ xor edi,eax
+ mov DWORD [12+esp],eax
+ rol edi,8
+ mov eax,DWORD [esp]
+ add esi,edi
+ mov edx,edi
+ xor ebp,esi
+ add eax,ebx
+ rol ebp,7
+ xor edx,eax
+ rol edx,16
+ mov DWORD [28+esp],ebp
+ add ecx,edx
+ xor ebx,ecx
+ mov edi,DWORD [48+esp]
+ rol ebx,12
+ mov ebp,DWORD [24+esp]
+ add eax,ebx
+ xor edx,eax
+ mov DWORD [esp],eax
+ rol edx,8
+ mov eax,DWORD [4+esp]
+ add ecx,edx
+ mov DWORD [60+esp],edx
+ xor ebx,ecx
+ add eax,ebp
+ rol ebx,7
+ xor edi,eax
+ mov DWORD [40+esp],ecx
+ rol edi,16
+ mov DWORD [20+esp],ebx
+ add esi,edi
+ mov ecx,DWORD [32+esp]
+ xor ebp,esi
+ mov edx,DWORD [52+esp]
+ rol ebp,12
+ mov ebx,DWORD [28+esp]
+ add eax,ebp
+ xor edi,eax
+ mov DWORD [4+esp],eax
+ rol edi,8
+ mov eax,DWORD [8+esp]
+ add esi,edi
+ mov DWORD [48+esp],edi
+ xor ebp,esi
+ add eax,ebx
+ rol ebp,7
+ xor edx,eax
+ mov DWORD [44+esp],esi
+ rol edx,16
+ mov DWORD [24+esp],ebp
+ add ecx,edx
+ mov esi,DWORD [36+esp]
+ xor ebx,ecx
+ mov edi,DWORD [56+esp]
+ rol ebx,12
+ mov ebp,DWORD [16+esp]
+ add eax,ebx
+ xor edx,eax
+ mov DWORD [8+esp],eax
+ rol edx,8
+ mov eax,DWORD [12+esp]
+ add ecx,edx
+ mov DWORD [52+esp],edx
+ xor ebx,ecx
+ add eax,ebp
+ rol ebx,7
+ xor edi,eax
+ rol edi,16
+ mov DWORD [28+esp],ebx
+ add esi,edi
+ xor ebp,esi
+ mov edx,DWORD [48+esp]
+ rol ebp,12
+ mov ebx,DWORD [128+esp]
+ add eax,ebp
+ xor edi,eax
+ mov DWORD [12+esp],eax
+ rol edi,8
+ mov eax,DWORD [esp]
+ add esi,edi
+ mov DWORD [56+esp],edi
+ xor ebp,esi
+ rol ebp,7
+ dec ebx
+ jnz NEAR L$004loop
+ mov ebx,DWORD [160+esp]
+ add eax,1634760805
+ add ebp,DWORD [80+esp]
+ add ecx,DWORD [96+esp]
+ add esi,DWORD [100+esp]
+ cmp ebx,64
+ jb NEAR L$005tail
+ mov ebx,DWORD [156+esp]
+ add edx,DWORD [112+esp]
+ add edi,DWORD [120+esp]
+ xor eax,DWORD [ebx]
+ xor ebp,DWORD [16+ebx]
+ mov DWORD [esp],eax
+ mov eax,DWORD [152+esp]
+ xor ecx,DWORD [32+ebx]
+ xor esi,DWORD [36+ebx]
+ xor edx,DWORD [48+ebx]
+ xor edi,DWORD [56+ebx]
+ mov DWORD [16+eax],ebp
+ mov DWORD [32+eax],ecx
+ mov DWORD [36+eax],esi
+ mov DWORD [48+eax],edx
+ mov DWORD [56+eax],edi
+ mov ebp,DWORD [4+esp]
+ mov ecx,DWORD [8+esp]
+ mov esi,DWORD [12+esp]
+ mov edx,DWORD [20+esp]
+ mov edi,DWORD [24+esp]
+ add ebp,857760878
+ add ecx,2036477234
+ add esi,1797285236
+ add edx,DWORD [84+esp]
+ add edi,DWORD [88+esp]
+ xor ebp,DWORD [4+ebx]
+ xor ecx,DWORD [8+ebx]
+ xor esi,DWORD [12+ebx]
+ xor edx,DWORD [20+ebx]
+ xor edi,DWORD [24+ebx]
+ mov DWORD [4+eax],ebp
+ mov DWORD [8+eax],ecx
+ mov DWORD [12+eax],esi
+ mov DWORD [20+eax],edx
+ mov DWORD [24+eax],edi
+ mov ebp,DWORD [28+esp]
+ mov ecx,DWORD [40+esp]
+ mov esi,DWORD [44+esp]
+ mov edx,DWORD [52+esp]
+ mov edi,DWORD [60+esp]
+ add ebp,DWORD [92+esp]
+ add ecx,DWORD [104+esp]
+ add esi,DWORD [108+esp]
+ add edx,DWORD [116+esp]
+ add edi,DWORD [124+esp]
+ xor ebp,DWORD [28+ebx]
+ xor ecx,DWORD [40+ebx]
+ xor esi,DWORD [44+ebx]
+ xor edx,DWORD [52+ebx]
+ xor edi,DWORD [60+ebx]
+ lea ebx,[64+ebx]
+ mov DWORD [28+eax],ebp
+ mov ebp,DWORD [esp]
+ mov DWORD [40+eax],ecx
+ mov ecx,DWORD [160+esp]
+ mov DWORD [44+eax],esi
+ mov DWORD [52+eax],edx
+ mov DWORD [60+eax],edi
+ mov DWORD [eax],ebp
+ lea eax,[64+eax]
+ sub ecx,64
+ jnz NEAR L$003outer_loop
+ jmp NEAR L$006done
+L$005tail:
+ add edx,DWORD [112+esp]
+ add edi,DWORD [120+esp]
+ mov DWORD [esp],eax
+ mov DWORD [16+esp],ebp
+ mov DWORD [32+esp],ecx
+ mov DWORD [36+esp],esi
+ mov DWORD [48+esp],edx
+ mov DWORD [56+esp],edi
+ mov ebp,DWORD [4+esp]
+ mov ecx,DWORD [8+esp]
+ mov esi,DWORD [12+esp]
+ mov edx,DWORD [20+esp]
+ mov edi,DWORD [24+esp]
+ add ebp,857760878
+ add ecx,2036477234
+ add esi,1797285236
+ add edx,DWORD [84+esp]
+ add edi,DWORD [88+esp]
+ mov DWORD [4+esp],ebp
+ mov DWORD [8+esp],ecx
+ mov DWORD [12+esp],esi
+ mov DWORD [20+esp],edx
+ mov DWORD [24+esp],edi
+ mov ebp,DWORD [28+esp]
+ mov ecx,DWORD [40+esp]
+ mov esi,DWORD [44+esp]
+ mov edx,DWORD [52+esp]
+ mov edi,DWORD [60+esp]
+ add ebp,DWORD [92+esp]
+ add ecx,DWORD [104+esp]
+ add esi,DWORD [108+esp]
+ add edx,DWORD [116+esp]
+ add edi,DWORD [124+esp]
+ mov DWORD [28+esp],ebp
+ mov ebp,DWORD [156+esp]
+ mov DWORD [40+esp],ecx
+ mov ecx,DWORD [152+esp]
+ mov DWORD [44+esp],esi
+ xor esi,esi
+ mov DWORD [52+esp],edx
+ mov DWORD [60+esp],edi
+ xor eax,eax
+ xor edx,edx
+L$007tail_loop:
+ mov al,BYTE [ebp*1+esi]
+ mov dl,BYTE [esi*1+esp]
+ lea esi,[1+esi]
+ xor al,dl
+ mov BYTE [esi*1+ecx-1],al
+ dec ebx
+ jnz NEAR L$007tail_loop
+L$006done:
+ add esp,132
+L$000no_data:
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+global _ChaCha20_ssse3
+align 16
+_ChaCha20_ssse3:
+L$_ChaCha20_ssse3_begin:
+ push ebp
+ push ebx
+ push esi
+ push edi
+L$ssse3_shortcut:
+ mov edi,DWORD [20+esp]
+ mov esi,DWORD [24+esp]
+ mov ecx,DWORD [28+esp]
+ mov edx,DWORD [32+esp]
+ mov ebx,DWORD [36+esp]
+ mov ebp,esp
+ sub esp,524
+ and esp,-64
+ mov DWORD [512+esp],ebp
+ lea eax,[(L$ssse3_data-L$pic_point)+eax]
+ movdqu xmm3,[ebx]
+ cmp ecx,256
+ jb NEAR L$0081x
+ mov DWORD [516+esp],edx
+ mov DWORD [520+esp],ebx
+ sub ecx,256
+ lea ebp,[384+esp]
+ movdqu xmm7,[edx]
+ pshufd xmm0,xmm3,0
+ pshufd xmm1,xmm3,85
+ pshufd xmm2,xmm3,170
+ pshufd xmm3,xmm3,255
+ paddd xmm0,[48+eax]
+ pshufd xmm4,xmm7,0
+ pshufd xmm5,xmm7,85
+ psubd xmm0,[64+eax]
+ pshufd xmm6,xmm7,170
+ pshufd xmm7,xmm7,255
+ movdqa [64+ebp],xmm0
+ movdqa [80+ebp],xmm1
+ movdqa [96+ebp],xmm2
+ movdqa [112+ebp],xmm3
+ movdqu xmm3,[16+edx]
+ movdqa [ebp-64],xmm4
+ movdqa [ebp-48],xmm5
+ movdqa [ebp-32],xmm6
+ movdqa [ebp-16],xmm7
+ movdqa xmm7,[32+eax]
+ lea ebx,[128+esp]
+ pshufd xmm0,xmm3,0
+ pshufd xmm1,xmm3,85
+ pshufd xmm2,xmm3,170
+ pshufd xmm3,xmm3,255
+ pshufd xmm4,xmm7,0
+ pshufd xmm5,xmm7,85
+ pshufd xmm6,xmm7,170
+ pshufd xmm7,xmm7,255
+ movdqa [ebp],xmm0
+ movdqa [16+ebp],xmm1
+ movdqa [32+ebp],xmm2
+ movdqa [48+ebp],xmm3
+ movdqa [ebp-128],xmm4
+ movdqa [ebp-112],xmm5
+ movdqa [ebp-96],xmm6
+ movdqa [ebp-80],xmm7
+ lea esi,[128+esi]
+ lea edi,[128+edi]
+ jmp NEAR L$009outer_loop
+align 16
+L$009outer_loop:
+ movdqa xmm1,[ebp-112]
+ movdqa xmm2,[ebp-96]
+ movdqa xmm3,[ebp-80]
+ movdqa xmm5,[ebp-48]
+ movdqa xmm6,[ebp-32]
+ movdqa xmm7,[ebp-16]
+ movdqa [ebx-112],xmm1
+ movdqa [ebx-96],xmm2
+ movdqa [ebx-80],xmm3
+ movdqa [ebx-48],xmm5
+ movdqa [ebx-32],xmm6
+ movdqa [ebx-16],xmm7
+ movdqa xmm2,[32+ebp]
+ movdqa xmm3,[48+ebp]
+ movdqa xmm4,[64+ebp]
+ movdqa xmm5,[80+ebp]
+ movdqa xmm6,[96+ebp]
+ movdqa xmm7,[112+ebp]
+ paddd xmm4,[64+eax]
+ movdqa [32+ebx],xmm2
+ movdqa [48+ebx],xmm3
+ movdqa [64+ebx],xmm4
+ movdqa [80+ebx],xmm5
+ movdqa [96+ebx],xmm6
+ movdqa [112+ebx],xmm7
+ movdqa [64+ebp],xmm4
+ movdqa xmm0,[ebp-128]
+ movdqa xmm6,xmm4
+ movdqa xmm3,[ebp-64]
+ movdqa xmm4,[ebp]
+ movdqa xmm5,[16+ebp]
+ mov edx,10
+ nop
+align 16
+L$010loop:
+ paddd xmm0,xmm3
+ movdqa xmm2,xmm3
+ pxor xmm6,xmm0
+ pshufb xmm6,[eax]
+ paddd xmm4,xmm6
+ pxor xmm2,xmm4
+ movdqa xmm3,[ebx-48]
+ movdqa xmm1,xmm2
+ pslld xmm2,12
+ psrld xmm1,20
+ por xmm2,xmm1
+ movdqa xmm1,[ebx-112]
+ paddd xmm0,xmm2
+ movdqa xmm7,[80+ebx]
+ pxor xmm6,xmm0
+ movdqa [ebx-128],xmm0
+ pshufb xmm6,[16+eax]
+ paddd xmm4,xmm6
+ movdqa [64+ebx],xmm6
+ pxor xmm2,xmm4
+ paddd xmm1,xmm3
+ movdqa xmm0,xmm2
+ pslld xmm2,7
+ psrld xmm0,25
+ pxor xmm7,xmm1
+ por xmm2,xmm0
+ movdqa [ebx],xmm4
+ pshufb xmm7,[eax]
+ movdqa [ebx-64],xmm2
+ paddd xmm5,xmm7
+ movdqa xmm4,[32+ebx]
+ pxor xmm3,xmm5
+ movdqa xmm2,[ebx-32]
+ movdqa xmm0,xmm3
+ pslld xmm3,12
+ psrld xmm0,20
+ por xmm3,xmm0
+ movdqa xmm0,[ebx-96]
+ paddd xmm1,xmm3
+ movdqa xmm6,[96+ebx]
+ pxor xmm7,xmm1
+ movdqa [ebx-112],xmm1
+ pshufb xmm7,[16+eax]
+ paddd xmm5,xmm7
+ movdqa [80+ebx],xmm7
+ pxor xmm3,xmm5
+ paddd xmm0,xmm2
+ movdqa xmm1,xmm3
+ pslld xmm3,7
+ psrld xmm1,25
+ pxor xmm6,xmm0
+ por xmm3,xmm1
+ movdqa [16+ebx],xmm5
+ pshufb xmm6,[eax]
+ movdqa [ebx-48],xmm3
+ paddd xmm4,xmm6
+ movdqa xmm5,[48+ebx]
+ pxor xmm2,xmm4
+ movdqa xmm3,[ebx-16]
+ movdqa xmm1,xmm2
+ pslld xmm2,12
+ psrld xmm1,20
+ por xmm2,xmm1
+ movdqa xmm1,[ebx-80]
+ paddd xmm0,xmm2
+ movdqa xmm7,[112+ebx]
+ pxor xmm6,xmm0
+ movdqa [ebx-96],xmm0
+ pshufb xmm6,[16+eax]
+ paddd xmm4,xmm6
+ movdqa [96+ebx],xmm6
+ pxor xmm2,xmm4
+ paddd xmm1,xmm3
+ movdqa xmm0,xmm2
+ pslld xmm2,7
+ psrld xmm0,25
+ pxor xmm7,xmm1
+ por xmm2,xmm0
+ pshufb xmm7,[eax]
+ movdqa [ebx-32],xmm2
+ paddd xmm5,xmm7
+ pxor xmm3,xmm5
+ movdqa xmm2,[ebx-48]
+ movdqa xmm0,xmm3
+ pslld xmm3,12
+ psrld xmm0,20
+ por xmm3,xmm0
+ movdqa xmm0,[ebx-128]
+ paddd xmm1,xmm3
+ pxor xmm7,xmm1
+ movdqa [ebx-80],xmm1
+ pshufb xmm7,[16+eax]
+ paddd xmm5,xmm7
+ movdqa xmm6,xmm7
+ pxor xmm3,xmm5
+ paddd xmm0,xmm2
+ movdqa xmm1,xmm3
+ pslld xmm3,7
+ psrld xmm1,25
+ pxor xmm6,xmm0
+ por xmm3,xmm1
+ pshufb xmm6,[eax]
+ movdqa [ebx-16],xmm3
+ paddd xmm4,xmm6
+ pxor xmm2,xmm4
+ movdqa xmm3,[ebx-32]
+ movdqa xmm1,xmm2
+ pslld xmm2,12
+ psrld xmm1,20
+ por xmm2,xmm1
+ movdqa xmm1,[ebx-112]
+ paddd xmm0,xmm2
+ movdqa xmm7,[64+ebx]
+ pxor xmm6,xmm0
+ movdqa [ebx-128],xmm0
+ pshufb xmm6,[16+eax]
+ paddd xmm4,xmm6
+ movdqa [112+ebx],xmm6
+ pxor xmm2,xmm4
+ paddd xmm1,xmm3
+ movdqa xmm0,xmm2
+ pslld xmm2,7
+ psrld xmm0,25
+ pxor xmm7,xmm1
+ por xmm2,xmm0
+ movdqa [32+ebx],xmm4
+ pshufb xmm7,[eax]
+ movdqa [ebx-48],xmm2
+ paddd xmm5,xmm7
+ movdqa xmm4,[ebx]
+ pxor xmm3,xmm5
+ movdqa xmm2,[ebx-16]
+ movdqa xmm0,xmm3
+ pslld xmm3,12
+ psrld xmm0,20
+ por xmm3,xmm0
+ movdqa xmm0,[ebx-96]
+ paddd xmm1,xmm3
+ movdqa xmm6,[80+ebx]
+ pxor xmm7,xmm1
+ movdqa [ebx-112],xmm1
+ pshufb xmm7,[16+eax]
+ paddd xmm5,xmm7
+ movdqa [64+ebx],xmm7
+ pxor xmm3,xmm5
+ paddd xmm0,xmm2
+ movdqa xmm1,xmm3
+ pslld xmm3,7
+ psrld xmm1,25
+ pxor xmm6,xmm0
+ por xmm3,xmm1
+ movdqa [48+ebx],xmm5
+ pshufb xmm6,[eax]
+ movdqa [ebx-32],xmm3
+ paddd xmm4,xmm6
+ movdqa xmm5,[16+ebx]
+ pxor xmm2,xmm4
+ movdqa xmm3,[ebx-64]
+ movdqa xmm1,xmm2
+ pslld xmm2,12
+ psrld xmm1,20
+ por xmm2,xmm1
+ movdqa xmm1,[ebx-80]
+ paddd xmm0,xmm2
+ movdqa xmm7,[96+ebx]
+ pxor xmm6,xmm0
+ movdqa [ebx-96],xmm0
+ pshufb xmm6,[16+eax]
+ paddd xmm4,xmm6
+ movdqa [80+ebx],xmm6
+ pxor xmm2,xmm4
+ paddd xmm1,xmm3
+ movdqa xmm0,xmm2
+ pslld xmm2,7
+ psrld xmm0,25
+ pxor xmm7,xmm1
+ por xmm2,xmm0
+ pshufb xmm7,[eax]
+ movdqa [ebx-16],xmm2
+ paddd xmm5,xmm7
+ pxor xmm3,xmm5
+ movdqa xmm0,xmm3
+ pslld xmm3,12
+ psrld xmm0,20
+ por xmm3,xmm0
+ movdqa xmm0,[ebx-128]
+ paddd xmm1,xmm3
+ movdqa xmm6,[64+ebx]
+ pxor xmm7,xmm1
+ movdqa [ebx-80],xmm1
+ pshufb xmm7,[16+eax]
+ paddd xmm5,xmm7
+ movdqa [96+ebx],xmm7
+ pxor xmm3,xmm5
+ movdqa xmm1,xmm3
+ pslld xmm3,7
+ psrld xmm1,25
+ por xmm3,xmm1
+ dec edx
+ jnz NEAR L$010loop
+ movdqa [ebx-64],xmm3
+ movdqa [ebx],xmm4
+ movdqa [16+ebx],xmm5
+ movdqa [64+ebx],xmm6
+ movdqa [96+ebx],xmm7
+ movdqa xmm1,[ebx-112]
+ movdqa xmm2,[ebx-96]
+ movdqa xmm3,[ebx-80]
+ paddd xmm0,[ebp-128]
+ paddd xmm1,[ebp-112]
+ paddd xmm2,[ebp-96]
+ paddd xmm3,[ebp-80]
+ movdqa xmm6,xmm0
+ punpckldq xmm0,xmm1
+ movdqa xmm7,xmm2
+ punpckldq xmm2,xmm3
+ punpckhdq xmm6,xmm1
+ punpckhdq xmm7,xmm3
+ movdqa xmm1,xmm0
+ punpcklqdq xmm0,xmm2
+ movdqa xmm3,xmm6
+ punpcklqdq xmm6,xmm7
+ punpckhqdq xmm1,xmm2
+ punpckhqdq xmm3,xmm7
+ movdqu xmm4,[esi-128]
+ movdqu xmm5,[esi-64]
+ movdqu xmm2,[esi]
+ movdqu xmm7,[64+esi]
+ lea esi,[16+esi]
+ pxor xmm4,xmm0
+ movdqa xmm0,[ebx-64]
+ pxor xmm5,xmm1
+ movdqa xmm1,[ebx-48]
+ pxor xmm6,xmm2
+ movdqa xmm2,[ebx-32]
+ pxor xmm7,xmm3
+ movdqa xmm3,[ebx-16]
+ movdqu [edi-128],xmm4
+ movdqu [edi-64],xmm5
+ movdqu [edi],xmm6
+ movdqu [64+edi],xmm7
+ lea edi,[16+edi]
+ paddd xmm0,[ebp-64]
+ paddd xmm1,[ebp-48]
+ paddd xmm2,[ebp-32]
+ paddd xmm3,[ebp-16]
+ movdqa xmm6,xmm0
+ punpckldq xmm0,xmm1
+ movdqa xmm7,xmm2
+ punpckldq xmm2,xmm3
+ punpckhdq xmm6,xmm1
+ punpckhdq xmm7,xmm3
+ movdqa xmm1,xmm0
+ punpcklqdq xmm0,xmm2
+ movdqa xmm3,xmm6
+ punpcklqdq xmm6,xmm7
+ punpckhqdq xmm1,xmm2
+ punpckhqdq xmm3,xmm7
+ movdqu xmm4,[esi-128]
+ movdqu xmm5,[esi-64]
+ movdqu xmm2,[esi]
+ movdqu xmm7,[64+esi]
+ lea esi,[16+esi]
+ pxor xmm4,xmm0
+ movdqa xmm0,[ebx]
+ pxor xmm5,xmm1
+ movdqa xmm1,[16+ebx]
+ pxor xmm6,xmm2
+ movdqa xmm2,[32+ebx]
+ pxor xmm7,xmm3
+ movdqa xmm3,[48+ebx]
+ movdqu [edi-128],xmm4
+ movdqu [edi-64],xmm5
+ movdqu [edi],xmm6
+ movdqu [64+edi],xmm7
+ lea edi,[16+edi]
+ paddd xmm0,[ebp]
+ paddd xmm1,[16+ebp]
+ paddd xmm2,[32+ebp]
+ paddd xmm3,[48+ebp]
+ movdqa xmm6,xmm0
+ punpckldq xmm0,xmm1
+ movdqa xmm7,xmm2
+ punpckldq xmm2,xmm3
+ punpckhdq xmm6,xmm1
+ punpckhdq xmm7,xmm3
+ movdqa xmm1,xmm0
+ punpcklqdq xmm0,xmm2
+ movdqa xmm3,xmm6
+ punpcklqdq xmm6,xmm7
+ punpckhqdq xmm1,xmm2
+ punpckhqdq xmm3,xmm7
+ movdqu xmm4,[esi-128]
+ movdqu xmm5,[esi-64]
+ movdqu xmm2,[esi]
+ movdqu xmm7,[64+esi]
+ lea esi,[16+esi]
+ pxor xmm4,xmm0
+ movdqa xmm0,[64+ebx]
+ pxor xmm5,xmm1
+ movdqa xmm1,[80+ebx]
+ pxor xmm6,xmm2
+ movdqa xmm2,[96+ebx]
+ pxor xmm7,xmm3
+ movdqa xmm3,[112+ebx]
+ movdqu [edi-128],xmm4
+ movdqu [edi-64],xmm5
+ movdqu [edi],xmm6
+ movdqu [64+edi],xmm7
+ lea edi,[16+edi]
+ paddd xmm0,[64+ebp]
+ paddd xmm1,[80+ebp]
+ paddd xmm2,[96+ebp]
+ paddd xmm3,[112+ebp]
+ movdqa xmm6,xmm0
+ punpckldq xmm0,xmm1
+ movdqa xmm7,xmm2
+ punpckldq xmm2,xmm3
+ punpckhdq xmm6,xmm1
+ punpckhdq xmm7,xmm3
+ movdqa xmm1,xmm0
+ punpcklqdq xmm0,xmm2
+ movdqa xmm3,xmm6
+ punpcklqdq xmm6,xmm7
+ punpckhqdq xmm1,xmm2
+ punpckhqdq xmm3,xmm7
+ movdqu xmm4,[esi-128]
+ movdqu xmm5,[esi-64]
+ movdqu xmm2,[esi]
+ movdqu xmm7,[64+esi]
+ lea esi,[208+esi]
+ pxor xmm4,xmm0
+ pxor xmm5,xmm1
+ pxor xmm6,xmm2
+ pxor xmm7,xmm3
+ movdqu [edi-128],xmm4
+ movdqu [edi-64],xmm5
+ movdqu [edi],xmm6
+ movdqu [64+edi],xmm7
+ lea edi,[208+edi]
+ sub ecx,256
+ jnc NEAR L$009outer_loop
+ add ecx,256
+ jz NEAR L$011done
+ mov ebx,DWORD [520+esp]
+ lea esi,[esi-128]
+ mov edx,DWORD [516+esp]
+ lea edi,[edi-128]
+ movd xmm2,DWORD [64+ebp]
+ movdqu xmm3,[ebx]
+ paddd xmm2,[96+eax]
+ pand xmm3,[112+eax]
+ por xmm3,xmm2
+L$0081x:
+ movdqa xmm0,[32+eax]
+ movdqu xmm1,[edx]
+ movdqu xmm2,[16+edx]
+ movdqa xmm6,[eax]
+ movdqa xmm7,[16+eax]
+ mov DWORD [48+esp],ebp
+ movdqa [esp],xmm0
+ movdqa [16+esp],xmm1
+ movdqa [32+esp],xmm2
+ movdqa [48+esp],xmm3
+ mov edx,10
+ jmp NEAR L$012loop1x
+align 16
+L$013outer1x:
+ movdqa xmm3,[80+eax]
+ movdqa xmm0,[esp]
+ movdqa xmm1,[16+esp]
+ movdqa xmm2,[32+esp]
+ paddd xmm3,[48+esp]
+ mov edx,10
+ movdqa [48+esp],xmm3
+ jmp NEAR L$012loop1x
+align 16
+L$012loop1x:
+ paddd xmm0,xmm1
+ pxor xmm3,xmm0
+db 102,15,56,0,222
+ paddd xmm2,xmm3
+ pxor xmm1,xmm2
+ movdqa xmm4,xmm1
+ psrld xmm1,20
+ pslld xmm4,12
+ por xmm1,xmm4
+ paddd xmm0,xmm1
+ pxor xmm3,xmm0
+db 102,15,56,0,223
+ paddd xmm2,xmm3
+ pxor xmm1,xmm2
+ movdqa xmm4,xmm1
+ psrld xmm1,25
+ pslld xmm4,7
+ por xmm1,xmm4
+ pshufd xmm2,xmm2,78
+ pshufd xmm1,xmm1,57
+ pshufd xmm3,xmm3,147
+ nop
+ paddd xmm0,xmm1
+ pxor xmm3,xmm0
+db 102,15,56,0,222
+ paddd xmm2,xmm3
+ pxor xmm1,xmm2
+ movdqa xmm4,xmm1
+ psrld xmm1,20
+ pslld xmm4,12
+ por xmm1,xmm4
+ paddd xmm0,xmm1
+ pxor xmm3,xmm0
+db 102,15,56,0,223
+ paddd xmm2,xmm3
+ pxor xmm1,xmm2
+ movdqa xmm4,xmm1
+ psrld xmm1,25
+ pslld xmm4,7
+ por xmm1,xmm4
+ pshufd xmm2,xmm2,78
+ pshufd xmm1,xmm1,147
+ pshufd xmm3,xmm3,57
+ dec edx
+ jnz NEAR L$012loop1x
+ paddd xmm0,[esp]
+ paddd xmm1,[16+esp]
+ paddd xmm2,[32+esp]
+ paddd xmm3,[48+esp]
+ cmp ecx,64
+ jb NEAR L$014tail
+ movdqu xmm4,[esi]
+ movdqu xmm5,[16+esi]
+ pxor xmm0,xmm4
+ movdqu xmm4,[32+esi]
+ pxor xmm1,xmm5
+ movdqu xmm5,[48+esi]
+ pxor xmm2,xmm4
+ pxor xmm3,xmm5
+ lea esi,[64+esi]
+ movdqu [edi],xmm0
+ movdqu [16+edi],xmm1
+ movdqu [32+edi],xmm2
+ movdqu [48+edi],xmm3
+ lea edi,[64+edi]
+ sub ecx,64
+ jnz NEAR L$013outer1x
+ jmp NEAR L$011done
+L$014tail:
+ movdqa [esp],xmm0
+ movdqa [16+esp],xmm1
+ movdqa [32+esp],xmm2
+ movdqa [48+esp],xmm3
+ xor eax,eax
+ xor edx,edx
+ xor ebp,ebp
+L$015tail_loop:
+ mov al,BYTE [ebp*1+esp]
+ mov dl,BYTE [ebp*1+esi]
+ lea ebp,[1+ebp]
+ xor al,dl
+ mov BYTE [ebp*1+edi-1],al
+ dec ecx
+ jnz NEAR L$015tail_loop
+L$011done:
+ mov esp,DWORD [512+esp]
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+align 64
+L$ssse3_data:
+db 2,3,0,1,6,7,4,5,10,11,8,9,14,15,12,13
+db 3,0,1,2,7,4,5,6,11,8,9,10,15,12,13,14
+dd 1634760805,857760878,2036477234,1797285236
+dd 0,1,2,3
+dd 4,4,4,4
+dd 1,0,0,0
+dd 4,0,0,0
+dd 0,-1,-1,-1
+align 64
+db 67,104,97,67,104,97,50,48,32,102,111,114,32,120,56,54
+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
+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 4317a73..0000000
--- 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/rc4/rc4-586.asm b/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm
index 08cd9f6..0bab2be 100644
--- a/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm
+++ b/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm
@@ -349,34 +349,5 @@
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
index e24449d..cee8c6262 100644
--- a/third_party/boringssl/win-x86/crypto/sha/sha1-586.asm
+++ b/third_party/boringssl/win-x86/crypto/sha/sha1-586.asm
@@ -35,8 +35,11 @@
mov ecx,DWORD [8+esi]
test eax,16777216
jz NEAR L$001x86
- test ecx,536870912
- jnz NEAR L$shaext_shortcut
+ and edx,268435456
+ and eax,1073741824
+ or eax,edx
+ cmp eax,1342177280
+ je NEAR L$avx_shortcut
jmp NEAR L$ssse3_shortcut
align 16
L$001x86:
@@ -1405,7 +1408,7 @@
pop ebp
ret
align 16
-__sha1_block_data_order_shaext:
+__sha1_block_data_order_ssse3:
push ebp
push ebx
push esi
@@ -1414,174 +1417,6 @@
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]
@@ -1634,9 +1469,9 @@
xor ebp,edx
pshufd xmm4,xmm0,238
and esi,ebp
- jmp NEAR L$006loop
+ jmp NEAR L$004loop
align 16
-L$006loop:
+L$004loop:
ror ebx,2
xor esi,edx
mov ebp,eax
@@ -2539,7 +2374,7 @@
add ecx,edx
mov ebp,DWORD [196+esp]
cmp ebp,DWORD [200+esp]
- je NEAR L$007done
+ je NEAR L$005done
movdqa xmm7,[160+esp]
movdqa xmm6,[176+esp]
movdqu xmm0,[ebp]
@@ -2674,9 +2509,9 @@
pshufd xmm4,xmm0,238
and esi,ebx
mov ebx,ebp
- jmp NEAR L$006loop
+ jmp NEAR L$004loop
align 16
-L$007done:
+L$005done:
add ebx,DWORD [16+esp]
xor esi,edi
mov ebp,ecx
@@ -2789,6 +2624,1174 @@
pop ebx
pop ebp
ret
+align 16
+__sha1_block_data_order_avx:
+ push ebp
+ push ebx
+ push esi
+ push edi
+ call L$006pic_point
+L$006pic_point:
+ pop ebp
+ lea ebp,[(L$K_XX_XX-L$006pic_point)+ebp]
+L$avx_shortcut:
+ vzeroall
+ vmovdqa xmm7,[ebp]
+ vmovdqa xmm0,[16+ebp]
+ vmovdqa xmm1,[32+ebp]
+ vmovdqa xmm2,[48+ebp]
+ vmovdqa 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
+ vmovdqa [112+esp],xmm0
+ vmovdqa [128+esp],xmm1
+ vmovdqa [144+esp],xmm2
+ shl edx,6
+ vmovdqa [160+esp],xmm7
+ add edx,ebp
+ vmovdqa [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
+ vmovdqu xmm0,[ebp-64]
+ vmovdqu xmm1,[ebp-48]
+ vmovdqu xmm2,[ebp-32]
+ vmovdqu xmm3,[ebp-16]
+ vpshufb xmm0,xmm0,xmm6
+ vpshufb xmm1,xmm1,xmm6
+ vpshufb xmm2,xmm2,xmm6
+ vmovdqa [96+esp],xmm7
+ vpshufb xmm3,xmm3,xmm6
+ vpaddd xmm4,xmm0,xmm7
+ vpaddd xmm5,xmm1,xmm7
+ vpaddd xmm6,xmm2,xmm7
+ vmovdqa [esp],xmm4
+ mov ebp,ecx
+ vmovdqa [16+esp],xmm5
+ xor ebp,edx
+ vmovdqa [32+esp],xmm6
+ and esi,ebp
+ jmp NEAR L$007loop
+align 16
+L$007loop:
+ shrd ebx,ebx,2
+ xor esi,edx
+ vpalignr xmm4,xmm1,xmm0,8
+ mov ebp,eax
+ add edi,DWORD [esp]
+ vpaddd xmm7,xmm7,xmm3
+ vmovdqa [64+esp],xmm0
+ xor ebx,ecx
+ shld eax,eax,5
+ vpsrldq xmm6,xmm3,4
+ add edi,esi
+ and ebp,ebx
+ vpxor xmm4,xmm4,xmm0
+ xor ebx,ecx
+ add edi,eax
+ vpxor xmm6,xmm6,xmm2
+ shrd eax,eax,7
+ xor ebp,ecx
+ vmovdqa [48+esp],xmm7
+ mov esi,edi
+ add edx,DWORD [4+esp]
+ vpxor xmm4,xmm4,xmm6
+ xor eax,ebx
+ shld edi,edi,5
+ add edx,ebp
+ and esi,eax
+ vpsrld xmm6,xmm4,31
+ xor eax,ebx
+ add edx,edi
+ shrd edi,edi,7
+ xor esi,ebx
+ vpslldq xmm0,xmm4,12
+ vpaddd xmm4,xmm4,xmm4
+ mov ebp,edx
+ add ecx,DWORD [8+esp]
+ xor edi,eax
+ shld edx,edx,5
+ vpsrld xmm7,xmm0,30
+ vpor xmm4,xmm4,xmm6
+ add ecx,esi
+ and ebp,edi
+ xor edi,eax
+ add ecx,edx
+ vpslld xmm0,xmm0,2
+ shrd edx,edx,7
+ xor ebp,eax
+ vpxor xmm4,xmm4,xmm7
+ mov esi,ecx
+ add ebx,DWORD [12+esp]
+ xor edx,edi
+ shld ecx,ecx,5
+ vpxor xmm4,xmm4,xmm0
+ add ebx,ebp
+ and esi,edx
+ vmovdqa xmm0,[96+esp]
+ xor edx,edi
+ add ebx,ecx
+ shrd ecx,ecx,7
+ xor esi,edi
+ vpalignr xmm5,xmm2,xmm1,8
+ mov ebp,ebx
+ add eax,DWORD [16+esp]
+ vpaddd xmm0,xmm0,xmm4
+ vmovdqa [80+esp],xmm1
+ xor ecx,edx
+ shld ebx,ebx,5
+ vpsrldq xmm7,xmm4,4
+ add eax,esi
+ and ebp,ecx
+ vpxor xmm5,xmm5,xmm1
+ xor ecx,edx
+ add eax,ebx
+ vpxor xmm7,xmm7,xmm3
+ shrd ebx,ebx,7
+ xor ebp,edx
+ vmovdqa [esp],xmm0
+ mov esi,eax
+ add edi,DWORD [20+esp]
+ vpxor xmm5,xmm5,xmm7
+ xor ebx,ecx
+ shld eax,eax,5
+ add edi,ebp
+ and esi,ebx
+ vpsrld xmm7,xmm5,31
+ xor ebx,ecx
+ add edi,eax
+ shrd eax,eax,7
+ xor esi,ecx
+ vpslldq xmm1,xmm5,12
+ vpaddd xmm5,xmm5,xmm5
+ mov ebp,edi
+ add edx,DWORD [24+esp]
+ xor eax,ebx
+ shld edi,edi,5
+ vpsrld xmm0,xmm1,30
+ vpor xmm5,xmm5,xmm7
+ add edx,esi
+ and ebp,eax
+ xor eax,ebx
+ add edx,edi
+ vpslld xmm1,xmm1,2
+ shrd edi,edi,7
+ xor ebp,ebx
+ vpxor xmm5,xmm5,xmm0
+ mov esi,edx
+ add ecx,DWORD [28+esp]
+ xor edi,eax
+ shld edx,edx,5
+ vpxor xmm5,xmm5,xmm1
+ add ecx,ebp
+ and esi,edi
+ vmovdqa xmm1,[112+esp]
+ xor edi,eax
+ add ecx,edx
+ shrd edx,edx,7
+ xor esi,eax
+ vpalignr xmm6,xmm3,xmm2,8
+ mov ebp,ecx
+ add ebx,DWORD [32+esp]
+ vpaddd xmm1,xmm1,xmm5
+ vmovdqa [96+esp],xmm2
+ xor edx,edi
+ shld ecx,ecx,5
+ vpsrldq xmm0,xmm5,4
+ add ebx,esi
+ and ebp,edx
+ vpxor xmm6,xmm6,xmm2
+ xor edx,edi
+ add ebx,ecx
+ vpxor xmm0,xmm0,xmm4
+ shrd ecx,ecx,7
+ xor ebp,edi
+ vmovdqa [16+esp],xmm1
+ mov esi,ebx
+ add eax,DWORD [36+esp]
+ vpxor xmm6,xmm6,xmm0
+ xor ecx,edx
+ shld ebx,ebx,5
+ add eax,ebp
+ and esi,ecx
+ vpsrld xmm0,xmm6,31
+ xor ecx,edx
+ add eax,ebx
+ shrd ebx,ebx,7
+ xor esi,edx
+ vpslldq xmm2,xmm6,12
+ vpaddd xmm6,xmm6,xmm6
+ mov ebp,eax
+ add edi,DWORD [40+esp]
+ xor ebx,ecx
+ shld eax,eax,5
+ vpsrld xmm1,xmm2,30
+ vpor xmm6,xmm6,xmm0
+ add edi,esi
+ and ebp,ebx
+ xor ebx,ecx
+ add edi,eax
+ vpslld xmm2,xmm2,2
+ vmovdqa xmm0,[64+esp]
+ shrd eax,eax,7
+ xor ebp,ecx
+ vpxor xmm6,xmm6,xmm1
+ mov esi,edi
+ add edx,DWORD [44+esp]
+ xor eax,ebx
+ shld edi,edi,5
+ vpxor xmm6,xmm6,xmm2
+ add edx,ebp
+ and esi,eax
+ vmovdqa xmm2,[112+esp]
+ xor eax,ebx
+ add edx,edi
+ shrd edi,edi,7
+ xor esi,ebx
+ vpalignr xmm7,xmm4,xmm3,8
+ mov ebp,edx
+ add ecx,DWORD [48+esp]
+ vpaddd xmm2,xmm2,xmm6
+ vmovdqa [64+esp],xmm3
+ xor edi,eax
+ shld edx,edx,5
+ vpsrldq xmm1,xmm6,4
+ add ecx,esi
+ and ebp,edi
+ vpxor xmm7,xmm7,xmm3
+ xor edi,eax
+ add ecx,edx
+ vpxor xmm1,xmm1,xmm5
+ shrd edx,edx,7
+ xor ebp,eax
+ vmovdqa [32+esp],xmm2
+ mov esi,ecx
+ add ebx,DWORD [52+esp]
+ vpxor xmm7,xmm7,xmm1
+ xor edx,edi
+ shld ecx,ecx,5
+ add ebx,ebp
+ and esi,edx
+ vpsrld xmm1,xmm7,31
+ xor edx,edi
+ add ebx,ecx
+ shrd ecx,ecx,7
+ xor esi,edi
+ vpslldq xmm3,xmm7,12
+ vpaddd xmm7,xmm7,xmm7
+ mov ebp,ebx
+ add eax,DWORD [56+esp]
+ xor ecx,edx
+ shld ebx,ebx,5
+ vpsrld xmm2,xmm3,30
+ vpor xmm7,xmm7,xmm1
+ add eax,esi
+ and ebp,ecx
+ xor ecx,edx
+ add eax,ebx
+ vpslld xmm3,xmm3,2
+ vmovdqa xmm1,[80+esp]
+ shrd ebx,ebx,7
+ xor ebp,edx
+ vpxor xmm7,xmm7,xmm2
+ mov esi,eax
+ add edi,DWORD [60+esp]
+ xor ebx,ecx
+ shld eax,eax,5
+ vpxor xmm7,xmm7,xmm3
+ add edi,ebp
+ and esi,ebx
+ vmovdqa xmm3,[112+esp]
+ xor ebx,ecx
+ add edi,eax
+ vpalignr xmm2,xmm7,xmm6,8
+ vpxor xmm0,xmm0,xmm4
+ shrd eax,eax,7
+ xor esi,ecx
+ mov ebp,edi
+ add edx,DWORD [esp]
+ vpxor xmm0,xmm0,xmm1
+ vmovdqa [80+esp],xmm4
+ xor eax,ebx
+ shld edi,edi,5
+ vmovdqa xmm4,xmm3
+ vpaddd xmm3,xmm3,xmm7
+ add edx,esi
+ and ebp,eax
+ vpxor xmm0,xmm0,xmm2
+ xor eax,ebx
+ add edx,edi
+ shrd edi,edi,7
+ xor ebp,ebx
+ vpsrld xmm2,xmm0,30
+ vmovdqa [48+esp],xmm3
+ mov esi,edx
+ add ecx,DWORD [4+esp]
+ xor edi,eax
+ shld edx,edx,5
+ vpslld xmm0,xmm0,2
+ add ecx,ebp
+ and esi,edi
+ xor edi,eax
+ add ecx,edx
+ shrd edx,edx,7
+ xor esi,eax
+ mov ebp,ecx
+ add ebx,DWORD [8+esp]
+ vpor xmm0,xmm0,xmm2
+ xor edx,edi
+ shld ecx,ecx,5
+ vmovdqa xmm2,[96+esp]
+ add ebx,esi
+ and ebp,edx
+ xor edx,edi
+ add ebx,ecx
+ add eax,DWORD [12+esp]
+ xor ebp,edi
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,ebp
+ xor esi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ vpalignr xmm3,xmm0,xmm7,8
+ vpxor xmm1,xmm1,xmm5
+ add edi,DWORD [16+esp]
+ xor esi,ecx
+ mov ebp,eax
+ shld eax,eax,5
+ vpxor xmm1,xmm1,xmm2
+ vmovdqa [96+esp],xmm5
+ add edi,esi
+ xor ebp,ecx
+ vmovdqa xmm5,xmm4
+ vpaddd xmm4,xmm4,xmm0
+ shrd ebx,ebx,7
+ add edi,eax
+ vpxor xmm1,xmm1,xmm3
+ add edx,DWORD [20+esp]
+ xor ebp,ebx
+ mov esi,edi
+ shld edi,edi,5
+ vpsrld xmm3,xmm1,30
+ vmovdqa [esp],xmm4
+ add edx,ebp
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,edi
+ vpslld xmm1,xmm1,2
+ add ecx,DWORD [24+esp]
+ xor esi,eax
+ mov ebp,edx
+ shld edx,edx,5
+ add ecx,esi
+ xor ebp,eax
+ shrd edi,edi,7
+ add ecx,edx
+ vpor xmm1,xmm1,xmm3
+ add ebx,DWORD [28+esp]
+ xor ebp,edi
+ vmovdqa xmm3,[64+esp]
+ mov esi,ecx
+ shld ecx,ecx,5
+ add ebx,ebp
+ xor esi,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ vpalignr xmm4,xmm1,xmm0,8
+ vpxor xmm2,xmm2,xmm6
+ add eax,DWORD [32+esp]
+ xor esi,edx
+ mov ebp,ebx
+ shld ebx,ebx,5
+ vpxor xmm2,xmm2,xmm3
+ vmovdqa [64+esp],xmm6
+ add eax,esi
+ xor ebp,edx
+ vmovdqa xmm6,[128+esp]
+ vpaddd xmm5,xmm5,xmm1
+ shrd ecx,ecx,7
+ add eax,ebx
+ vpxor xmm2,xmm2,xmm4
+ add edi,DWORD [36+esp]
+ xor ebp,ecx
+ mov esi,eax
+ shld eax,eax,5
+ vpsrld xmm4,xmm2,30
+ vmovdqa [16+esp],xmm5
+ add edi,ebp
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add edi,eax
+ vpslld xmm2,xmm2,2
+ add edx,DWORD [40+esp]
+ xor esi,ebx
+ mov ebp,edi
+ shld edi,edi,5
+ add edx,esi
+ xor ebp,ebx
+ shrd eax,eax,7
+ add edx,edi
+ vpor xmm2,xmm2,xmm4
+ add ecx,DWORD [44+esp]
+ xor ebp,eax
+ vmovdqa xmm4,[80+esp]
+ mov esi,edx
+ shld edx,edx,5
+ add ecx,ebp
+ xor esi,eax
+ shrd edi,edi,7
+ add ecx,edx
+ vpalignr xmm5,xmm2,xmm1,8
+ vpxor xmm3,xmm3,xmm7
+ add ebx,DWORD [48+esp]
+ xor esi,edi
+ mov ebp,ecx
+ shld ecx,ecx,5
+ vpxor xmm3,xmm3,xmm4
+ vmovdqa [80+esp],xmm7
+ add ebx,esi
+ xor ebp,edi
+ vmovdqa xmm7,xmm6
+ vpaddd xmm6,xmm6,xmm2
+ shrd edx,edx,7
+ add ebx,ecx
+ vpxor xmm3,xmm3,xmm5
+ add eax,DWORD [52+esp]
+ xor ebp,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ vpsrld xmm5,xmm3,30
+ vmovdqa [32+esp],xmm6
+ add eax,ebp
+ xor esi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ vpslld xmm3,xmm3,2
+ add edi,DWORD [56+esp]
+ xor esi,ecx
+ mov ebp,eax
+ shld eax,eax,5
+ add edi,esi
+ xor ebp,ecx
+ shrd ebx,ebx,7
+ add edi,eax
+ vpor xmm3,xmm3,xmm5
+ add edx,DWORD [60+esp]
+ xor ebp,ebx
+ vmovdqa xmm5,[96+esp]
+ mov esi,edi
+ shld edi,edi,5
+ add edx,ebp
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,edi
+ vpalignr xmm6,xmm3,xmm2,8
+ vpxor xmm4,xmm4,xmm0
+ add ecx,DWORD [esp]
+ xor esi,eax
+ mov ebp,edx
+ shld edx,edx,5
+ vpxor xmm4,xmm4,xmm5
+ vmovdqa [96+esp],xmm0
+ add ecx,esi
+ xor ebp,eax
+ vmovdqa xmm0,xmm7
+ vpaddd xmm7,xmm7,xmm3
+ shrd edi,edi,7
+ add ecx,edx
+ vpxor xmm4,xmm4,xmm6
+ add ebx,DWORD [4+esp]
+ xor ebp,edi
+ mov esi,ecx
+ shld ecx,ecx,5
+ vpsrld xmm6,xmm4,30
+ vmovdqa [48+esp],xmm7
+ add ebx,ebp
+ xor esi,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ vpslld xmm4,xmm4,2
+ add eax,DWORD [8+esp]
+ xor esi,edx
+ mov ebp,ebx
+ shld ebx,ebx,5
+ add eax,esi
+ xor ebp,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ vpor xmm4,xmm4,xmm6
+ add edi,DWORD [12+esp]
+ xor ebp,ecx
+ vmovdqa xmm6,[64+esp]
+ mov esi,eax
+ shld eax,eax,5
+ add edi,ebp
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add edi,eax
+ vpalignr xmm7,xmm4,xmm3,8
+ vpxor xmm5,xmm5,xmm1
+ add edx,DWORD [16+esp]
+ xor esi,ebx
+ mov ebp,edi
+ shld edi,edi,5
+ vpxor xmm5,xmm5,xmm6
+ vmovdqa [64+esp],xmm1
+ add edx,esi
+ xor ebp,ebx
+ vmovdqa xmm1,xmm0
+ vpaddd xmm0,xmm0,xmm4
+ shrd eax,eax,7
+ add edx,edi
+ vpxor xmm5,xmm5,xmm7
+ add ecx,DWORD [20+esp]
+ xor ebp,eax
+ mov esi,edx
+ shld edx,edx,5
+ vpsrld xmm7,xmm5,30
+ vmovdqa [esp],xmm0
+ add ecx,ebp
+ xor esi,eax
+ shrd edi,edi,7
+ add ecx,edx
+ vpslld xmm5,xmm5,2
+ add ebx,DWORD [24+esp]
+ xor esi,edi
+ mov ebp,ecx
+ shld ecx,ecx,5
+ add ebx,esi
+ xor ebp,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ vpor xmm5,xmm5,xmm7
+ add eax,DWORD [28+esp]
+ vmovdqa xmm7,[80+esp]
+ shrd ecx,ecx,7
+ mov esi,ebx
+ xor ebp,edx
+ shld ebx,ebx,5
+ add eax,ebp
+ xor esi,ecx
+ xor ecx,edx
+ add eax,ebx
+ vpalignr xmm0,xmm5,xmm4,8
+ vpxor xmm6,xmm6,xmm2
+ add edi,DWORD [32+esp]
+ and esi,ecx
+ xor ecx,edx
+ shrd ebx,ebx,7
+ vpxor xmm6,xmm6,xmm7
+ vmovdqa [80+esp],xmm2
+ mov ebp,eax
+ xor esi,ecx
+ vmovdqa xmm2,xmm1
+ vpaddd xmm1,xmm1,xmm5
+ shld eax,eax,5
+ add edi,esi
+ vpxor xmm6,xmm6,xmm0
+ xor ebp,ebx
+ xor ebx,ecx
+ add edi,eax
+ add edx,DWORD [36+esp]
+ vpsrld xmm0,xmm6,30
+ vmovdqa [16+esp],xmm1
+ and ebp,ebx
+ xor ebx,ecx
+ shrd eax,eax,7
+ mov esi,edi
+ vpslld xmm6,xmm6,2
+ xor ebp,ebx
+ shld edi,edi,5
+ add edx,ebp
+ xor esi,eax
+ xor eax,ebx
+ add edx,edi
+ add ecx,DWORD [40+esp]
+ and esi,eax
+ vpor xmm6,xmm6,xmm0
+ xor eax,ebx
+ shrd edi,edi,7
+ vmovdqa xmm0,[96+esp]
+ mov ebp,edx
+ xor esi,eax
+ shld edx,edx,5
+ add ecx,esi
+ xor ebp,edi
+ xor edi,eax
+ add ecx,edx
+ add ebx,DWORD [44+esp]
+ and ebp,edi
+ xor edi,eax
+ shrd edx,edx,7
+ mov esi,ecx
+ xor ebp,edi
+ shld ecx,ecx,5
+ add ebx,ebp
+ xor esi,edx
+ xor edx,edi
+ add ebx,ecx
+ vpalignr xmm1,xmm6,xmm5,8
+ vpxor xmm7,xmm7,xmm3
+ add eax,DWORD [48+esp]
+ and esi,edx
+ xor edx,edi
+ shrd ecx,ecx,7
+ vpxor xmm7,xmm7,xmm0
+ vmovdqa [96+esp],xmm3
+ mov ebp,ebx
+ xor esi,edx
+ vmovdqa xmm3,[144+esp]
+ vpaddd xmm2,xmm2,xmm6
+ shld ebx,ebx,5
+ add eax,esi
+ vpxor xmm7,xmm7,xmm1
+ xor ebp,ecx
+ xor ecx,edx
+ add eax,ebx
+ add edi,DWORD [52+esp]
+ vpsrld xmm1,xmm7,30
+ vmovdqa [32+esp],xmm2
+ and ebp,ecx
+ xor ecx,edx
+ shrd ebx,ebx,7
+ mov esi,eax
+ vpslld xmm7,xmm7,2
+ xor ebp,ecx
+ shld eax,eax,5
+ add edi,ebp
+ xor esi,ebx
+ xor ebx,ecx
+ add edi,eax
+ add edx,DWORD [56+esp]
+ and esi,ebx
+ vpor xmm7,xmm7,xmm1
+ xor ebx,ecx
+ shrd eax,eax,7
+ vmovdqa xmm1,[64+esp]
+ mov ebp,edi
+ xor esi,ebx
+ shld edi,edi,5
+ add edx,esi
+ xor ebp,eax
+ xor eax,ebx
+ add edx,edi
+ add ecx,DWORD [60+esp]
+ and ebp,eax
+ xor eax,ebx
+ shrd edi,edi,7
+ mov esi,edx
+ xor ebp,eax
+ shld edx,edx,5
+ add ecx,ebp
+ xor esi,edi
+ xor edi,eax
+ add ecx,edx
+ vpalignr xmm2,xmm7,xmm6,8
+ vpxor xmm0,xmm0,xmm4
+ add ebx,DWORD [esp]
+ and esi,edi
+ xor edi,eax
+ shrd edx,edx,7
+ vpxor xmm0,xmm0,xmm1
+ vmovdqa [64+esp],xmm4
+ mov ebp,ecx
+ xor esi,edi
+ vmovdqa xmm4,xmm3
+ vpaddd xmm3,xmm3,xmm7
+ shld ecx,ecx,5
+ add ebx,esi
+ vpxor xmm0,xmm0,xmm2
+ xor ebp,edx
+ xor edx,edi
+ add ebx,ecx
+ add eax,DWORD [4+esp]
+ vpsrld xmm2,xmm0,30
+ vmovdqa [48+esp],xmm3
+ and ebp,edx
+ xor edx,edi
+ shrd ecx,ecx,7
+ mov esi,ebx
+ vpslld xmm0,xmm0,2
+ xor ebp,edx
+ shld ebx,ebx,5
+ add eax,ebp
+ xor esi,ecx
+ xor ecx,edx
+ add eax,ebx
+ add edi,DWORD [8+esp]
+ and esi,ecx
+ vpor xmm0,xmm0,xmm2
+ xor ecx,edx
+ shrd ebx,ebx,7
+ vmovdqa xmm2,[80+esp]
+ mov ebp,eax
+ xor esi,ecx
+ shld eax,eax,5
+ add edi,esi
+ xor ebp,ebx
+ xor ebx,ecx
+ add edi,eax
+ add edx,DWORD [12+esp]
+ and ebp,ebx
+ xor ebx,ecx
+ shrd eax,eax,7
+ mov esi,edi
+ xor ebp,ebx
+ shld edi,edi,5
+ add edx,ebp
+ xor esi,eax
+ xor eax,ebx
+ add edx,edi
+ vpalignr xmm3,xmm0,xmm7,8
+ vpxor xmm1,xmm1,xmm5
+ add ecx,DWORD [16+esp]
+ and esi,eax
+ xor eax,ebx
+ shrd edi,edi,7
+ vpxor xmm1,xmm1,xmm2
+ vmovdqa [80+esp],xmm5
+ mov ebp,edx
+ xor esi,eax
+ vmovdqa xmm5,xmm4
+ vpaddd xmm4,xmm4,xmm0
+ shld edx,edx,5
+ add ecx,esi
+ vpxor xmm1,xmm1,xmm3
+ xor ebp,edi
+ xor edi,eax
+ add ecx,edx
+ add ebx,DWORD [20+esp]
+ vpsrld xmm3,xmm1,30
+ vmovdqa [esp],xmm4
+ and ebp,edi
+ xor edi,eax
+ shrd edx,edx,7
+ mov esi,ecx
+ vpslld xmm1,xmm1,2
+ xor ebp,edi
+ shld ecx,ecx,5
+ add ebx,ebp
+ xor esi,edx
+ xor edx,edi
+ add ebx,ecx
+ add eax,DWORD [24+esp]
+ and esi,edx
+ vpor xmm1,xmm1,xmm3
+ xor edx,edi
+ shrd ecx,ecx,7
+ vmovdqa xmm3,[96+esp]
+ mov ebp,ebx
+ xor esi,edx
+ shld ebx,ebx,5
+ add eax,esi
+ xor ebp,ecx
+ xor ecx,edx
+ add eax,ebx
+ add edi,DWORD [28+esp]
+ and ebp,ecx
+ xor ecx,edx
+ shrd ebx,ebx,7
+ mov esi,eax
+ xor ebp,ecx
+ shld eax,eax,5
+ add edi,ebp
+ xor esi,ebx
+ xor ebx,ecx
+ add edi,eax
+ vpalignr xmm4,xmm1,xmm0,8
+ vpxor xmm2,xmm2,xmm6
+ add edx,DWORD [32+esp]
+ and esi,ebx
+ xor ebx,ecx
+ shrd eax,eax,7
+ vpxor xmm2,xmm2,xmm3
+ vmovdqa [96+esp],xmm6
+ mov ebp,edi
+ xor esi,ebx
+ vmovdqa xmm6,xmm5
+ vpaddd xmm5,xmm5,xmm1
+ shld edi,edi,5
+ add edx,esi
+ vpxor xmm2,xmm2,xmm4
+ xor ebp,eax
+ xor eax,ebx
+ add edx,edi
+ add ecx,DWORD [36+esp]
+ vpsrld xmm4,xmm2,30
+ vmovdqa [16+esp],xmm5
+ and ebp,eax
+ xor eax,ebx
+ shrd edi,edi,7
+ mov esi,edx
+ vpslld xmm2,xmm2,2
+ xor ebp,eax
+ shld edx,edx,5
+ add ecx,ebp
+ xor esi,edi
+ xor edi,eax
+ add ecx,edx
+ add ebx,DWORD [40+esp]
+ and esi,edi
+ vpor xmm2,xmm2,xmm4
+ xor edi,eax
+ shrd edx,edx,7
+ vmovdqa xmm4,[64+esp]
+ mov ebp,ecx
+ xor esi,edi
+ shld ecx,ecx,5
+ add ebx,esi
+ xor ebp,edx
+ xor edx,edi
+ add ebx,ecx
+ add eax,DWORD [44+esp]
+ and ebp,edx
+ xor edx,edi
+ shrd ecx,ecx,7
+ mov esi,ebx
+ xor ebp,edx
+ shld ebx,ebx,5
+ add eax,ebp
+ xor esi,edx
+ add eax,ebx
+ vpalignr xmm5,xmm2,xmm1,8
+ vpxor xmm3,xmm3,xmm7
+ add edi,DWORD [48+esp]
+ xor esi,ecx
+ mov ebp,eax
+ shld eax,eax,5
+ vpxor xmm3,xmm3,xmm4
+ vmovdqa [64+esp],xmm7
+ add edi,esi
+ xor ebp,ecx
+ vmovdqa xmm7,xmm6
+ vpaddd xmm6,xmm6,xmm2
+ shrd ebx,ebx,7
+ add edi,eax
+ vpxor xmm3,xmm3,xmm5
+ add edx,DWORD [52+esp]
+ xor ebp,ebx
+ mov esi,edi
+ shld edi,edi,5
+ vpsrld xmm5,xmm3,30
+ vmovdqa [32+esp],xmm6
+ add edx,ebp
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,edi
+ vpslld xmm3,xmm3,2
+ add ecx,DWORD [56+esp]
+ xor esi,eax
+ mov ebp,edx
+ shld edx,edx,5
+ add ecx,esi
+ xor ebp,eax
+ shrd edi,edi,7
+ add ecx,edx
+ vpor xmm3,xmm3,xmm5
+ add ebx,DWORD [60+esp]
+ xor ebp,edi
+ mov esi,ecx
+ shld ecx,ecx,5
+ add ebx,ebp
+ xor esi,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD [esp]
+ vpaddd xmm7,xmm7,xmm3
+ xor esi,edx
+ mov ebp,ebx
+ shld ebx,ebx,5
+ add eax,esi
+ vmovdqa [48+esp],xmm7
+ xor ebp,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add edi,DWORD [4+esp]
+ xor ebp,ecx
+ mov esi,eax
+ shld eax,eax,5
+ add edi,ebp
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add edi,eax
+ add edx,DWORD [8+esp]
+ xor esi,ebx
+ mov ebp,edi
+ shld edi,edi,5
+ add edx,esi
+ xor ebp,ebx
+ shrd eax,eax,7
+ add edx,edi
+ add ecx,DWORD [12+esp]
+ xor ebp,eax
+ mov esi,edx
+ shld edx,edx,5
+ add ecx,ebp
+ xor esi,eax
+ shrd edi,edi,7
+ add ecx,edx
+ mov ebp,DWORD [196+esp]
+ cmp ebp,DWORD [200+esp]
+ je NEAR L$008done
+ vmovdqa xmm7,[160+esp]
+ vmovdqa xmm6,[176+esp]
+ vmovdqu xmm0,[ebp]
+ vmovdqu xmm1,[16+ebp]
+ vmovdqu xmm2,[32+ebp]
+ vmovdqu xmm3,[48+ebp]
+ add ebp,64
+ vpshufb xmm0,xmm0,xmm6
+ mov DWORD [196+esp],ebp
+ vmovdqa [96+esp],xmm7
+ add ebx,DWORD [16+esp]
+ xor esi,edi
+ vpshufb xmm1,xmm1,xmm6
+ mov ebp,ecx
+ shld ecx,ecx,5
+ vpaddd xmm4,xmm0,xmm7
+ add ebx,esi
+ xor ebp,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ vmovdqa [esp],xmm4
+ add eax,DWORD [20+esp]
+ xor ebp,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,ebp
+ xor esi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add edi,DWORD [24+esp]
+ xor esi,ecx
+ mov ebp,eax
+ shld eax,eax,5
+ add edi,esi
+ xor ebp,ecx
+ shrd ebx,ebx,7
+ add edi,eax
+ add edx,DWORD [28+esp]
+ xor ebp,ebx
+ mov esi,edi
+ shld edi,edi,5
+ add edx,ebp
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,edi
+ add ecx,DWORD [32+esp]
+ xor esi,eax
+ vpshufb xmm2,xmm2,xmm6
+ mov ebp,edx
+ shld edx,edx,5
+ vpaddd xmm5,xmm1,xmm7
+ add ecx,esi
+ xor ebp,eax
+ shrd edi,edi,7
+ add ecx,edx
+ vmovdqa [16+esp],xmm5
+ add ebx,DWORD [36+esp]
+ xor ebp,edi
+ mov esi,ecx
+ shld ecx,ecx,5
+ add ebx,ebp
+ xor esi,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD [40+esp]
+ xor esi,edx
+ mov ebp,ebx
+ shld ebx,ebx,5
+ add eax,esi
+ xor ebp,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add edi,DWORD [44+esp]
+ xor ebp,ecx
+ mov esi,eax
+ shld eax,eax,5
+ add edi,ebp
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add edi,eax
+ add edx,DWORD [48+esp]
+ xor esi,ebx
+ vpshufb xmm3,xmm3,xmm6
+ mov ebp,edi
+ shld edi,edi,5
+ vpaddd xmm6,xmm2,xmm7
+ add edx,esi
+ xor ebp,ebx
+ shrd eax,eax,7
+ add edx,edi
+ vmovdqa [32+esp],xmm6
+ add ecx,DWORD [52+esp]
+ xor ebp,eax
+ mov esi,edx
+ shld edx,edx,5
+ add ecx,ebp
+ xor esi,eax
+ shrd edi,edi,7
+ add ecx,edx
+ add ebx,DWORD [56+esp]
+ xor esi,edi
+ mov ebp,ecx
+ shld ecx,ecx,5
+ add ebx,esi
+ xor ebp,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD [60+esp]
+ xor ebp,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,ebp
+ shrd ecx,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 ebx,ecx
+ mov DWORD [8+ebp],ecx
+ xor ebx,edx
+ mov DWORD [12+ebp],edx
+ mov DWORD [16+ebp],edi
+ mov ebp,esi
+ and esi,ebx
+ mov ebx,ebp
+ jmp NEAR L$007loop
+align 16
+L$008done:
+ add ebx,DWORD [16+esp]
+ xor esi,edi
+ mov ebp,ecx
+ shld ecx,ecx,5
+ add ebx,esi
+ xor ebp,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD [20+esp]
+ xor ebp,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,ebp
+ xor esi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add edi,DWORD [24+esp]
+ xor esi,ecx
+ mov ebp,eax
+ shld eax,eax,5
+ add edi,esi
+ xor ebp,ecx
+ shrd ebx,ebx,7
+ add edi,eax
+ add edx,DWORD [28+esp]
+ xor ebp,ebx
+ mov esi,edi
+ shld edi,edi,5
+ add edx,ebp
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,edi
+ add ecx,DWORD [32+esp]
+ xor esi,eax
+ mov ebp,edx
+ shld edx,edx,5
+ add ecx,esi
+ xor ebp,eax
+ shrd edi,edi,7
+ add ecx,edx
+ add ebx,DWORD [36+esp]
+ xor ebp,edi
+ mov esi,ecx
+ shld ecx,ecx,5
+ add ebx,ebp
+ xor esi,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD [40+esp]
+ xor esi,edx
+ mov ebp,ebx
+ shld ebx,ebx,5
+ add eax,esi
+ xor ebp,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add edi,DWORD [44+esp]
+ xor ebp,ecx
+ mov esi,eax
+ shld eax,eax,5
+ add edi,ebp
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add edi,eax
+ add edx,DWORD [48+esp]
+ xor esi,ebx
+ mov ebp,edi
+ shld edi,edi,5
+ add edx,esi
+ xor ebp,ebx
+ shrd eax,eax,7
+ add edx,edi
+ add ecx,DWORD [52+esp]
+ xor ebp,eax
+ mov esi,edx
+ shld edx,edx,5
+ add ecx,ebp
+ xor esi,eax
+ shrd edi,edi,7
+ add ecx,edx
+ add ebx,DWORD [56+esp]
+ xor esi,edi
+ mov ebp,ecx
+ shld ecx,ecx,5
+ add ebx,esi
+ xor ebp,edi
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD [60+esp]
+ xor ebp,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,ebp
+ shrd ecx,ecx,7
+ add eax,ebx
+ vzeroall
+ 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
diff --git a/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm b/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm
index fe36bc5..3e7cfcc 100644
--- a/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm
+++ b/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm
@@ -49,11 +49,10 @@
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
+ je NEAR L$004AVX
test ebx,512
jnz NEAR L$005SSSE3
L$003no_xmm:
@@ -3179,204 +3178,6 @@
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]
@@ -3396,9 +3197,9 @@
mov DWORD [24+esp],ecx
mov DWORD [28+esp],esi
movdqa xmm7,[256+ebp]
- jmp NEAR L$011grand_ssse3
+ jmp NEAR L$010grand_ssse3
align 16
-L$011grand_ssse3:
+L$010grand_ssse3:
movdqu xmm0,[edi]
movdqu xmm1,[16+edi]
movdqu xmm2,[32+edi]
@@ -3421,9 +3222,9 @@
paddd xmm7,xmm3
movdqa [64+esp],xmm6
movdqa [80+esp],xmm7
- jmp NEAR L$012ssse3_00_47
+ jmp NEAR L$011ssse3_00_47
align 16
-L$012ssse3_00_47:
+L$011ssse3_00_47:
add ebp,64
mov ecx,edx
movdqa xmm4,xmm1
@@ -4066,7 +3867,7 @@
add eax,ecx
movdqa [80+esp],xmm6
cmp DWORD [64+ebp],66051
- jne NEAR L$012ssse3_00_47
+ jne NEAR L$011ssse3_00_47
mov ecx,edx
ror edx,14
mov esi,DWORD [20+esp]
@@ -4580,12 +4381,1193 @@
movdqa xmm7,[64+ebp]
sub ebp,192
cmp edi,DWORD [104+esp]
- jb NEAR L$011grand_ssse3
+ jb NEAR L$010grand_ssse3
mov esp,DWORD [108+esp]
pop edi
pop esi
pop ebx
pop ebp
ret
+align 32
+L$004AVX:
+ lea esp,[esp-96]
+ vzeroall
+ 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
+ vmovdqa xmm7,[256+ebp]
+ jmp NEAR L$012grand_avx
+align 32
+L$012grand_avx:
+ vmovdqu xmm0,[edi]
+ vmovdqu xmm1,[16+edi]
+ vmovdqu xmm2,[32+edi]
+ vmovdqu xmm3,[48+edi]
+ add edi,64
+ vpshufb xmm0,xmm0,xmm7
+ mov DWORD [100+esp],edi
+ vpshufb xmm1,xmm1,xmm7
+ vpshufb xmm2,xmm2,xmm7
+ vpaddd xmm4,xmm0,[ebp]
+ vpshufb xmm3,xmm3,xmm7
+ vpaddd xmm5,xmm1,[16+ebp]
+ vpaddd xmm6,xmm2,[32+ebp]
+ vpaddd xmm7,xmm3,[48+ebp]
+ vmovdqa [32+esp],xmm4
+ vmovdqa [48+esp],xmm5
+ vmovdqa [64+esp],xmm6
+ vmovdqa [80+esp],xmm7
+ jmp NEAR L$013avx_00_47
+align 16
+L$013avx_00_47:
+ add ebp,64
+ vpalignr xmm4,xmm1,xmm0,4
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [20+esp]
+ vpalignr xmm7,xmm3,xmm2,4
+ xor edx,ecx
+ mov edi,DWORD [24+esp]
+ xor esi,edi
+ vpsrld xmm6,xmm4,7
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [16+esp],ecx
+ vpaddd xmm0,xmm0,xmm7
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrld xmm7,xmm4,3
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [4+esp]
+ vpslld xmm5,xmm4,14
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [esp],eax
+ vpxor xmm4,xmm7,xmm6
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [28+esp]
+ vpshufd xmm7,xmm3,250
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ vpsrld xmm6,xmm6,11
+ add edx,DWORD [32+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ vpxor xmm4,xmm4,xmm5
+ add ebx,edx
+ add edx,DWORD [12+esp]
+ add ebx,ecx
+ vpslld xmm5,xmm5,11
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [16+esp]
+ vpxor xmm4,xmm4,xmm6
+ xor edx,ecx
+ mov edi,DWORD [20+esp]
+ xor esi,edi
+ vpsrld xmm6,xmm7,10
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [12+esp],ecx
+ vpxor xmm4,xmm4,xmm5
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrlq xmm5,xmm7,17
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [esp]
+ vpaddd xmm0,xmm0,xmm4
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [28+esp],ebx
+ vpxor xmm6,xmm6,xmm5
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [24+esp]
+ vpsrlq xmm7,xmm7,19
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ vpxor xmm6,xmm6,xmm7
+ add edx,DWORD [36+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ vpshufd xmm7,xmm6,132
+ add eax,edx
+ add edx,DWORD [8+esp]
+ add eax,ecx
+ vpsrldq xmm7,xmm7,8
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [12+esp]
+ vpaddd xmm0,xmm0,xmm7
+ xor edx,ecx
+ mov edi,DWORD [16+esp]
+ xor esi,edi
+ vpshufd xmm7,xmm0,80
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [8+esp],ecx
+ vpsrld xmm6,xmm7,10
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrlq xmm5,xmm7,17
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [28+esp]
+ vpxor xmm6,xmm6,xmm5
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [24+esp],eax
+ vpsrlq xmm7,xmm7,19
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [20+esp]
+ vpxor xmm6,xmm6,xmm7
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ vpshufd xmm7,xmm6,232
+ add edx,DWORD [40+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ vpslldq xmm7,xmm7,8
+ add ebx,edx
+ add edx,DWORD [4+esp]
+ add ebx,ecx
+ vpaddd xmm0,xmm0,xmm7
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [8+esp]
+ vpaddd xmm6,xmm0,[ebp]
+ xor edx,ecx
+ mov edi,DWORD [12+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [4+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [24+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [20+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [16+esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [44+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [esp]
+ add eax,ecx
+ vmovdqa [32+esp],xmm6
+ vpalignr xmm4,xmm2,xmm1,4
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [4+esp]
+ vpalignr xmm7,xmm0,xmm3,4
+ xor edx,ecx
+ mov edi,DWORD [8+esp]
+ xor esi,edi
+ vpsrld xmm6,xmm4,7
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [esp],ecx
+ vpaddd xmm1,xmm1,xmm7
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrld xmm7,xmm4,3
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [20+esp]
+ vpslld xmm5,xmm4,14
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [16+esp],eax
+ vpxor xmm4,xmm7,xmm6
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [12+esp]
+ vpshufd xmm7,xmm0,250
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ vpsrld xmm6,xmm6,11
+ add edx,DWORD [48+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ vpxor xmm4,xmm4,xmm5
+ add ebx,edx
+ add edx,DWORD [28+esp]
+ add ebx,ecx
+ vpslld xmm5,xmm5,11
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [esp]
+ vpxor xmm4,xmm4,xmm6
+ xor edx,ecx
+ mov edi,DWORD [4+esp]
+ xor esi,edi
+ vpsrld xmm6,xmm7,10
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [28+esp],ecx
+ vpxor xmm4,xmm4,xmm5
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrlq xmm5,xmm7,17
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [16+esp]
+ vpaddd xmm1,xmm1,xmm4
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [12+esp],ebx
+ vpxor xmm6,xmm6,xmm5
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [8+esp]
+ vpsrlq xmm7,xmm7,19
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ vpxor xmm6,xmm6,xmm7
+ add edx,DWORD [52+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ vpshufd xmm7,xmm6,132
+ add eax,edx
+ add edx,DWORD [24+esp]
+ add eax,ecx
+ vpsrldq xmm7,xmm7,8
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [28+esp]
+ vpaddd xmm1,xmm1,xmm7
+ xor edx,ecx
+ mov edi,DWORD [esp]
+ xor esi,edi
+ vpshufd xmm7,xmm1,80
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [24+esp],ecx
+ vpsrld xmm6,xmm7,10
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrlq xmm5,xmm7,17
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [12+esp]
+ vpxor xmm6,xmm6,xmm5
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [8+esp],eax
+ vpsrlq xmm7,xmm7,19
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [4+esp]
+ vpxor xmm6,xmm6,xmm7
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ vpshufd xmm7,xmm6,232
+ add edx,DWORD [56+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ vpslldq xmm7,xmm7,8
+ add ebx,edx
+ add edx,DWORD [20+esp]
+ add ebx,ecx
+ vpaddd xmm1,xmm1,xmm7
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [24+esp]
+ vpaddd xmm6,xmm1,[16+ebp]
+ xor edx,ecx
+ mov edi,DWORD [28+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [20+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [8+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [4+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [60+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [16+esp]
+ add eax,ecx
+ vmovdqa [48+esp],xmm6
+ vpalignr xmm4,xmm3,xmm2,4
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [20+esp]
+ vpalignr xmm7,xmm1,xmm0,4
+ xor edx,ecx
+ mov edi,DWORD [24+esp]
+ xor esi,edi
+ vpsrld xmm6,xmm4,7
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [16+esp],ecx
+ vpaddd xmm2,xmm2,xmm7
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrld xmm7,xmm4,3
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [4+esp]
+ vpslld xmm5,xmm4,14
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [esp],eax
+ vpxor xmm4,xmm7,xmm6
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [28+esp]
+ vpshufd xmm7,xmm1,250
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ vpsrld xmm6,xmm6,11
+ add edx,DWORD [64+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ vpxor xmm4,xmm4,xmm5
+ add ebx,edx
+ add edx,DWORD [12+esp]
+ add ebx,ecx
+ vpslld xmm5,xmm5,11
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [16+esp]
+ vpxor xmm4,xmm4,xmm6
+ xor edx,ecx
+ mov edi,DWORD [20+esp]
+ xor esi,edi
+ vpsrld xmm6,xmm7,10
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [12+esp],ecx
+ vpxor xmm4,xmm4,xmm5
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrlq xmm5,xmm7,17
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [esp]
+ vpaddd xmm2,xmm2,xmm4
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [28+esp],ebx
+ vpxor xmm6,xmm6,xmm5
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [24+esp]
+ vpsrlq xmm7,xmm7,19
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ vpxor xmm6,xmm6,xmm7
+ add edx,DWORD [68+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ vpshufd xmm7,xmm6,132
+ add eax,edx
+ add edx,DWORD [8+esp]
+ add eax,ecx
+ vpsrldq xmm7,xmm7,8
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [12+esp]
+ vpaddd xmm2,xmm2,xmm7
+ xor edx,ecx
+ mov edi,DWORD [16+esp]
+ xor esi,edi
+ vpshufd xmm7,xmm2,80
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [8+esp],ecx
+ vpsrld xmm6,xmm7,10
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrlq xmm5,xmm7,17
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [28+esp]
+ vpxor xmm6,xmm6,xmm5
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [24+esp],eax
+ vpsrlq xmm7,xmm7,19
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [20+esp]
+ vpxor xmm6,xmm6,xmm7
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ vpshufd xmm7,xmm6,232
+ add edx,DWORD [72+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ vpslldq xmm7,xmm7,8
+ add ebx,edx
+ add edx,DWORD [4+esp]
+ add ebx,ecx
+ vpaddd xmm2,xmm2,xmm7
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [8+esp]
+ vpaddd xmm6,xmm2,[32+ebp]
+ xor edx,ecx
+ mov edi,DWORD [12+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [4+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [24+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [20+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [16+esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [76+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [esp]
+ add eax,ecx
+ vmovdqa [64+esp],xmm6
+ vpalignr xmm4,xmm0,xmm3,4
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [4+esp]
+ vpalignr xmm7,xmm2,xmm1,4
+ xor edx,ecx
+ mov edi,DWORD [8+esp]
+ xor esi,edi
+ vpsrld xmm6,xmm4,7
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [esp],ecx
+ vpaddd xmm3,xmm3,xmm7
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrld xmm7,xmm4,3
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [20+esp]
+ vpslld xmm5,xmm4,14
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [16+esp],eax
+ vpxor xmm4,xmm7,xmm6
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [12+esp]
+ vpshufd xmm7,xmm2,250
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ vpsrld xmm6,xmm6,11
+ add edx,DWORD [80+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ vpxor xmm4,xmm4,xmm5
+ add ebx,edx
+ add edx,DWORD [28+esp]
+ add ebx,ecx
+ vpslld xmm5,xmm5,11
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [esp]
+ vpxor xmm4,xmm4,xmm6
+ xor edx,ecx
+ mov edi,DWORD [4+esp]
+ xor esi,edi
+ vpsrld xmm6,xmm7,10
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [28+esp],ecx
+ vpxor xmm4,xmm4,xmm5
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrlq xmm5,xmm7,17
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [16+esp]
+ vpaddd xmm3,xmm3,xmm4
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [12+esp],ebx
+ vpxor xmm6,xmm6,xmm5
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [8+esp]
+ vpsrlq xmm7,xmm7,19
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ vpxor xmm6,xmm6,xmm7
+ add edx,DWORD [84+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ vpshufd xmm7,xmm6,132
+ add eax,edx
+ add edx,DWORD [24+esp]
+ add eax,ecx
+ vpsrldq xmm7,xmm7,8
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [28+esp]
+ vpaddd xmm3,xmm3,xmm7
+ xor edx,ecx
+ mov edi,DWORD [esp]
+ xor esi,edi
+ vpshufd xmm7,xmm3,80
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [24+esp],ecx
+ vpsrld xmm6,xmm7,10
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ vpsrlq xmm5,xmm7,17
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [12+esp]
+ vpxor xmm6,xmm6,xmm5
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [8+esp],eax
+ vpsrlq xmm7,xmm7,19
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [4+esp]
+ vpxor xmm6,xmm6,xmm7
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ vpshufd xmm7,xmm6,232
+ add edx,DWORD [88+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ vpslldq xmm7,xmm7,8
+ add ebx,edx
+ add edx,DWORD [20+esp]
+ add ebx,ecx
+ vpaddd xmm3,xmm3,xmm7
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [24+esp]
+ vpaddd xmm6,xmm3,[48+ebp]
+ xor edx,ecx
+ mov edi,DWORD [28+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [20+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [8+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [4+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [92+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [16+esp]
+ add eax,ecx
+ vmovdqa [80+esp],xmm6
+ cmp DWORD [64+ebp],66051
+ jne NEAR L$013avx_00_47
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [20+esp]
+ xor edx,ecx
+ mov edi,DWORD [24+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [16+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [4+esp]
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [esp],eax
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [28+esp]
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ add edx,DWORD [32+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ add ebx,edx
+ add edx,DWORD [12+esp]
+ add ebx,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [16+esp]
+ xor edx,ecx
+ mov edi,DWORD [20+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [12+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [28+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [24+esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [36+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [8+esp]
+ add eax,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [12+esp]
+ xor edx,ecx
+ mov edi,DWORD [16+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [8+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [28+esp]
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [24+esp],eax
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [20+esp]
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ add edx,DWORD [40+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ add ebx,edx
+ add edx,DWORD [4+esp]
+ add ebx,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [8+esp]
+ xor edx,ecx
+ mov edi,DWORD [12+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [4+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [24+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [20+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [16+esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [44+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [esp]
+ add eax,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [4+esp]
+ xor edx,ecx
+ mov edi,DWORD [8+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [20+esp]
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [16+esp],eax
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [12+esp]
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ add edx,DWORD [48+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ add ebx,edx
+ add edx,DWORD [28+esp]
+ add ebx,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [esp]
+ xor edx,ecx
+ mov edi,DWORD [4+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [28+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [16+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [12+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [8+esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [52+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [24+esp]
+ add eax,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [28+esp]
+ xor edx,ecx
+ mov edi,DWORD [esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [24+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [12+esp]
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [8+esp],eax
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [4+esp]
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ add edx,DWORD [56+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ add ebx,edx
+ add edx,DWORD [20+esp]
+ add ebx,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [24+esp]
+ xor edx,ecx
+ mov edi,DWORD [28+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [20+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [8+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [4+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [60+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [16+esp]
+ add eax,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [20+esp]
+ xor edx,ecx
+ mov edi,DWORD [24+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [16+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [4+esp]
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [esp],eax
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [28+esp]
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ add edx,DWORD [64+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ add ebx,edx
+ add edx,DWORD [12+esp]
+ add ebx,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [16+esp]
+ xor edx,ecx
+ mov edi,DWORD [20+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [12+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [28+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [24+esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [68+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [8+esp]
+ add eax,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [12+esp]
+ xor edx,ecx
+ mov edi,DWORD [16+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [8+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [28+esp]
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [24+esp],eax
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [20+esp]
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ add edx,DWORD [72+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ add ebx,edx
+ add edx,DWORD [4+esp]
+ add ebx,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [8+esp]
+ xor edx,ecx
+ mov edi,DWORD [12+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [4+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [24+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [20+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [16+esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [76+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [esp]
+ add eax,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [4+esp]
+ xor edx,ecx
+ mov edi,DWORD [8+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [20+esp]
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [16+esp],eax
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [12+esp]
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ add edx,DWORD [80+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ add ebx,edx
+ add edx,DWORD [28+esp]
+ add ebx,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [esp]
+ xor edx,ecx
+ mov edi,DWORD [4+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [28+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [16+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [12+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [8+esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [84+esp]
+ xor eax,edi
+ shrd ecx,ecx,2
+ add eax,edx
+ add edx,DWORD [24+esp]
+ add eax,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [28+esp]
+ xor edx,ecx
+ mov edi,DWORD [esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [24+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,eax
+ add edx,edi
+ mov edi,DWORD [12+esp]
+ mov esi,eax
+ shrd ecx,ecx,9
+ mov DWORD [8+esp],eax
+ xor ecx,eax
+ xor eax,edi
+ add edx,DWORD [4+esp]
+ shrd ecx,ecx,11
+ and ebx,eax
+ xor ecx,esi
+ add edx,DWORD [88+esp]
+ xor ebx,edi
+ shrd ecx,ecx,2
+ add ebx,edx
+ add edx,DWORD [20+esp]
+ add ebx,ecx
+ mov ecx,edx
+ shrd edx,edx,14
+ mov esi,DWORD [24+esp]
+ xor edx,ecx
+ mov edi,DWORD [28+esp]
+ xor esi,edi
+ shrd edx,edx,5
+ and esi,ecx
+ mov DWORD [20+esp],ecx
+ xor edx,ecx
+ xor edi,esi
+ shrd edx,edx,6
+ mov ecx,ebx
+ add edx,edi
+ mov edi,DWORD [8+esp]
+ mov esi,ebx
+ shrd ecx,ecx,9
+ mov DWORD [4+esp],ebx
+ xor ecx,ebx
+ xor ebx,edi
+ add edx,DWORD [esp]
+ shrd ecx,ecx,11
+ and eax,ebx
+ xor ecx,esi
+ add edx,DWORD [92+esp]
+ xor eax,edi
+ shrd ecx,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]
+ vmovdqa xmm7,[64+ebp]
+ sub ebp,192
+ cmp edi,DWORD [104+esp]
+ jb NEAR L$012grand_avx
+ mov esp,DWORD [108+esp]
+ vzeroall
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
segment .bss
common _OPENSSL_ia32cap_P 16
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
index 04d5e39..72ec505 100644
--- 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
@@ -504,48 +504,104 @@
push r14
push r15
- mov r9d,r9d
- sub rsp,128+24
+ sub rsp,328
+ movaps XMMWORD[160+rsp],xmm6
+ movaps XMMWORD[176+rsp],xmm7
+ movaps XMMWORD[192+rsp],xmm8
+ movaps XMMWORD[208+rsp],xmm9
+ movaps XMMWORD[224+rsp],xmm10
+ movaps XMMWORD[240+rsp],xmm11
+ movaps XMMWORD[256+rsp],xmm12
+ movaps XMMWORD[272+rsp],xmm13
+ movaps XMMWORD[288+rsp],xmm14
+ movaps XMMWORD[304+rsp],xmm15
$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
+ movd xmm8,r9d
+ movdqa xmm1,XMMWORD[(($L$inc+16))]
+ movdqa xmm0,XMMWORD[$L$inc]
- shl rax,32
- or rbx,rax
+ pshufd xmm8,xmm8,0
+ movdqa xmm7,xmm1
+ movdqa xmm2,xmm1
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm8
+ movdqa xmm3,xmm7
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm8
+ movdqa xmm4,xmm7
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm8
+ movdqa xmm5,xmm7
+ paddd xmm4,xmm3
+ pcmpeqd xmm3,xmm8
+ movdqa xmm6,xmm7
+ paddd xmm5,xmm4
+ pcmpeqd xmm4,xmm8
+ paddd xmm6,xmm5
+ pcmpeqd xmm5,xmm8
+ paddd xmm7,xmm6
+ pcmpeqd xmm6,xmm8
+ pcmpeqd xmm7,xmm8
+
+ movdqa xmm8,XMMWORD[rdx]
+ movdqa xmm9,XMMWORD[16+rdx]
+ movdqa xmm10,XMMWORD[32+rdx]
+ movdqa xmm11,XMMWORD[48+rdx]
+ pand xmm8,xmm0
+ movdqa xmm12,XMMWORD[64+rdx]
+ pand xmm9,xmm1
+ movdqa xmm13,XMMWORD[80+rdx]
+ pand xmm10,xmm2
+ movdqa xmm14,XMMWORD[96+rdx]
+ pand xmm11,xmm3
+ movdqa xmm15,XMMWORD[112+rdx]
+ lea rbp,[128+rdx]
+ pand xmm12,xmm4
+ pand xmm13,xmm5
+ pand xmm14,xmm6
+ pand xmm15,xmm7
+ por xmm8,xmm10
+ por xmm9,xmm11
+ por xmm8,xmm12
+ por xmm9,xmm13
+ por xmm8,xmm14
+ por xmm9,xmm15
+
+ por xmm8,xmm9
+ pshufd xmm9,xmm8,0x4e
+ por xmm8,xmm9
+DB 102,76,15,126,195
+
+ mov QWORD[128+rsp],r8
+ mov QWORD[((128+8))+rsp],rdi
+ mov QWORD[((128+16))+rsp],rcx
+
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
@@ -558,14 +614,12 @@
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
@@ -577,6 +631,35 @@
ALIGN 32
$L$oop_mul_gather:
+ movdqa xmm8,XMMWORD[rbp]
+ movdqa xmm9,XMMWORD[16+rbp]
+ movdqa xmm10,XMMWORD[32+rbp]
+ movdqa xmm11,XMMWORD[48+rbp]
+ pand xmm8,xmm0
+ movdqa xmm12,XMMWORD[64+rbp]
+ pand xmm9,xmm1
+ movdqa xmm13,XMMWORD[80+rbp]
+ pand xmm10,xmm2
+ movdqa xmm14,XMMWORD[96+rbp]
+ pand xmm11,xmm3
+ movdqa xmm15,XMMWORD[112+rbp]
+ lea rbp,[128+rbp]
+ pand xmm12,xmm4
+ pand xmm13,xmm5
+ pand xmm14,xmm6
+ pand xmm15,xmm7
+ por xmm8,xmm10
+ por xmm9,xmm11
+ por xmm8,xmm12
+ por xmm9,xmm13
+ por xmm8,xmm14
+ por xmm9,xmm15
+
+ por xmm8,xmm9
+ pshufd xmm9,xmm8,0x4e
+ por xmm8,xmm9
+DB 102,76,15,126,195
+
mul rbx
add r8,rax
mov rax,QWORD[8+rsi]
@@ -585,7 +668,6 @@
adc r8,0
mul rbx
- movd xmm4,DWORD[rbp]
add r9,rax
mov rax,QWORD[16+rsi]
adc rdx,0
@@ -594,7 +676,6 @@
adc r9,0
mul rbx
- movd xmm5,DWORD[64+rbp]
add r10,rax
mov rax,QWORD[24+rsi]
adc rdx,0
@@ -603,7 +684,6 @@
adc r10,0
mul rbx
- pslldq xmm5,4
add r11,rax
mov rax,QWORD[32+rsi]
adc rdx,0
@@ -612,7 +692,6 @@
adc r11,0
mul rbx
- por xmm4,xmm5
add r12,rax
mov rax,QWORD[40+rsi]
adc rdx,0
@@ -637,7 +716,6 @@
adc r14,0
mul rbx
-DB 102,72,15,126,227
add r15,rax
mov rax,QWORD[rsi]
adc rdx,0
@@ -645,7 +723,6 @@
mov r15,rdx
adc r15,0
- lea rbp,[128+rbp]
lea rdi,[8+rdi]
dec ecx
@@ -660,8 +737,8 @@
mov QWORD[48+rdi],r14
mov QWORD[56+rdi],r15
-DB 102,72,15,126,199
-DB 102,72,15,126,205
+ mov rdi,QWORD[((128+8))+rsp]
+ mov rbp,QWORD[((128+16))+rsp]
mov r8,QWORD[rsp]
mov r9,QWORD[8+rsp]
@@ -686,6 +763,17 @@
call __rsaz_512_subtract
lea rax,[((128+24+48))+rsp]
+ movaps xmm6,XMMWORD[((160-200))+rax]
+ movaps xmm7,XMMWORD[((176-200))+rax]
+ movaps xmm8,XMMWORD[((192-200))+rax]
+ movaps xmm9,XMMWORD[((208-200))+rax]
+ movaps xmm10,XMMWORD[((224-200))+rax]
+ movaps xmm11,XMMWORD[((240-200))+rax]
+ movaps xmm12,XMMWORD[((256-200))+rax]
+ movaps xmm13,XMMWORD[((272-200))+rax]
+ movaps xmm14,XMMWORD[((288-200))+rax]
+ movaps xmm15,XMMWORD[((304-200))+rax]
+ lea rax,[176+rax]
mov r15,QWORD[((-48))+rax]
mov r14,QWORD[((-40))+rax]
mov r13,QWORD[((-32))+rax]
@@ -724,7 +812,7 @@
mov r9d,r9d
sub rsp,128+24
$L$mul_scatter4_body:
- lea r8,[r9*4+r8]
+ lea r8,[r9*8+r8]
DB 102,72,15,110,199
DB 102,72,15,110,202
DB 102,73,15,110,208
@@ -760,30 +848,14 @@
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
+ mov QWORD[rsi],r8
+ mov QWORD[128+rsi],r9
+ mov QWORD[256+rsi],r10
+ mov QWORD[384+rsi],r11
+ mov QWORD[512+rsi],r12
+ mov QWORD[640+rsi],r13
+ mov QWORD[768+rsi],r14
+ mov QWORD[896+rsi],r15
lea rax,[((128+24+48))+rsp]
mov r15,QWORD[((-48))+rax]
@@ -1150,16 +1222,14 @@
ALIGN 16
rsaz_512_scatter4:
- lea rcx,[r8*4+rcx]
+ lea rcx,[r8*8+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
+ mov QWORD[rcx],rax
lea rcx,[128+rcx]
dec r9d
jnz NEAR $L$oop_scatter
@@ -1170,22 +1240,98 @@
ALIGN 16
rsaz_512_gather4:
- lea rdx,[r8*4+rdx]
+$L$SEH_begin_rsaz_512_gather4:
+DB 0x48,0x81,0xec,0xa8,0x00,0x00,0x00
+DB 0x0f,0x29,0x34,0x24
+DB 0x0f,0x29,0x7c,0x24,0x10
+DB 0x44,0x0f,0x29,0x44,0x24,0x20
+DB 0x44,0x0f,0x29,0x4c,0x24,0x30
+DB 0x44,0x0f,0x29,0x54,0x24,0x40
+DB 0x44,0x0f,0x29,0x5c,0x24,0x50
+DB 0x44,0x0f,0x29,0x64,0x24,0x60
+DB 0x44,0x0f,0x29,0x6c,0x24,0x70
+DB 0x44,0x0f,0x29,0xb4,0x24,0x80,0,0,0
+DB 0x44,0x0f,0x29,0xbc,0x24,0x90,0,0,0
+ movd xmm8,r8d
+ movdqa xmm1,XMMWORD[(($L$inc+16))]
+ movdqa xmm0,XMMWORD[$L$inc]
+
+ pshufd xmm8,xmm8,0
+ movdqa xmm7,xmm1
+ movdqa xmm2,xmm1
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm8
+ movdqa xmm3,xmm7
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm8
+ movdqa xmm4,xmm7
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm8
+ movdqa xmm5,xmm7
+ paddd xmm4,xmm3
+ pcmpeqd xmm3,xmm8
+ movdqa xmm6,xmm7
+ paddd xmm5,xmm4
+ pcmpeqd xmm4,xmm8
+ paddd xmm6,xmm5
+ pcmpeqd xmm5,xmm8
+ paddd xmm7,xmm6
+ pcmpeqd xmm6,xmm8
+ pcmpeqd xmm7,xmm8
mov r9d,8
jmp NEAR $L$oop_gather
ALIGN 16
$L$oop_gather:
- mov eax,DWORD[rdx]
- mov r8d,DWORD[64+rdx]
+ movdqa xmm8,XMMWORD[rdx]
+ movdqa xmm9,XMMWORD[16+rdx]
+ movdqa xmm10,XMMWORD[32+rdx]
+ movdqa xmm11,XMMWORD[48+rdx]
+ pand xmm8,xmm0
+ movdqa xmm12,XMMWORD[64+rdx]
+ pand xmm9,xmm1
+ movdqa xmm13,XMMWORD[80+rdx]
+ pand xmm10,xmm2
+ movdqa xmm14,XMMWORD[96+rdx]
+ pand xmm11,xmm3
+ movdqa xmm15,XMMWORD[112+rdx]
lea rdx,[128+rdx]
- shl r8,32
- or rax,r8
- mov QWORD[rcx],rax
+ pand xmm12,xmm4
+ pand xmm13,xmm5
+ pand xmm14,xmm6
+ pand xmm15,xmm7
+ por xmm8,xmm10
+ por xmm9,xmm11
+ por xmm8,xmm12
+ por xmm9,xmm13
+ por xmm8,xmm14
+ por xmm9,xmm15
+
+ por xmm8,xmm9
+ pshufd xmm9,xmm8,0x4e
+ por xmm8,xmm9
+ movq QWORD[rcx],xmm8
lea rcx,[8+rcx]
dec r9d
jnz NEAR $L$oop_gather
+ 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]
+ add rsp,0xa8
DB 0F3h,0C3h ;repret
+$L$SEH_end_rsaz_512_gather4:
+
+ALIGN 64
+$L$inc:
+ DD 0,0,1,1
+ DD 2,2,2,2
EXTERN __imp_RtlVirtualUnwind
ALIGN 16
@@ -1221,6 +1367,18 @@
lea rax,[((128+24+48))+rax]
+ lea rbx,[$L$mul_gather4_epilogue]
+ cmp rbx,r10
+ jne NEAR $L$se_not_in_mul_gather4
+
+ lea rax,[176+rax]
+
+ lea rsi,[((-48-168))+rax]
+ lea rdi,[512+r8]
+ mov ecx,20
+ DD 0xa548f3fc
+
+$L$se_not_in_mul_gather4:
mov rbx,QWORD[((-8))+rax]
mov rbp,QWORD[((-16))+rax]
mov r12,QWORD[((-24))+rax]
@@ -1296,6 +1454,10 @@
DD $L$SEH_end_rsaz_512_mul_by_one wrt ..imagebase
DD $L$SEH_info_rsaz_512_mul_by_one wrt ..imagebase
+ DD $L$SEH_begin_rsaz_512_gather4 wrt ..imagebase
+ DD $L$SEH_end_rsaz_512_gather4 wrt ..imagebase
+ DD $L$SEH_info_rsaz_512_gather4 wrt ..imagebase
+
section .xdata rdata align=8
ALIGN 8
$L$SEH_info_rsaz_512_sqr:
@@ -1318,3 +1480,16 @@
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
+$L$SEH_info_rsaz_512_gather4:
+DB 0x01,0x46,0x16,0x00
+DB 0x46,0xf8,0x09,0x00
+DB 0x3d,0xe8,0x08,0x00
+DB 0x34,0xd8,0x07,0x00
+DB 0x2e,0xc8,0x06,0x00
+DB 0x28,0xb8,0x05,0x00
+DB 0x22,0xa8,0x04,0x00
+DB 0x1c,0x98,0x03,0x00
+DB 0x16,0x88,0x02,0x00
+DB 0x10,0x78,0x01,0x00
+DB 0x0b,0x68,0x00,0x00
+DB 0x07,0x01,0x15,0x00
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
index db0d1b9..4d8e1cb 100644
--- 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
@@ -677,20 +677,20 @@
- lea r11,[((-64))+r9*4+rsp]
+ lea r11,[((-64))+r9*2+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]
+ lea rsp,[((-64))+r9*2+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]
+ lea r10,[((4096-64))+r9*2]
+ lea rsp,[((-64))+r9*2+rsp]
sub r11,r10
mov r10,0
cmovc r11,r10
@@ -700,58 +700,80 @@
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
-
+DB 102,72,15,110,209
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
+
+
+
+ lea rbx,[r9*1+rdi]
+ mov rcx,r9
+ mov rdx,r9
+DB 102,72,15,126,207
+ sar rcx,3+2
+ jmp NEAR $L$sqr8x_sub
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
+$L$sqr8x_sub:
+ mov r12,QWORD[rbx]
+ mov r13,QWORD[8+rbx]
+ mov r14,QWORD[16+rbx]
+ mov r15,QWORD[24+rbx]
+ lea rbx,[32+rbx]
+ sbb r12,QWORD[rbp]
+ sbb r13,QWORD[8+rbp]
+ sbb r14,QWORD[16+rbp]
+ sbb r15,QWORD[24+rbp]
+ lea rbp,[32+rbp]
+ mov QWORD[rdi],r12
+ mov QWORD[8+rdi],r13
+ mov QWORD[16+rdi],r14
+ mov QWORD[24+rdi],r15
+ lea rdi,[32+rdi]
+ inc rcx
+ jnz NEAR $L$sqr8x_sub
+
+ sbb rax,0
+ lea rbx,[r9*1+rbx]
+ lea rdi,[r9*1+rdi]
+
+DB 102,72,15,110,200
+ pxor xmm0,xmm0
+ pshufd xmm1,xmm1,0
+ mov rsi,QWORD[40+rsp]
+ jmp NEAR $L$sqr8x_cond_copy
+
+ALIGN 32
+$L$sqr8x_cond_copy:
+ movdqa xmm2,XMMWORD[rbx]
+ movdqa xmm3,XMMWORD[16+rbx]
+ lea rbx,[32+rbx]
+ movdqu xmm4,XMMWORD[rdi]
+ movdqu xmm5,XMMWORD[16+rdi]
+ lea rdi,[32+rdi]
+ movdqa XMMWORD[(-32)+rbx],xmm0
+ movdqa XMMWORD[(-16)+rbx],xmm0
+ movdqa XMMWORD[(-32)+rdx*1+rbx],xmm0
+ movdqa XMMWORD[(-16)+rdx*1+rbx],xmm0
+ pcmpeqd xmm0,xmm1
+ pand xmm2,xmm1
+ pand xmm3,xmm1
+ pand xmm4,xmm0
+ pand xmm5,xmm0
+ pxor xmm0,xmm0
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqu XMMWORD[(-32)+rdi],xmm4
+ movdqu XMMWORD[(-16)+rdi],xmm5
+ add r9,32
+ jnz NEAR $L$sqr8x_cond_copy
mov rax,1
mov r15,QWORD[((-48))+rsi]
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
index 284318a..cd9a6e5 100644
--- 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
@@ -31,49 +31,151 @@
$L$mul_enter:
mov r9d,r9d
mov rax,rsp
- mov r10d,DWORD[56+rsp]
+ movd xmm5,DWORD[56+rsp]
+ lea r10,[$L$inc]
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]
+ lea rsp,[((-264))+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]
+ lea r12,[128+rdx]
+ movdqa xmm0,XMMWORD[r10]
+ movdqa xmm1,XMMWORD[16+r10]
+ lea r10,[((24-112))+r9*8+rsp]
+ and r10,-16
- 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
+ pshufd xmm5,xmm5,0
+ movdqa xmm4,xmm1
+ movdqa xmm2,xmm1
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+DB 0x67
+ movdqa xmm3,xmm4
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[112+r10],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[128+r10],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[144+r10],xmm2
+ movdqa xmm2,xmm4
+
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[160+r10],xmm3
+ movdqa xmm3,xmm4
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[176+r10],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[192+r10],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[208+r10],xmm2
+ movdqa xmm2,xmm4
+
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[224+r10],xmm3
+ movdqa xmm3,xmm4
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[240+r10],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[256+r10],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[272+r10],xmm2
+ movdqa xmm2,xmm4
+
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[288+r10],xmm3
+ movdqa xmm3,xmm4
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[304+r10],xmm0
+
+ paddd xmm3,xmm2
+DB 0x67
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[320+r10],xmm1
+
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[336+r10],xmm2
+ pand xmm0,XMMWORD[64+r12]
+
+ pand xmm1,XMMWORD[80+r12]
+ pand xmm2,XMMWORD[96+r12]
+ movdqa XMMWORD[352+r10],xmm3
+ pand xmm3,XMMWORD[112+r12]
por xmm0,xmm2
+ por xmm1,xmm3
+ movdqa xmm4,XMMWORD[((-128))+r12]
+ movdqa xmm5,XMMWORD[((-112))+r12]
+ movdqa xmm2,XMMWORD[((-96))+r12]
+ pand xmm4,XMMWORD[112+r10]
+ movdqa xmm3,XMMWORD[((-80))+r12]
+ pand xmm5,XMMWORD[128+r10]
+ por xmm0,xmm4
+ pand xmm2,XMMWORD[144+r10]
+ por xmm1,xmm5
+ pand xmm3,XMMWORD[160+r10]
+ por xmm0,xmm2
+ por xmm1,xmm3
+ movdqa xmm4,XMMWORD[((-64))+r12]
+ movdqa xmm5,XMMWORD[((-48))+r12]
+ movdqa xmm2,XMMWORD[((-32))+r12]
+ pand xmm4,XMMWORD[176+r10]
+ movdqa xmm3,XMMWORD[((-16))+r12]
+ pand xmm5,XMMWORD[192+r10]
+ por xmm0,xmm4
+ pand xmm2,XMMWORD[208+r10]
+ por xmm1,xmm5
+ pand xmm3,XMMWORD[224+r10]
+ por xmm0,xmm2
+ por xmm1,xmm3
+ movdqa xmm4,XMMWORD[r12]
+ movdqa xmm5,XMMWORD[16+r12]
+ movdqa xmm2,XMMWORD[32+r12]
+ pand xmm4,XMMWORD[240+r10]
+ movdqa xmm3,XMMWORD[48+r12]
+ pand xmm5,XMMWORD[256+r10]
+ por xmm0,xmm4
+ pand xmm2,XMMWORD[272+r10]
+ por xmm1,xmm5
+ pand xmm3,XMMWORD[288+r10]
+ por xmm0,xmm2
+ por xmm1,xmm3
+ por xmm0,xmm1
+ pshufd xmm1,xmm0,0x4e
+ por xmm0,xmm1
lea r12,[256+r12]
- por xmm0,xmm3
-
DB 102,72,15,126,195
mov r8,QWORD[r8]
@@ -82,29 +184,14 @@
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]
@@ -137,14 +224,12 @@
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 QWORD[((-16))+r9*8+rsp],r13
mov r13,rdx
mov r11,r10
@@ -158,33 +243,78 @@
jmp NEAR $L$outer
ALIGN 16
$L$outer:
+ lea rdx,[((24+128))+r9*8+rsp]
+ and rdx,-16
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ movdqa xmm0,XMMWORD[((-128))+r12]
+ movdqa xmm1,XMMWORD[((-112))+r12]
+ movdqa xmm2,XMMWORD[((-96))+r12]
+ movdqa xmm3,XMMWORD[((-80))+r12]
+ pand xmm0,XMMWORD[((-128))+rdx]
+ pand xmm1,XMMWORD[((-112))+rdx]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[((-96))+rdx]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[((-80))+rdx]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[((-64))+r12]
+ movdqa xmm1,XMMWORD[((-48))+r12]
+ movdqa xmm2,XMMWORD[((-32))+r12]
+ movdqa xmm3,XMMWORD[((-16))+r12]
+ pand xmm0,XMMWORD[((-64))+rdx]
+ pand xmm1,XMMWORD[((-48))+rdx]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[((-32))+rdx]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[((-16))+rdx]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[r12]
+ movdqa xmm1,XMMWORD[16+r12]
+ movdqa xmm2,XMMWORD[32+r12]
+ movdqa xmm3,XMMWORD[48+r12]
+ pand xmm0,XMMWORD[rdx]
+ pand xmm1,XMMWORD[16+rdx]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[32+rdx]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[48+rdx]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[64+r12]
+ movdqa xmm1,XMMWORD[80+r12]
+ movdqa xmm2,XMMWORD[96+r12]
+ movdqa xmm3,XMMWORD[112+r12]
+ pand xmm0,XMMWORD[64+rdx]
+ pand xmm1,XMMWORD[80+rdx]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[96+rdx]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[112+rdx]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ por xmm4,xmm5
+ pshufd xmm0,xmm4,0x4e
+ por xmm0,xmm4
+ lea r12,[256+r12]
+
+ mov rax,QWORD[rsi]
+DB 102,72,15,126,195
+
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]
@@ -220,15 +350,12 @@
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]
+ mov r10,QWORD[r9*8+rsp]
adc rdx,0
- mov QWORD[((-16))+r15*8+rsp],r13
+ mov QWORD[((-16))+r9*8+rsp],r13
mov r13,rdx
xor rdx,rdx
@@ -274,8 +401,7 @@
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]
@@ -312,13 +438,10 @@
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
+ lea r10,[r9*2+r9]
neg r9
@@ -328,19 +451,21 @@
- lea r11,[((-64))+r9*2+rsp]
- sub r11,rsi
+
+
+ lea r11,[((-320))+r9*2+rsp]
+ sub r11,rdi
and r11,4095
cmp r10,r11
jb NEAR $L$mul4xsp_alt
sub rsp,r11
- lea rsp,[((-64))+r9*2+rsp]
+ lea rsp,[((-320))+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]
+ lea r10,[((4096-320))+r9*2]
+ lea rsp,[((-320))+r9*2+rsp]
sub r11,r10
mov r10,0
cmovc r11,r10
@@ -356,8 +481,7 @@
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]
@@ -375,47 +499,141 @@
ALIGN 32
mul4x_internal:
shl r9,5
- mov r10d,DWORD[56+rax]
- lea r13,[256+r9*1+rdx]
+ movd xmm5,DWORD[56+rax]
+ lea rax,[$L$inc]
+ lea r13,[128+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
+ movdqa xmm0,XMMWORD[rax]
+ movdqa xmm1,XMMWORD[16+rax]
+ lea r10,[((88-112))+r9*1+rsp]
+ lea r12,[128+rdx]
- 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
+ pshufd xmm5,xmm5,0
+ movdqa xmm4,xmm1
+DB 0x67,0x67
+ movdqa xmm2,xmm1
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
DB 0x67
- por xmm0,xmm1
- movq xmm1,QWORD[((-96))+r14]
+ movdqa xmm3,xmm4
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[112+r10],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[128+r10],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[144+r10],xmm2
+ movdqa xmm2,xmm4
+
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[160+r10],xmm3
+ movdqa xmm3,xmm4
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[176+r10],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[192+r10],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[208+r10],xmm2
+ movdqa xmm2,xmm4
+
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[224+r10],xmm3
+ movdqa xmm3,xmm4
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[240+r10],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[256+r10],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[272+r10],xmm2
+ movdqa xmm2,xmm4
+
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[288+r10],xmm3
+ movdqa xmm3,xmm4
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[304+r10],xmm0
+
+ paddd xmm3,xmm2
DB 0x67
- pand xmm3,xmm7
-DB 0x67
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[320+r10],xmm1
+
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[336+r10],xmm2
+ pand xmm0,XMMWORD[64+r12]
+
+ pand xmm1,XMMWORD[80+r12]
+ pand xmm2,XMMWORD[96+r12]
+ movdqa XMMWORD[352+r10],xmm3
+ pand xmm3,XMMWORD[112+r12]
por xmm0,xmm2
- movq xmm2,QWORD[((-32))+r14]
-DB 0x67
- pand xmm1,xmm4
-DB 0x67
- por xmm0,xmm3
- movq xmm3,QWORD[32+r14]
-
+ por xmm1,xmm3
+ movdqa xmm4,XMMWORD[((-128))+r12]
+ movdqa xmm5,XMMWORD[((-112))+r12]
+ movdqa xmm2,XMMWORD[((-96))+r12]
+ pand xmm4,XMMWORD[112+r10]
+ movdqa xmm3,XMMWORD[((-80))+r12]
+ pand xmm5,XMMWORD[128+r10]
+ por xmm0,xmm4
+ pand xmm2,XMMWORD[144+r10]
+ por xmm1,xmm5
+ pand xmm3,XMMWORD[160+r10]
+ por xmm0,xmm2
+ por xmm1,xmm3
+ movdqa xmm4,XMMWORD[((-64))+r12]
+ movdqa xmm5,XMMWORD[((-48))+r12]
+ movdqa xmm2,XMMWORD[((-32))+r12]
+ pand xmm4,XMMWORD[176+r10]
+ movdqa xmm3,XMMWORD[((-16))+r12]
+ pand xmm5,XMMWORD[192+r10]
+ por xmm0,xmm4
+ pand xmm2,XMMWORD[208+r10]
+ por xmm1,xmm5
+ pand xmm3,XMMWORD[224+r10]
+ por xmm0,xmm2
+ por xmm1,xmm3
+ movdqa xmm4,XMMWORD[r12]
+ movdqa xmm5,XMMWORD[16+r12]
+ movdqa xmm2,XMMWORD[32+r12]
+ pand xmm4,XMMWORD[240+r10]
+ movdqa xmm3,XMMWORD[48+r12]
+ pand xmm5,XMMWORD[256+r10]
+ por xmm0,xmm4
+ pand xmm2,XMMWORD[272+r10]
+ por xmm1,xmm5
+ pand xmm3,XMMWORD[288+r10]
+ por xmm0,xmm2
+ por xmm1,xmm3
+ por xmm0,xmm1
+ pshufd xmm1,xmm0,0x4e
+ por xmm0,xmm1
+ lea r12,[256+r12]
DB 102,72,15,126,195
- movq xmm0,QWORD[96+r14]
+
mov QWORD[((16+8))+rsp],r13
mov QWORD[((56+8))+rsp],rdi
@@ -429,26 +647,10 @@
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]
+ lea r14,[((64+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]
@@ -457,7 +659,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[16+rcx]
+ mov rax,QWORD[8+rcx]
adc rdx,0
mov r10,rdx
@@ -467,7 +669,7 @@
adc rdx,0
add rdi,r11
lea r15,[32+r9]
- lea rcx,[64+rcx]
+ lea rcx,[32+rcx]
adc rdx,0
mov QWORD[r14],rdi
mov r13,rdx
@@ -477,7 +679,7 @@
$L$1st4x:
mul rbx
add r10,rax
- mov rax,QWORD[((-32))+rcx]
+ mov rax,QWORD[((-16))+rcx]
lea r14,[32+r14]
adc rdx,0
mov r11,rdx
@@ -493,7 +695,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[((-16))+rcx]
+ mov rax,QWORD[((-8))+rcx]
adc rdx,0
mov r10,rdx
@@ -523,7 +725,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[16+rcx]
+ mov rax,QWORD[8+rcx]
adc rdx,0
mov r10,rdx
@@ -532,7 +734,7 @@
mov rax,QWORD[16+r15*1+rsi]
adc rdx,0
add rdi,r11
- lea rcx,[64+rcx]
+ lea rcx,[32+rcx]
adc rdx,0
mov QWORD[r14],rdi
mov r13,rdx
@@ -542,7 +744,7 @@
mul rbx
add r10,rax
- mov rax,QWORD[((-32))+rcx]
+ mov rax,QWORD[((-16))+rcx]
lea r14,[32+r14]
adc rdx,0
mov r11,rdx
@@ -558,7 +760,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[((-16))+rcx]
+ mov rax,QWORD[((-8))+rcx]
adc rdx,0
mov r10,rdx
@@ -571,8 +773,7 @@
mov QWORD[((-16))+r14],rdi
mov r13,rdx
-DB 102,72,15,126,195
- lea rcx,[r9*2+rcx]
+ lea rcx,[r9*1+rcx]
xor rdi,rdi
add r13,r10
@@ -583,6 +784,63 @@
ALIGN 32
$L$outer4x:
+ lea rdx,[((16+128))+r14]
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ movdqa xmm0,XMMWORD[((-128))+r12]
+ movdqa xmm1,XMMWORD[((-112))+r12]
+ movdqa xmm2,XMMWORD[((-96))+r12]
+ movdqa xmm3,XMMWORD[((-80))+r12]
+ pand xmm0,XMMWORD[((-128))+rdx]
+ pand xmm1,XMMWORD[((-112))+rdx]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[((-96))+rdx]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[((-80))+rdx]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[((-64))+r12]
+ movdqa xmm1,XMMWORD[((-48))+r12]
+ movdqa xmm2,XMMWORD[((-32))+r12]
+ movdqa xmm3,XMMWORD[((-16))+r12]
+ pand xmm0,XMMWORD[((-64))+rdx]
+ pand xmm1,XMMWORD[((-48))+rdx]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[((-32))+rdx]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[((-16))+rdx]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[r12]
+ movdqa xmm1,XMMWORD[16+r12]
+ movdqa xmm2,XMMWORD[32+r12]
+ movdqa xmm3,XMMWORD[48+r12]
+ pand xmm0,XMMWORD[rdx]
+ pand xmm1,XMMWORD[16+rdx]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[32+rdx]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[48+rdx]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[64+r12]
+ movdqa xmm1,XMMWORD[80+r12]
+ movdqa xmm2,XMMWORD[96+r12]
+ movdqa xmm3,XMMWORD[112+r12]
+ pand xmm0,XMMWORD[64+rdx]
+ pand xmm1,XMMWORD[80+rdx]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[96+rdx]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[112+rdx]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ por xmm4,xmm5
+ pshufd xmm0,xmm4,0x4e
+ por xmm0,xmm4
+ lea r12,[256+r12]
+DB 102,72,15,126,195
+
mov r10,QWORD[r9*1+r14]
mov rbp,r8
mul rbx
@@ -590,25 +848,11 @@
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
@@ -618,7 +862,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[16+rcx]
+ mov rax,QWORD[8+rcx]
adc rdx,0
add r11,QWORD[8+r14]
adc rdx,0
@@ -630,7 +874,7 @@
adc rdx,0
add rdi,r11
lea r15,[32+r9]
- lea rcx,[64+rcx]
+ lea rcx,[32+rcx]
adc rdx,0
mov r13,rdx
jmp NEAR $L$inner4x
@@ -639,7 +883,7 @@
$L$inner4x:
mul rbx
add r10,rax
- mov rax,QWORD[((-32))+rcx]
+ mov rax,QWORD[((-16))+rcx]
adc rdx,0
add r10,QWORD[16+r14]
lea r14,[32+r14]
@@ -657,7 +901,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[((-16))+rcx]
+ mov rax,QWORD[((-8))+rcx]
adc rdx,0
add r11,QWORD[((-8))+r14]
adc rdx,0
@@ -691,7 +935,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[16+rcx]
+ mov rax,QWORD[8+rcx]
adc rdx,0
add r11,QWORD[8+r14]
adc rdx,0
@@ -702,7 +946,7 @@
mov rax,QWORD[16+r15*1+rsi]
adc rdx,0
add rdi,r11
- lea rcx,[64+rcx]
+ lea rcx,[32+rcx]
adc rdx,0
mov QWORD[((-8))+r14],r13
mov r13,rdx
@@ -712,7 +956,7 @@
mul rbx
add r10,rax
- mov rax,QWORD[((-32))+rcx]
+ mov rax,QWORD[((-16))+rcx]
adc rdx,0
add r10,QWORD[16+r14]
lea r14,[32+r14]
@@ -731,7 +975,7 @@
mul rbx
add r11,rax
mov rax,rbp
- mov rbp,QWORD[((-16))+rcx]
+ mov rbp,QWORD[((-8))+rcx]
adc rdx,0
add r11,QWORD[((-8))+r14]
adc rdx,0
@@ -746,9 +990,8 @@
mov QWORD[((-24))+r14],r13
mov r13,rdx
-DB 102,72,15,126,195
mov QWORD[((-16))+r14],rdi
- lea rcx,[r9*2+rcx]
+ lea rcx,[r9*1+rcx]
xor rdi,rdi
add r13,r10
@@ -759,16 +1002,23 @@
cmp r12,QWORD[((16+8))+rsp]
jb NEAR $L$outer4x
+ xor rax,rax
sub rbp,r13
adc r15,r15
or rdi,r15
- xor rdi,1
+ sub rax,rdi
lea rbx,[r9*1+r14]
- lea rbp,[rdi*8+rcx]
+ mov r12,QWORD[rcx]
+ lea rbp,[rcx]
mov rcx,r9
sar rcx,3+2
mov rdi,QWORD[((56+8))+rsp]
- jmp NEAR $L$sqr4x_sub
+ dec r12
+ xor r10,r10
+ mov r13,QWORD[8+rbp]
+ mov r14,QWORD[16+rbp]
+ mov r15,QWORD[24+rbp]
+ jmp NEAR $L$sqr4x_sub_entry
global bn_power5
@@ -793,12 +1043,9 @@
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
+ lea r10d,[r9*2+r9]
neg r9
mov r8,QWORD[r8]
@@ -808,19 +1055,20 @@
- lea r11,[((-64))+r9*2+rsp]
- sub r11,rsi
+
+ lea r11,[((-320))+r9*2+rsp]
+ sub r11,rdi
and r11,4095
cmp r10,r11
jb NEAR $L$pwr_sp_alt
sub rsp,r11
- lea rsp,[((-64))+r9*2+rsp]
+ lea rsp,[((-320))+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]
+ lea r10,[((4096-320))+r9*2]
+ lea rsp,[((-320))+r9*2+rsp]
sub r11,r10
mov r10,0
cmovc r11,r10
@@ -848,10 +1096,15 @@
DB 102,72,15,110,226
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
call __bn_sqr8x_internal
+ call __bn_post4x_internal
DB 102,72,15,126,209
DB 102,72,15,126,226
@@ -1397,9 +1650,9 @@
mov QWORD[((-16))+rdi],rbx
mov QWORD[((-8))+rdi],r8
DB 102,72,15,126,213
-sqr8x_reduction:
+__bn_sqr8x_reduction:
xor rax,rax
- lea rcx,[r9*2+rbp]
+ lea rcx,[rbp*1+r9]
lea rdx,[((48+8))+r9*2+rsp]
mov QWORD[((0+8))+rsp],rcx
lea rdi,[((48+8))+r9*1+rsp]
@@ -1432,14 +1685,14 @@
ALIGN 32
$L$8x_reduce:
mul rbx
- mov rax,QWORD[16+rbp]
+ mov rax,QWORD[8+rbp]
neg r8
mov r8,rdx
adc r8,0
mul rbx
add r9,rax
- mov rax,QWORD[32+rbp]
+ mov rax,QWORD[16+rbp]
adc rdx,0
add r8,r9
mov QWORD[((48-8+8))+rcx*8+rsp],rbx
@@ -1448,7 +1701,7 @@
mul rbx
add r10,rax
- mov rax,QWORD[48+rbp]
+ mov rax,QWORD[24+rbp]
adc rdx,0
add r9,r10
mov rsi,QWORD[((32+8))+rsp]
@@ -1457,7 +1710,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[64+rbp]
+ mov rax,QWORD[32+rbp]
adc rdx,0
imul rsi,r8
add r10,r11
@@ -1466,7 +1719,7 @@
mul rbx
add r12,rax
- mov rax,QWORD[80+rbp]
+ mov rax,QWORD[40+rbp]
adc rdx,0
add r11,r12
mov r12,rdx
@@ -1474,7 +1727,7 @@
mul rbx
add r13,rax
- mov rax,QWORD[96+rbp]
+ mov rax,QWORD[48+rbp]
adc rdx,0
add r12,r13
mov r13,rdx
@@ -1482,7 +1735,7 @@
mul rbx
add r14,rax
- mov rax,QWORD[112+rbp]
+ mov rax,QWORD[56+rbp]
adc rdx,0
add r13,r14
mov r14,rdx
@@ -1500,7 +1753,7 @@
dec ecx
jnz NEAR $L$8x_reduce
- lea rbp,[128+rbp]
+ lea rbp,[64+rbp]
xor rax,rax
mov rdx,QWORD[((8+8))+rsp]
cmp rbp,QWORD[((0+8))+rsp]
@@ -1526,14 +1779,14 @@
$L$8x_tail:
mul rbx
add r8,rax
- mov rax,QWORD[16+rbp]
+ mov rax,QWORD[8+rbp]
mov QWORD[rdi],r8
mov r8,rdx
adc r8,0
mul rbx
add r9,rax
- mov rax,QWORD[32+rbp]
+ mov rax,QWORD[16+rbp]
adc rdx,0
add r8,r9
lea rdi,[8+rdi]
@@ -1542,7 +1795,7 @@
mul rbx
add r10,rax
- mov rax,QWORD[48+rbp]
+ mov rax,QWORD[24+rbp]
adc rdx,0
add r9,r10
mov r10,rdx
@@ -1550,7 +1803,7 @@
mul rbx
add r11,rax
- mov rax,QWORD[64+rbp]
+ mov rax,QWORD[32+rbp]
adc rdx,0
add r10,r11
mov r11,rdx
@@ -1558,7 +1811,7 @@
mul rbx
add r12,rax
- mov rax,QWORD[80+rbp]
+ mov rax,QWORD[40+rbp]
adc rdx,0
add r11,r12
mov r12,rdx
@@ -1566,7 +1819,7 @@
mul rbx
add r13,rax
- mov rax,QWORD[96+rbp]
+ mov rax,QWORD[48+rbp]
adc rdx,0
add r12,r13
mov r13,rdx
@@ -1574,7 +1827,7 @@
mul rbx
add r14,rax
- mov rax,QWORD[112+rbp]
+ mov rax,QWORD[56+rbp]
adc rdx,0
add r13,r14
mov r14,rdx
@@ -1592,7 +1845,7 @@
dec ecx
jnz NEAR $L$8x_tail
- lea rbp,[128+rbp]
+ lea rbp,[64+rbp]
mov rdx,QWORD[((8+8))+rsp]
cmp rbp,QWORD[((0+8))+rsp]
jae NEAR $L$8x_tail_done
@@ -1616,6 +1869,15 @@
ALIGN 32
$L$8x_tail_done:
add r8,QWORD[rdx]
+ adc r9,0
+ adc r10,0
+ adc r11,0
+ adc r12,0
+ adc r13,0
+ adc r14,0
+ adc r15,0
+
+
xor rax,rax
neg rsi
@@ -1629,7 +1891,7 @@
adc r14,QWORD[48+rdi]
adc r15,QWORD[56+rdi]
adc rax,0
- mov rcx,QWORD[((-16))+rbp]
+ mov rcx,QWORD[((-8))+rbp]
xor rsi,rsi
DB 102,72,15,126,213
@@ -1647,40 +1909,58 @@
cmp rdi,rdx
jb NEAR $L$8x_reduction_loop
+ DB 0F3h,0C3h ;repret
- 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
+__bn_post4x_internal:
+ mov r12,QWORD[rbp]
+ lea rbx,[r9*1+rdi]
+ mov rcx,r9
+DB 102,72,15,126,207
+ neg rax
+DB 102,72,15,126,206
+ sar rcx,3+2
+ dec r12
+ xor r10,r10
+ mov r13,QWORD[8+rbp]
+ mov r14,QWORD[16+rbp]
+ mov r15,QWORD[24+rbp]
+ jmp NEAR $L$sqr4x_sub_entry
+
+ALIGN 16
$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 r12,QWORD[rbp]
+ mov r13,QWORD[8+rbp]
+ mov r14,QWORD[16+rbp]
+ mov r15,QWORD[24+rbp]
+$L$sqr4x_sub_entry:
+ lea rbp,[32+rbp]
+ not r12
+ not r13
+ not r14
+ not r15
+ and r12,rax
+ and r13,rax
+ and r14,rax
+ and r15,rax
+
+ neg r10
+ adc r12,QWORD[rbx]
+ adc r13,QWORD[8+rbx]
+ adc r14,QWORD[16+rbx]
+ adc r15,QWORD[24+rbx]
mov QWORD[rdi],r12
- sbb r15,QWORD[48+rbp]
- lea rbp,[64+rbp]
+ lea rbx,[32+rbx]
mov QWORD[8+rdi],r13
+ sbb r10,r10
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
@@ -1718,13 +1998,9 @@
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
+ lea r10,[r9*2+r9]
neg r9
mov r8,QWORD[r8]
@@ -1734,19 +2010,20 @@
- lea r11,[((-64))+r9*2+rsp]
- sub r11,rsi
+
+ lea r11,[((-320))+r9*2+rsp]
+ sub r11,rdi
and r11,4095
cmp r10,r11
jb NEAR $L$from_sp_alt
sub rsp,r11
- lea rsp,[((-64))+r9*2+rsp]
+ lea rsp,[((-320))+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]
+ lea r10,[((4096-320))+r9*2]
+ lea rsp,[((-320))+r9*2+rsp]
sub r11,r10
mov r10,0
cmovc r11,r10
@@ -1797,7 +2074,8 @@
DB 0x67
mov rbp,rcx
DB 102,73,15,110,218
- call sqr8x_reduction
+ call __bn_sqr8x_reduction
+ call __bn_post4x_internal
pxor xmm0,xmm0
lea rax,[48+rsp]
@@ -1847,55 +2125,171 @@
global bn_gather5
-ALIGN 16
+ALIGN 32
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
+DB 0x4c,0x8d,0x14,0x24
+DB 0x48,0x81,0xec,0x08,0x01,0x00,0x00
+ lea rax,[$L$inc]
+ and rsp,-16
+ movd xmm5,r9d
+ movdqa xmm0,XMMWORD[rax]
+ movdqa xmm1,XMMWORD[16+rax]
+ lea r11,[128+r8]
+ lea rax,[128+rsp]
+
+ pshufd xmm5,xmm5,0
+ movdqa xmm4,xmm1
+ movdqa xmm2,xmm1
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa xmm3,xmm4
+
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[(-128)+rax],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[(-112)+rax],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[(-96)+rax],xmm2
+ movdqa xmm2,xmm4
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[(-80)+rax],xmm3
+ movdqa xmm3,xmm4
+
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[(-64)+rax],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[(-48)+rax],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[(-32)+rax],xmm2
+ movdqa xmm2,xmm4
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[(-16)+rax],xmm3
+ movdqa xmm3,xmm4
+
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[rax],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[16+rax],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[32+rax],xmm2
+ movdqa xmm2,xmm4
+ paddd xmm1,xmm0
+ pcmpeqd xmm0,xmm5
+ movdqa XMMWORD[48+rax],xmm3
+ movdqa xmm3,xmm4
+
+ paddd xmm2,xmm1
+ pcmpeqd xmm1,xmm5
+ movdqa XMMWORD[64+rax],xmm0
+ movdqa xmm0,xmm4
+
+ paddd xmm3,xmm2
+ pcmpeqd xmm2,xmm5
+ movdqa XMMWORD[80+rax],xmm1
+ movdqa xmm1,xmm4
+
+ paddd xmm0,xmm3
+ pcmpeqd xmm3,xmm5
+ movdqa XMMWORD[96+rax],xmm2
+ movdqa xmm2,xmm4
+ movdqa XMMWORD[112+rax],xmm3
+ jmp NEAR $L$gather
+
+ALIGN 32
+$L$gather:
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ movdqa xmm0,XMMWORD[((-128))+r11]
+ movdqa xmm1,XMMWORD[((-112))+r11]
+ movdqa xmm2,XMMWORD[((-96))+r11]
+ pand xmm0,XMMWORD[((-128))+rax]
+ movdqa xmm3,XMMWORD[((-80))+r11]
+ pand xmm1,XMMWORD[((-112))+rax]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[((-96))+rax]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[((-80))+rax]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[((-64))+r11]
+ movdqa xmm1,XMMWORD[((-48))+r11]
+ movdqa xmm2,XMMWORD[((-32))+r11]
+ pand xmm0,XMMWORD[((-64))+rax]
+ movdqa xmm3,XMMWORD[((-16))+r11]
+ pand xmm1,XMMWORD[((-48))+rax]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[((-32))+rax]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[((-16))+rax]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[r11]
+ movdqa xmm1,XMMWORD[16+r11]
+ movdqa xmm2,XMMWORD[32+r11]
+ pand xmm0,XMMWORD[rax]
+ movdqa xmm3,XMMWORD[48+r11]
+ pand xmm1,XMMWORD[16+rax]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[32+rax]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[48+rax]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ movdqa xmm0,XMMWORD[64+r11]
+ movdqa xmm1,XMMWORD[80+r11]
+ movdqa xmm2,XMMWORD[96+r11]
+ pand xmm0,XMMWORD[64+rax]
+ movdqa xmm3,XMMWORD[112+r11]
+ pand xmm1,XMMWORD[80+rax]
+ por xmm4,xmm0
+ pand xmm2,XMMWORD[96+rax]
+ por xmm5,xmm1
+ pand xmm3,XMMWORD[112+rax]
+ por xmm4,xmm2
+ por xmm5,xmm3
+ por xmm4,xmm5
+ lea r11,[256+r11]
+ pshufd xmm0,xmm4,0x4e
+ por xmm0,xmm4
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]
+
+ lea rsp,[r10]
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
+$L$inc:
+ DD 0,0,1,1
+ DD 2,2,2,2
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
@@ -1937,19 +2331,16 @@
lea r10,[$L$mul_epilogue]
cmp rbx,r10
- jb NEAR $L$body_40
+ ja 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]
@@ -1962,8 +2353,6 @@
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]
@@ -2049,8 +2438,7 @@
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
+DB 0x01,0x0b,0x03,0x0a
+DB 0x0b,0x01,0x21,0x00
+DB 0x04,0xa3,0x00,0x00
ALIGN 8
diff --git a/third_party/boringssl/win-x86_64/crypto/chacha/chacha-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/chacha/chacha-x86_64.asm
new file mode 100644
index 0000000..afebd2e
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/chacha/chacha-x86_64.asm
@@ -0,0 +1,1689 @@
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+
+EXTERN OPENSSL_ia32cap_P
+
+ALIGN 64
+$L$zero:
+ DD 0,0,0,0
+$L$one:
+ DD 1,0,0,0
+$L$inc:
+ DD 0,1,2,3
+$L$four:
+ DD 4,4,4,4
+$L$incy:
+ DD 0,2,4,6,1,3,5,7
+$L$eight:
+ DD 8,8,8,8,8,8,8,8
+$L$rot16:
+DB 0x2,0x3,0x0,0x1,0x6,0x7,0x4,0x5,0xa,0xb,0x8,0x9,0xe,0xf,0xc,0xd
+$L$rot24:
+DB 0x3,0x0,0x1,0x2,0x7,0x4,0x5,0x6,0xb,0x8,0x9,0xa,0xf,0xc,0xd,0xe
+$L$sigma:
+DB 101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107
+DB 0
+DB 67,104,97,67,104,97,50,48,32,102,111,114,32,120,56,54
+DB 95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32
+DB 98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115
+DB 108,46,111,114,103,62,0
+global ChaCha20_ctr32
+
+ALIGN 64
+ChaCha20_ctr32:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ChaCha20_ctr32:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+
+
+ cmp rdx,0
+ je NEAR $L$no_data
+ mov r10,QWORD[((OPENSSL_ia32cap_P+4))]
+ test r10d,512
+ jnz NEAR $L$ChaCha20_ssse3
+
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ sub rsp,64+24
+
+
+ movdqu xmm1,XMMWORD[rcx]
+ movdqu xmm2,XMMWORD[16+rcx]
+ movdqu xmm3,XMMWORD[r8]
+ movdqa xmm4,XMMWORD[$L$one]
+
+
+ movdqa XMMWORD[16+rsp],xmm1
+ movdqa XMMWORD[32+rsp],xmm2
+ movdqa XMMWORD[48+rsp],xmm3
+ mov rbp,rdx
+ jmp NEAR $L$oop_outer
+
+ALIGN 32
+$L$oop_outer:
+ mov eax,0x61707865
+ mov ebx,0x3320646e
+ mov ecx,0x79622d32
+ mov edx,0x6b206574
+ mov r8d,DWORD[16+rsp]
+ mov r9d,DWORD[20+rsp]
+ mov r10d,DWORD[24+rsp]
+ mov r11d,DWORD[28+rsp]
+ movd r12d,xmm3
+ mov r13d,DWORD[52+rsp]
+ mov r14d,DWORD[56+rsp]
+ mov r15d,DWORD[60+rsp]
+
+ mov QWORD[((64+0))+rsp],rbp
+ mov ebp,10
+ mov QWORD[((64+8))+rsp],rsi
+DB 102,72,15,126,214
+ mov QWORD[((64+16))+rsp],rdi
+ mov rdi,rsi
+ shr rdi,32
+ jmp NEAR $L$oop
+
+ALIGN 32
+$L$oop:
+ add eax,r8d
+ xor r12d,eax
+ rol r12d,16
+ add ebx,r9d
+ xor r13d,ebx
+ rol r13d,16
+ add esi,r12d
+ xor r8d,esi
+ rol r8d,12
+ add edi,r13d
+ xor r9d,edi
+ rol r9d,12
+ add eax,r8d
+ xor r12d,eax
+ rol r12d,8
+ add ebx,r9d
+ xor r13d,ebx
+ rol r13d,8
+ add esi,r12d
+ xor r8d,esi
+ rol r8d,7
+ add edi,r13d
+ xor r9d,edi
+ rol r9d,7
+ mov DWORD[32+rsp],esi
+ mov DWORD[36+rsp],edi
+ mov esi,DWORD[40+rsp]
+ mov edi,DWORD[44+rsp]
+ add ecx,r10d
+ xor r14d,ecx
+ rol r14d,16
+ add edx,r11d
+ xor r15d,edx
+ rol r15d,16
+ add esi,r14d
+ xor r10d,esi
+ rol r10d,12
+ add edi,r15d
+ xor r11d,edi
+ rol r11d,12
+ add ecx,r10d
+ xor r14d,ecx
+ rol r14d,8
+ add edx,r11d
+ xor r15d,edx
+ rol r15d,8
+ add esi,r14d
+ xor r10d,esi
+ rol r10d,7
+ add edi,r15d
+ xor r11d,edi
+ rol r11d,7
+ add eax,r9d
+ xor r15d,eax
+ rol r15d,16
+ add ebx,r10d
+ xor r12d,ebx
+ rol r12d,16
+ add esi,r15d
+ xor r9d,esi
+ rol r9d,12
+ add edi,r12d
+ xor r10d,edi
+ rol r10d,12
+ add eax,r9d
+ xor r15d,eax
+ rol r15d,8
+ add ebx,r10d
+ xor r12d,ebx
+ rol r12d,8
+ add esi,r15d
+ xor r9d,esi
+ rol r9d,7
+ add edi,r12d
+ xor r10d,edi
+ rol r10d,7
+ mov DWORD[40+rsp],esi
+ mov DWORD[44+rsp],edi
+ mov esi,DWORD[32+rsp]
+ mov edi,DWORD[36+rsp]
+ add ecx,r11d
+ xor r13d,ecx
+ rol r13d,16
+ add edx,r8d
+ xor r14d,edx
+ rol r14d,16
+ add esi,r13d
+ xor r11d,esi
+ rol r11d,12
+ add edi,r14d
+ xor r8d,edi
+ rol r8d,12
+ add ecx,r11d
+ xor r13d,ecx
+ rol r13d,8
+ add edx,r8d
+ xor r14d,edx
+ rol r14d,8
+ add esi,r13d
+ xor r11d,esi
+ rol r11d,7
+ add edi,r14d
+ xor r8d,edi
+ rol r8d,7
+ dec ebp
+ jnz NEAR $L$oop
+ mov DWORD[36+rsp],edi
+ mov DWORD[32+rsp],esi
+ mov rbp,QWORD[64+rsp]
+ movdqa xmm1,xmm2
+ mov rsi,QWORD[((64+8))+rsp]
+ paddd xmm3,xmm4
+ mov rdi,QWORD[((64+16))+rsp]
+
+ add eax,0x61707865
+ add ebx,0x3320646e
+ add ecx,0x79622d32
+ add edx,0x6b206574
+ add r8d,DWORD[16+rsp]
+ add r9d,DWORD[20+rsp]
+ add r10d,DWORD[24+rsp]
+ add r11d,DWORD[28+rsp]
+ add r12d,DWORD[48+rsp]
+ add r13d,DWORD[52+rsp]
+ add r14d,DWORD[56+rsp]
+ add r15d,DWORD[60+rsp]
+ paddd xmm1,XMMWORD[32+rsp]
+
+ cmp rbp,64
+ jb NEAR $L$tail
+
+ xor eax,DWORD[rsi]
+ xor ebx,DWORD[4+rsi]
+ xor ecx,DWORD[8+rsi]
+ xor edx,DWORD[12+rsi]
+ xor r8d,DWORD[16+rsi]
+ xor r9d,DWORD[20+rsi]
+ xor r10d,DWORD[24+rsi]
+ xor r11d,DWORD[28+rsi]
+ movdqu xmm0,XMMWORD[32+rsi]
+ xor r12d,DWORD[48+rsi]
+ xor r13d,DWORD[52+rsi]
+ xor r14d,DWORD[56+rsi]
+ xor r15d,DWORD[60+rsi]
+ lea rsi,[64+rsi]
+ pxor xmm0,xmm1
+
+ movdqa XMMWORD[32+rsp],xmm2
+ movd DWORD[48+rsp],xmm3
+
+ 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
+ movdqu XMMWORD[32+rdi],xmm0
+ mov DWORD[48+rdi],r12d
+ mov DWORD[52+rdi],r13d
+ mov DWORD[56+rdi],r14d
+ mov DWORD[60+rdi],r15d
+ lea rdi,[64+rdi]
+
+ sub rbp,64
+ jnz NEAR $L$oop_outer
+
+ jmp NEAR $L$done
+
+ALIGN 16
+$L$tail:
+ mov DWORD[rsp],eax
+ mov DWORD[4+rsp],ebx
+ xor rbx,rbx
+ mov DWORD[8+rsp],ecx
+ mov DWORD[12+rsp],edx
+ mov DWORD[16+rsp],r8d
+ mov DWORD[20+rsp],r9d
+ mov DWORD[24+rsp],r10d
+ mov DWORD[28+rsp],r11d
+ movdqa XMMWORD[32+rsp],xmm1
+ mov DWORD[48+rsp],r12d
+ mov DWORD[52+rsp],r13d
+ mov DWORD[56+rsp],r14d
+ mov DWORD[60+rsp],r15d
+
+$L$oop_tail:
+ movzx eax,BYTE[rbx*1+rsi]
+ movzx edx,BYTE[rbx*1+rsp]
+ lea rbx,[1+rbx]
+ xor eax,edx
+ mov BYTE[((-1))+rbx*1+rdi],al
+ dec rbp
+ jnz NEAR $L$oop_tail
+
+$L$done:
+ add rsp,64+24
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+$L$no_data:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ChaCha20_ctr32:
+
+ALIGN 32
+ChaCha20_ssse3:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ChaCha20_ssse3:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+
+
+$L$ChaCha20_ssse3:
+ cmp rdx,128
+ ja NEAR $L$ChaCha20_4x
+
+$L$do_sse3_after_all:
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+
+ sub rsp,64+72
+ movaps XMMWORD[(64+32)+rsp],xmm6
+ movaps XMMWORD[(64+48)+rsp],xmm7
+ movdqa xmm0,XMMWORD[$L$sigma]
+ movdqu xmm1,XMMWORD[rcx]
+ movdqu xmm2,XMMWORD[16+rcx]
+ movdqu xmm3,XMMWORD[r8]
+ movdqa xmm6,XMMWORD[$L$rot16]
+ movdqa xmm7,XMMWORD[$L$rot24]
+
+ movdqa XMMWORD[rsp],xmm0
+ movdqa XMMWORD[16+rsp],xmm1
+ movdqa XMMWORD[32+rsp],xmm2
+ movdqa XMMWORD[48+rsp],xmm3
+ mov ebp,10
+ jmp NEAR $L$oop_ssse3
+
+ALIGN 32
+$L$oop_outer_ssse3:
+ movdqa xmm3,XMMWORD[$L$one]
+ movdqa xmm0,XMMWORD[rsp]
+ movdqa xmm1,XMMWORD[16+rsp]
+ movdqa xmm2,XMMWORD[32+rsp]
+ paddd xmm3,XMMWORD[48+rsp]
+ mov ebp,10
+ movdqa XMMWORD[48+rsp],xmm3
+ jmp NEAR $L$oop_ssse3
+
+ALIGN 32
+$L$oop_ssse3:
+ paddd xmm0,xmm1
+ pxor xmm3,xmm0
+DB 102,15,56,0,222
+ paddd xmm2,xmm3
+ pxor xmm1,xmm2
+ movdqa xmm4,xmm1
+ psrld xmm1,20
+ pslld xmm4,12
+ por xmm1,xmm4
+ paddd xmm0,xmm1
+ pxor xmm3,xmm0
+DB 102,15,56,0,223
+ paddd xmm2,xmm3
+ pxor xmm1,xmm2
+ movdqa xmm4,xmm1
+ psrld xmm1,25
+ pslld xmm4,7
+ por xmm1,xmm4
+ pshufd xmm2,xmm2,78
+ pshufd xmm1,xmm1,57
+ pshufd xmm3,xmm3,147
+ nop
+ paddd xmm0,xmm1
+ pxor xmm3,xmm0
+DB 102,15,56,0,222
+ paddd xmm2,xmm3
+ pxor xmm1,xmm2
+ movdqa xmm4,xmm1
+ psrld xmm1,20
+ pslld xmm4,12
+ por xmm1,xmm4
+ paddd xmm0,xmm1
+ pxor xmm3,xmm0
+DB 102,15,56,0,223
+ paddd xmm2,xmm3
+ pxor xmm1,xmm2
+ movdqa xmm4,xmm1
+ psrld xmm1,25
+ pslld xmm4,7
+ por xmm1,xmm4
+ pshufd xmm2,xmm2,78
+ pshufd xmm1,xmm1,147
+ pshufd xmm3,xmm3,57
+ dec ebp
+ jnz NEAR $L$oop_ssse3
+ paddd xmm0,XMMWORD[rsp]
+ paddd xmm1,XMMWORD[16+rsp]
+ paddd xmm2,XMMWORD[32+rsp]
+ paddd xmm3,XMMWORD[48+rsp]
+
+ cmp rdx,64
+ jb NEAR $L$tail_ssse3
+
+ movdqu xmm4,XMMWORD[rsi]
+ movdqu xmm5,XMMWORD[16+rsi]
+ pxor xmm0,xmm4
+ movdqu xmm4,XMMWORD[32+rsi]
+ pxor xmm1,xmm5
+ movdqu xmm5,XMMWORD[48+rsi]
+ lea rsi,[64+rsi]
+ pxor xmm2,xmm4
+ pxor xmm3,xmm5
+
+ movdqu XMMWORD[rdi],xmm0
+ movdqu XMMWORD[16+rdi],xmm1
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu XMMWORD[48+rdi],xmm3
+ lea rdi,[64+rdi]
+
+ sub rdx,64
+ jnz NEAR $L$oop_outer_ssse3
+
+ jmp NEAR $L$done_ssse3
+
+ALIGN 16
+$L$tail_ssse3:
+ movdqa XMMWORD[rsp],xmm0
+ movdqa XMMWORD[16+rsp],xmm1
+ movdqa XMMWORD[32+rsp],xmm2
+ movdqa XMMWORD[48+rsp],xmm3
+ xor rbx,rbx
+
+$L$oop_tail_ssse3:
+ movzx eax,BYTE[rbx*1+rsi]
+ movzx ecx,BYTE[rbx*1+rsp]
+ lea rbx,[1+rbx]
+ xor eax,ecx
+ mov BYTE[((-1))+rbx*1+rdi],al
+ dec rdx
+ jnz NEAR $L$oop_tail_ssse3
+
+$L$done_ssse3:
+ movaps xmm6,XMMWORD[((64+32))+rsp]
+ movaps xmm7,XMMWORD[((64+48))+rsp]
+ add rsp,64+72
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ChaCha20_ssse3:
+
+ALIGN 32
+ChaCha20_4x:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ChaCha20_4x:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+
+
+$L$ChaCha20_4x:
+ mov r11,r10
+ shr r10,32
+ test r10,32
+ jnz NEAR $L$ChaCha20_8x
+ cmp rdx,192
+ ja NEAR $L$proceed4x
+
+ and r11,71303168
+ cmp r11,4194304
+ je NEAR $L$do_sse3_after_all
+
+$L$proceed4x:
+ lea r11,[((-120))+rsp]
+ sub rsp,0x148+160
+ movaps XMMWORD[(-48)+r11],xmm6
+ movaps XMMWORD[(-32)+r11],xmm7
+ movaps XMMWORD[(-16)+r11],xmm8
+ movaps XMMWORD[r11],xmm9
+ movaps XMMWORD[16+r11],xmm10
+ movaps XMMWORD[32+r11],xmm11
+ movaps XMMWORD[48+r11],xmm12
+ movaps XMMWORD[64+r11],xmm13
+ movaps XMMWORD[80+r11],xmm14
+ movaps XMMWORD[96+r11],xmm15
+ movdqa xmm11,XMMWORD[$L$sigma]
+ movdqu xmm15,XMMWORD[rcx]
+ movdqu xmm7,XMMWORD[16+rcx]
+ movdqu xmm3,XMMWORD[r8]
+ lea rcx,[256+rsp]
+ lea r10,[$L$rot16]
+ lea r11,[$L$rot24]
+
+ pshufd xmm8,xmm11,0x00
+ pshufd xmm9,xmm11,0x55
+ movdqa XMMWORD[64+rsp],xmm8
+ pshufd xmm10,xmm11,0xaa
+ movdqa XMMWORD[80+rsp],xmm9
+ pshufd xmm11,xmm11,0xff
+ movdqa XMMWORD[96+rsp],xmm10
+ movdqa XMMWORD[112+rsp],xmm11
+
+ pshufd xmm12,xmm15,0x00
+ pshufd xmm13,xmm15,0x55
+ movdqa XMMWORD[(128-256)+rcx],xmm12
+ pshufd xmm14,xmm15,0xaa
+ movdqa XMMWORD[(144-256)+rcx],xmm13
+ pshufd xmm15,xmm15,0xff
+ movdqa XMMWORD[(160-256)+rcx],xmm14
+ movdqa XMMWORD[(176-256)+rcx],xmm15
+
+ pshufd xmm4,xmm7,0x00
+ pshufd xmm5,xmm7,0x55
+ movdqa XMMWORD[(192-256)+rcx],xmm4
+ pshufd xmm6,xmm7,0xaa
+ movdqa XMMWORD[(208-256)+rcx],xmm5
+ pshufd xmm7,xmm7,0xff
+ movdqa XMMWORD[(224-256)+rcx],xmm6
+ movdqa XMMWORD[(240-256)+rcx],xmm7
+
+ pshufd xmm0,xmm3,0x00
+ pshufd xmm1,xmm3,0x55
+ paddd xmm0,XMMWORD[$L$inc]
+ pshufd xmm2,xmm3,0xaa
+ movdqa XMMWORD[(272-256)+rcx],xmm1
+ pshufd xmm3,xmm3,0xff
+ movdqa XMMWORD[(288-256)+rcx],xmm2
+ movdqa XMMWORD[(304-256)+rcx],xmm3
+
+ jmp NEAR $L$oop_enter4x
+
+ALIGN 32
+$L$oop_outer4x:
+ movdqa xmm8,XMMWORD[64+rsp]
+ movdqa xmm9,XMMWORD[80+rsp]
+ movdqa xmm10,XMMWORD[96+rsp]
+ movdqa xmm11,XMMWORD[112+rsp]
+ movdqa xmm12,XMMWORD[((128-256))+rcx]
+ movdqa xmm13,XMMWORD[((144-256))+rcx]
+ movdqa xmm14,XMMWORD[((160-256))+rcx]
+ movdqa xmm15,XMMWORD[((176-256))+rcx]
+ movdqa xmm4,XMMWORD[((192-256))+rcx]
+ movdqa xmm5,XMMWORD[((208-256))+rcx]
+ movdqa xmm6,XMMWORD[((224-256))+rcx]
+ movdqa xmm7,XMMWORD[((240-256))+rcx]
+ movdqa xmm0,XMMWORD[((256-256))+rcx]
+ movdqa xmm1,XMMWORD[((272-256))+rcx]
+ movdqa xmm2,XMMWORD[((288-256))+rcx]
+ movdqa xmm3,XMMWORD[((304-256))+rcx]
+ paddd xmm0,XMMWORD[$L$four]
+
+$L$oop_enter4x:
+ movdqa XMMWORD[32+rsp],xmm6
+ movdqa XMMWORD[48+rsp],xmm7
+ movdqa xmm7,XMMWORD[r10]
+ mov eax,10
+ movdqa XMMWORD[(256-256)+rcx],xmm0
+ jmp NEAR $L$oop4x
+
+ALIGN 32
+$L$oop4x:
+ paddd xmm8,xmm12
+ paddd xmm9,xmm13
+ pxor xmm0,xmm8
+ pxor xmm1,xmm9
+DB 102,15,56,0,199
+DB 102,15,56,0,207
+ paddd xmm4,xmm0
+ paddd xmm5,xmm1
+ pxor xmm12,xmm4
+ pxor xmm13,xmm5
+ movdqa xmm6,xmm12
+ pslld xmm12,12
+ psrld xmm6,20
+ movdqa xmm7,xmm13
+ pslld xmm13,12
+ por xmm12,xmm6
+ psrld xmm7,20
+ movdqa xmm6,XMMWORD[r11]
+ por xmm13,xmm7
+ paddd xmm8,xmm12
+ paddd xmm9,xmm13
+ pxor xmm0,xmm8
+ pxor xmm1,xmm9
+DB 102,15,56,0,198
+DB 102,15,56,0,206
+ paddd xmm4,xmm0
+ paddd xmm5,xmm1
+ pxor xmm12,xmm4
+ pxor xmm13,xmm5
+ movdqa xmm7,xmm12
+ pslld xmm12,7
+ psrld xmm7,25
+ movdqa xmm6,xmm13
+ pslld xmm13,7
+ por xmm12,xmm7
+ psrld xmm6,25
+ movdqa xmm7,XMMWORD[r10]
+ por xmm13,xmm6
+ movdqa XMMWORD[rsp],xmm4
+ movdqa XMMWORD[16+rsp],xmm5
+ movdqa xmm4,XMMWORD[32+rsp]
+ movdqa xmm5,XMMWORD[48+rsp]
+ paddd xmm10,xmm14
+ paddd xmm11,xmm15
+ pxor xmm2,xmm10
+ pxor xmm3,xmm11
+DB 102,15,56,0,215
+DB 102,15,56,0,223
+ paddd xmm4,xmm2
+ paddd xmm5,xmm3
+ pxor xmm14,xmm4
+ pxor xmm15,xmm5
+ movdqa xmm6,xmm14
+ pslld xmm14,12
+ psrld xmm6,20
+ movdqa xmm7,xmm15
+ pslld xmm15,12
+ por xmm14,xmm6
+ psrld xmm7,20
+ movdqa xmm6,XMMWORD[r11]
+ por xmm15,xmm7
+ paddd xmm10,xmm14
+ paddd xmm11,xmm15
+ pxor xmm2,xmm10
+ pxor xmm3,xmm11
+DB 102,15,56,0,214
+DB 102,15,56,0,222
+ paddd xmm4,xmm2
+ paddd xmm5,xmm3
+ pxor xmm14,xmm4
+ pxor xmm15,xmm5
+ movdqa xmm7,xmm14
+ pslld xmm14,7
+ psrld xmm7,25
+ movdqa xmm6,xmm15
+ pslld xmm15,7
+ por xmm14,xmm7
+ psrld xmm6,25
+ movdqa xmm7,XMMWORD[r10]
+ por xmm15,xmm6
+ paddd xmm8,xmm13
+ paddd xmm9,xmm14
+ pxor xmm3,xmm8
+ pxor xmm0,xmm9
+DB 102,15,56,0,223
+DB 102,15,56,0,199
+ paddd xmm4,xmm3
+ paddd xmm5,xmm0
+ pxor xmm13,xmm4
+ pxor xmm14,xmm5
+ movdqa xmm6,xmm13
+ pslld xmm13,12
+ psrld xmm6,20
+ movdqa xmm7,xmm14
+ pslld xmm14,12
+ por xmm13,xmm6
+ psrld xmm7,20
+ movdqa xmm6,XMMWORD[r11]
+ por xmm14,xmm7
+ paddd xmm8,xmm13
+ paddd xmm9,xmm14
+ pxor xmm3,xmm8
+ pxor xmm0,xmm9
+DB 102,15,56,0,222
+DB 102,15,56,0,198
+ paddd xmm4,xmm3
+ paddd xmm5,xmm0
+ pxor xmm13,xmm4
+ pxor xmm14,xmm5
+ movdqa xmm7,xmm13
+ pslld xmm13,7
+ psrld xmm7,25
+ movdqa xmm6,xmm14
+ pslld xmm14,7
+ por xmm13,xmm7
+ psrld xmm6,25
+ movdqa xmm7,XMMWORD[r10]
+ por xmm14,xmm6
+ movdqa XMMWORD[32+rsp],xmm4
+ movdqa XMMWORD[48+rsp],xmm5
+ movdqa xmm4,XMMWORD[rsp]
+ movdqa xmm5,XMMWORD[16+rsp]
+ paddd xmm10,xmm15
+ paddd xmm11,xmm12
+ pxor xmm1,xmm10
+ pxor xmm2,xmm11
+DB 102,15,56,0,207
+DB 102,15,56,0,215
+ paddd xmm4,xmm1
+ paddd xmm5,xmm2
+ pxor xmm15,xmm4
+ pxor xmm12,xmm5
+ movdqa xmm6,xmm15
+ pslld xmm15,12
+ psrld xmm6,20
+ movdqa xmm7,xmm12
+ pslld xmm12,12
+ por xmm15,xmm6
+ psrld xmm7,20
+ movdqa xmm6,XMMWORD[r11]
+ por xmm12,xmm7
+ paddd xmm10,xmm15
+ paddd xmm11,xmm12
+ pxor xmm1,xmm10
+ pxor xmm2,xmm11
+DB 102,15,56,0,206
+DB 102,15,56,0,214
+ paddd xmm4,xmm1
+ paddd xmm5,xmm2
+ pxor xmm15,xmm4
+ pxor xmm12,xmm5
+ movdqa xmm7,xmm15
+ pslld xmm15,7
+ psrld xmm7,25
+ movdqa xmm6,xmm12
+ pslld xmm12,7
+ por xmm15,xmm7
+ psrld xmm6,25
+ movdqa xmm7,XMMWORD[r10]
+ por xmm12,xmm6
+ dec eax
+ jnz NEAR $L$oop4x
+
+ paddd xmm8,XMMWORD[64+rsp]
+ paddd xmm9,XMMWORD[80+rsp]
+ paddd xmm10,XMMWORD[96+rsp]
+ paddd xmm11,XMMWORD[112+rsp]
+
+ movdqa xmm6,xmm8
+ punpckldq xmm8,xmm9
+ movdqa xmm7,xmm10
+ punpckldq xmm10,xmm11
+ punpckhdq xmm6,xmm9
+ punpckhdq xmm7,xmm11
+ movdqa xmm9,xmm8
+ punpcklqdq xmm8,xmm10
+ movdqa xmm11,xmm6
+ punpcklqdq xmm6,xmm7
+ punpckhqdq xmm9,xmm10
+ punpckhqdq xmm11,xmm7
+ paddd xmm12,XMMWORD[((128-256))+rcx]
+ paddd xmm13,XMMWORD[((144-256))+rcx]
+ paddd xmm14,XMMWORD[((160-256))+rcx]
+ paddd xmm15,XMMWORD[((176-256))+rcx]
+
+ movdqa XMMWORD[rsp],xmm8
+ movdqa XMMWORD[16+rsp],xmm9
+ movdqa xmm8,XMMWORD[32+rsp]
+ movdqa xmm9,XMMWORD[48+rsp]
+
+ movdqa xmm10,xmm12
+ punpckldq xmm12,xmm13
+ movdqa xmm7,xmm14
+ punpckldq xmm14,xmm15
+ punpckhdq xmm10,xmm13
+ punpckhdq xmm7,xmm15
+ movdqa xmm13,xmm12
+ punpcklqdq xmm12,xmm14
+ movdqa xmm15,xmm10
+ punpcklqdq xmm10,xmm7
+ punpckhqdq xmm13,xmm14
+ punpckhqdq xmm15,xmm7
+ paddd xmm4,XMMWORD[((192-256))+rcx]
+ paddd xmm5,XMMWORD[((208-256))+rcx]
+ paddd xmm8,XMMWORD[((224-256))+rcx]
+ paddd xmm9,XMMWORD[((240-256))+rcx]
+
+ movdqa XMMWORD[32+rsp],xmm6
+ movdqa XMMWORD[48+rsp],xmm11
+
+ movdqa xmm14,xmm4
+ punpckldq xmm4,xmm5
+ movdqa xmm7,xmm8
+ punpckldq xmm8,xmm9
+ punpckhdq xmm14,xmm5
+ punpckhdq xmm7,xmm9
+ movdqa xmm5,xmm4
+ punpcklqdq xmm4,xmm8
+ movdqa xmm9,xmm14
+ punpcklqdq xmm14,xmm7
+ punpckhqdq xmm5,xmm8
+ punpckhqdq xmm9,xmm7
+ paddd xmm0,XMMWORD[((256-256))+rcx]
+ paddd xmm1,XMMWORD[((272-256))+rcx]
+ paddd xmm2,XMMWORD[((288-256))+rcx]
+ paddd xmm3,XMMWORD[((304-256))+rcx]
+
+ movdqa xmm8,xmm0
+ punpckldq xmm0,xmm1
+ movdqa xmm7,xmm2
+ punpckldq xmm2,xmm3
+ punpckhdq xmm8,xmm1
+ punpckhdq xmm7,xmm3
+ movdqa xmm1,xmm0
+ punpcklqdq xmm0,xmm2
+ movdqa xmm3,xmm8
+ punpcklqdq xmm8,xmm7
+ punpckhqdq xmm1,xmm2
+ punpckhqdq xmm3,xmm7
+ cmp rdx,64*4
+ jb NEAR $L$tail4x
+
+ movdqu xmm6,XMMWORD[rsi]
+ movdqu xmm11,XMMWORD[16+rsi]
+ movdqu xmm2,XMMWORD[32+rsi]
+ movdqu xmm7,XMMWORD[48+rsi]
+ pxor xmm6,XMMWORD[rsp]
+ pxor xmm11,xmm12
+ pxor xmm2,xmm4
+ pxor xmm7,xmm0
+
+ movdqu XMMWORD[rdi],xmm6
+ movdqu xmm6,XMMWORD[64+rsi]
+ movdqu XMMWORD[16+rdi],xmm11
+ movdqu xmm11,XMMWORD[80+rsi]
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu xmm2,XMMWORD[96+rsi]
+ movdqu XMMWORD[48+rdi],xmm7
+ movdqu xmm7,XMMWORD[112+rsi]
+ lea rsi,[128+rsi]
+ pxor xmm6,XMMWORD[16+rsp]
+ pxor xmm11,xmm13
+ pxor xmm2,xmm5
+ pxor xmm7,xmm1
+
+ movdqu XMMWORD[64+rdi],xmm6
+ movdqu xmm6,XMMWORD[rsi]
+ movdqu XMMWORD[80+rdi],xmm11
+ movdqu xmm11,XMMWORD[16+rsi]
+ movdqu XMMWORD[96+rdi],xmm2
+ movdqu xmm2,XMMWORD[32+rsi]
+ movdqu XMMWORD[112+rdi],xmm7
+ lea rdi,[128+rdi]
+ movdqu xmm7,XMMWORD[48+rsi]
+ pxor xmm6,XMMWORD[32+rsp]
+ pxor xmm11,xmm10
+ pxor xmm2,xmm14
+ pxor xmm7,xmm8
+
+ movdqu XMMWORD[rdi],xmm6
+ movdqu xmm6,XMMWORD[64+rsi]
+ movdqu XMMWORD[16+rdi],xmm11
+ movdqu xmm11,XMMWORD[80+rsi]
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu xmm2,XMMWORD[96+rsi]
+ movdqu XMMWORD[48+rdi],xmm7
+ movdqu xmm7,XMMWORD[112+rsi]
+ lea rsi,[128+rsi]
+ pxor xmm6,XMMWORD[48+rsp]
+ pxor xmm11,xmm15
+ pxor xmm2,xmm9
+ pxor xmm7,xmm3
+ movdqu XMMWORD[64+rdi],xmm6
+ movdqu XMMWORD[80+rdi],xmm11
+ movdqu XMMWORD[96+rdi],xmm2
+ movdqu XMMWORD[112+rdi],xmm7
+ lea rdi,[128+rdi]
+
+ sub rdx,64*4
+ jnz NEAR $L$oop_outer4x
+
+ jmp NEAR $L$done4x
+
+$L$tail4x:
+ cmp rdx,192
+ jae NEAR $L$192_or_more4x
+ cmp rdx,128
+ jae NEAR $L$128_or_more4x
+ cmp rdx,64
+ jae NEAR $L$64_or_more4x
+
+
+ xor r10,r10
+
+ movdqa XMMWORD[16+rsp],xmm12
+ movdqa XMMWORD[32+rsp],xmm4
+ movdqa XMMWORD[48+rsp],xmm0
+ jmp NEAR $L$oop_tail4x
+
+ALIGN 32
+$L$64_or_more4x:
+ movdqu xmm6,XMMWORD[rsi]
+ movdqu xmm11,XMMWORD[16+rsi]
+ movdqu xmm2,XMMWORD[32+rsi]
+ movdqu xmm7,XMMWORD[48+rsi]
+ pxor xmm6,XMMWORD[rsp]
+ pxor xmm11,xmm12
+ pxor xmm2,xmm4
+ pxor xmm7,xmm0
+ movdqu XMMWORD[rdi],xmm6
+ movdqu XMMWORD[16+rdi],xmm11
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu XMMWORD[48+rdi],xmm7
+ je NEAR $L$done4x
+
+ movdqa xmm6,XMMWORD[16+rsp]
+ lea rsi,[64+rsi]
+ xor r10,r10
+ movdqa XMMWORD[rsp],xmm6
+ movdqa XMMWORD[16+rsp],xmm13
+ lea rdi,[64+rdi]
+ movdqa XMMWORD[32+rsp],xmm5
+ sub rdx,64
+ movdqa XMMWORD[48+rsp],xmm1
+ jmp NEAR $L$oop_tail4x
+
+ALIGN 32
+$L$128_or_more4x:
+ movdqu xmm6,XMMWORD[rsi]
+ movdqu xmm11,XMMWORD[16+rsi]
+ movdqu xmm2,XMMWORD[32+rsi]
+ movdqu xmm7,XMMWORD[48+rsi]
+ pxor xmm6,XMMWORD[rsp]
+ pxor xmm11,xmm12
+ pxor xmm2,xmm4
+ pxor xmm7,xmm0
+
+ movdqu XMMWORD[rdi],xmm6
+ movdqu xmm6,XMMWORD[64+rsi]
+ movdqu XMMWORD[16+rdi],xmm11
+ movdqu xmm11,XMMWORD[80+rsi]
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu xmm2,XMMWORD[96+rsi]
+ movdqu XMMWORD[48+rdi],xmm7
+ movdqu xmm7,XMMWORD[112+rsi]
+ pxor xmm6,XMMWORD[16+rsp]
+ pxor xmm11,xmm13
+ pxor xmm2,xmm5
+ pxor xmm7,xmm1
+ movdqu XMMWORD[64+rdi],xmm6
+ movdqu XMMWORD[80+rdi],xmm11
+ movdqu XMMWORD[96+rdi],xmm2
+ movdqu XMMWORD[112+rdi],xmm7
+ je NEAR $L$done4x
+
+ movdqa xmm6,XMMWORD[32+rsp]
+ lea rsi,[128+rsi]
+ xor r10,r10
+ movdqa XMMWORD[rsp],xmm6
+ movdqa XMMWORD[16+rsp],xmm10
+ lea rdi,[128+rdi]
+ movdqa XMMWORD[32+rsp],xmm14
+ sub rdx,128
+ movdqa XMMWORD[48+rsp],xmm8
+ jmp NEAR $L$oop_tail4x
+
+ALIGN 32
+$L$192_or_more4x:
+ movdqu xmm6,XMMWORD[rsi]
+ movdqu xmm11,XMMWORD[16+rsi]
+ movdqu xmm2,XMMWORD[32+rsi]
+ movdqu xmm7,XMMWORD[48+rsi]
+ pxor xmm6,XMMWORD[rsp]
+ pxor xmm11,xmm12
+ pxor xmm2,xmm4
+ pxor xmm7,xmm0
+
+ movdqu XMMWORD[rdi],xmm6
+ movdqu xmm6,XMMWORD[64+rsi]
+ movdqu XMMWORD[16+rdi],xmm11
+ movdqu xmm11,XMMWORD[80+rsi]
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu xmm2,XMMWORD[96+rsi]
+ movdqu XMMWORD[48+rdi],xmm7
+ movdqu xmm7,XMMWORD[112+rsi]
+ lea rsi,[128+rsi]
+ pxor xmm6,XMMWORD[16+rsp]
+ pxor xmm11,xmm13
+ pxor xmm2,xmm5
+ pxor xmm7,xmm1
+
+ movdqu XMMWORD[64+rdi],xmm6
+ movdqu xmm6,XMMWORD[rsi]
+ movdqu XMMWORD[80+rdi],xmm11
+ movdqu xmm11,XMMWORD[16+rsi]
+ movdqu XMMWORD[96+rdi],xmm2
+ movdqu xmm2,XMMWORD[32+rsi]
+ movdqu XMMWORD[112+rdi],xmm7
+ lea rdi,[128+rdi]
+ movdqu xmm7,XMMWORD[48+rsi]
+ pxor xmm6,XMMWORD[32+rsp]
+ pxor xmm11,xmm10
+ pxor xmm2,xmm14
+ pxor xmm7,xmm8
+ movdqu XMMWORD[rdi],xmm6
+ movdqu XMMWORD[16+rdi],xmm11
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu XMMWORD[48+rdi],xmm7
+ je NEAR $L$done4x
+
+ movdqa xmm6,XMMWORD[48+rsp]
+ lea rsi,[64+rsi]
+ xor r10,r10
+ movdqa XMMWORD[rsp],xmm6
+ movdqa XMMWORD[16+rsp],xmm15
+ lea rdi,[64+rdi]
+ movdqa XMMWORD[32+rsp],xmm9
+ sub rdx,192
+ movdqa XMMWORD[48+rsp],xmm3
+
+$L$oop_tail4x:
+ movzx eax,BYTE[r10*1+rsi]
+ movzx ecx,BYTE[r10*1+rsp]
+ lea r10,[1+r10]
+ xor eax,ecx
+ mov BYTE[((-1))+r10*1+rdi],al
+ dec rdx
+ jnz NEAR $L$oop_tail4x
+
+$L$done4x:
+ lea r11,[((320+48))+rsp]
+ movaps xmm6,XMMWORD[((-48))+r11]
+ movaps xmm7,XMMWORD[((-32))+r11]
+ movaps xmm8,XMMWORD[((-16))+r11]
+ movaps xmm9,XMMWORD[r11]
+ movaps xmm10,XMMWORD[16+r11]
+ movaps xmm11,XMMWORD[32+r11]
+ movaps xmm12,XMMWORD[48+r11]
+ movaps xmm13,XMMWORD[64+r11]
+ movaps xmm14,XMMWORD[80+r11]
+ movaps xmm15,XMMWORD[96+r11]
+ add rsp,0x148+160
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ChaCha20_4x:
+
+ALIGN 32
+ChaCha20_8x:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ChaCha20_8x:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD[40+rsp]
+
+
+$L$ChaCha20_8x:
+ mov r10,rsp
+ sub rsp,0x280+176
+ and rsp,-32
+ lea r11,[((656+48))+rsp]
+ movaps XMMWORD[(-48)+r11],xmm6
+ movaps XMMWORD[(-32)+r11],xmm7
+ movaps XMMWORD[(-16)+r11],xmm8
+ movaps XMMWORD[r11],xmm9
+ movaps XMMWORD[16+r11],xmm10
+ movaps XMMWORD[32+r11],xmm11
+ movaps XMMWORD[48+r11],xmm12
+ movaps XMMWORD[64+r11],xmm13
+ movaps XMMWORD[80+r11],xmm14
+ movaps XMMWORD[96+r11],xmm15
+ vzeroupper
+ mov QWORD[640+rsp],r10
+
+
+
+
+
+
+
+
+
+
+ vbroadcasti128 ymm11,XMMWORD[$L$sigma]
+ vbroadcasti128 ymm3,XMMWORD[rcx]
+ vbroadcasti128 ymm15,XMMWORD[16+rcx]
+ vbroadcasti128 ymm7,XMMWORD[r8]
+ lea rcx,[256+rsp]
+ lea rax,[512+rsp]
+ lea r10,[$L$rot16]
+ lea r11,[$L$rot24]
+
+ vpshufd ymm8,ymm11,0x00
+ vpshufd ymm9,ymm11,0x55
+ vmovdqa YMMWORD[(128-256)+rcx],ymm8
+ vpshufd ymm10,ymm11,0xaa
+ vmovdqa YMMWORD[(160-256)+rcx],ymm9
+ vpshufd ymm11,ymm11,0xff
+ vmovdqa YMMWORD[(192-256)+rcx],ymm10
+ vmovdqa YMMWORD[(224-256)+rcx],ymm11
+
+ vpshufd ymm0,ymm3,0x00
+ vpshufd ymm1,ymm3,0x55
+ vmovdqa YMMWORD[(256-256)+rcx],ymm0
+ vpshufd ymm2,ymm3,0xaa
+ vmovdqa YMMWORD[(288-256)+rcx],ymm1
+ vpshufd ymm3,ymm3,0xff
+ vmovdqa YMMWORD[(320-256)+rcx],ymm2
+ vmovdqa YMMWORD[(352-256)+rcx],ymm3
+
+ vpshufd ymm12,ymm15,0x00
+ vpshufd ymm13,ymm15,0x55
+ vmovdqa YMMWORD[(384-512)+rax],ymm12
+ vpshufd ymm14,ymm15,0xaa
+ vmovdqa YMMWORD[(416-512)+rax],ymm13
+ vpshufd ymm15,ymm15,0xff
+ vmovdqa YMMWORD[(448-512)+rax],ymm14
+ vmovdqa YMMWORD[(480-512)+rax],ymm15
+
+ vpshufd ymm4,ymm7,0x00
+ vpshufd ymm5,ymm7,0x55
+ vpaddd ymm4,ymm4,YMMWORD[$L$incy]
+ vpshufd ymm6,ymm7,0xaa
+ vmovdqa YMMWORD[(544-512)+rax],ymm5
+ vpshufd ymm7,ymm7,0xff
+ vmovdqa YMMWORD[(576-512)+rax],ymm6
+ vmovdqa YMMWORD[(608-512)+rax],ymm7
+
+ jmp NEAR $L$oop_enter8x
+
+ALIGN 32
+$L$oop_outer8x:
+ vmovdqa ymm8,YMMWORD[((128-256))+rcx]
+ vmovdqa ymm9,YMMWORD[((160-256))+rcx]
+ vmovdqa ymm10,YMMWORD[((192-256))+rcx]
+ vmovdqa ymm11,YMMWORD[((224-256))+rcx]
+ vmovdqa ymm0,YMMWORD[((256-256))+rcx]
+ vmovdqa ymm1,YMMWORD[((288-256))+rcx]
+ vmovdqa ymm2,YMMWORD[((320-256))+rcx]
+ vmovdqa ymm3,YMMWORD[((352-256))+rcx]
+ vmovdqa ymm12,YMMWORD[((384-512))+rax]
+ vmovdqa ymm13,YMMWORD[((416-512))+rax]
+ vmovdqa ymm14,YMMWORD[((448-512))+rax]
+ vmovdqa ymm15,YMMWORD[((480-512))+rax]
+ vmovdqa ymm4,YMMWORD[((512-512))+rax]
+ vmovdqa ymm5,YMMWORD[((544-512))+rax]
+ vmovdqa ymm6,YMMWORD[((576-512))+rax]
+ vmovdqa ymm7,YMMWORD[((608-512))+rax]
+ vpaddd ymm4,ymm4,YMMWORD[$L$eight]
+
+$L$oop_enter8x:
+ vmovdqa YMMWORD[64+rsp],ymm14
+ vmovdqa YMMWORD[96+rsp],ymm15
+ vbroadcasti128 ymm15,XMMWORD[r10]
+ vmovdqa YMMWORD[(512-512)+rax],ymm4
+ mov eax,10
+ jmp NEAR $L$oop8x
+
+ALIGN 32
+$L$oop8x:
+ vpaddd ymm8,ymm8,ymm0
+ vpxor ymm4,ymm8,ymm4
+ vpshufb ymm4,ymm4,ymm15
+ vpaddd ymm9,ymm9,ymm1
+ vpxor ymm5,ymm9,ymm5
+ vpshufb ymm5,ymm5,ymm15
+ vpaddd ymm12,ymm12,ymm4
+ vpxor ymm0,ymm12,ymm0
+ vpslld ymm14,ymm0,12
+ vpsrld ymm0,ymm0,20
+ vpor ymm0,ymm14,ymm0
+ vbroadcasti128 ymm14,XMMWORD[r11]
+ vpaddd ymm13,ymm13,ymm5
+ vpxor ymm1,ymm13,ymm1
+ vpslld ymm15,ymm1,12
+ vpsrld ymm1,ymm1,20
+ vpor ymm1,ymm15,ymm1
+ vpaddd ymm8,ymm8,ymm0
+ vpxor ymm4,ymm8,ymm4
+ vpshufb ymm4,ymm4,ymm14
+ vpaddd ymm9,ymm9,ymm1
+ vpxor ymm5,ymm9,ymm5
+ vpshufb ymm5,ymm5,ymm14
+ vpaddd ymm12,ymm12,ymm4
+ vpxor ymm0,ymm12,ymm0
+ vpslld ymm15,ymm0,7
+ vpsrld ymm0,ymm0,25
+ vpor ymm0,ymm15,ymm0
+ vbroadcasti128 ymm15,XMMWORD[r10]
+ vpaddd ymm13,ymm13,ymm5
+ vpxor ymm1,ymm13,ymm1
+ vpslld ymm14,ymm1,7
+ vpsrld ymm1,ymm1,25
+ vpor ymm1,ymm14,ymm1
+ vmovdqa YMMWORD[rsp],ymm12
+ vmovdqa YMMWORD[32+rsp],ymm13
+ vmovdqa ymm12,YMMWORD[64+rsp]
+ vmovdqa ymm13,YMMWORD[96+rsp]
+ vpaddd ymm10,ymm10,ymm2
+ vpxor ymm6,ymm10,ymm6
+ vpshufb ymm6,ymm6,ymm15
+ vpaddd ymm11,ymm11,ymm3
+ vpxor ymm7,ymm11,ymm7
+ vpshufb ymm7,ymm7,ymm15
+ vpaddd ymm12,ymm12,ymm6
+ vpxor ymm2,ymm12,ymm2
+ vpslld ymm14,ymm2,12
+ vpsrld ymm2,ymm2,20
+ vpor ymm2,ymm14,ymm2
+ vbroadcasti128 ymm14,XMMWORD[r11]
+ vpaddd ymm13,ymm13,ymm7
+ vpxor ymm3,ymm13,ymm3
+ vpslld ymm15,ymm3,12
+ vpsrld ymm3,ymm3,20
+ vpor ymm3,ymm15,ymm3
+ vpaddd ymm10,ymm10,ymm2
+ vpxor ymm6,ymm10,ymm6
+ vpshufb ymm6,ymm6,ymm14
+ vpaddd ymm11,ymm11,ymm3
+ vpxor ymm7,ymm11,ymm7
+ vpshufb ymm7,ymm7,ymm14
+ vpaddd ymm12,ymm12,ymm6
+ vpxor ymm2,ymm12,ymm2
+ vpslld ymm15,ymm2,7
+ vpsrld ymm2,ymm2,25
+ vpor ymm2,ymm15,ymm2
+ vbroadcasti128 ymm15,XMMWORD[r10]
+ vpaddd ymm13,ymm13,ymm7
+ vpxor ymm3,ymm13,ymm3
+ vpslld ymm14,ymm3,7
+ vpsrld ymm3,ymm3,25
+ vpor ymm3,ymm14,ymm3
+ vpaddd ymm8,ymm8,ymm1
+ vpxor ymm7,ymm8,ymm7
+ vpshufb ymm7,ymm7,ymm15
+ vpaddd ymm9,ymm9,ymm2
+ vpxor ymm4,ymm9,ymm4
+ vpshufb ymm4,ymm4,ymm15
+ vpaddd ymm12,ymm12,ymm7
+ vpxor ymm1,ymm12,ymm1
+ vpslld ymm14,ymm1,12
+ vpsrld ymm1,ymm1,20
+ vpor ymm1,ymm14,ymm1
+ vbroadcasti128 ymm14,XMMWORD[r11]
+ vpaddd ymm13,ymm13,ymm4
+ vpxor ymm2,ymm13,ymm2
+ vpslld ymm15,ymm2,12
+ vpsrld ymm2,ymm2,20
+ vpor ymm2,ymm15,ymm2
+ vpaddd ymm8,ymm8,ymm1
+ vpxor ymm7,ymm8,ymm7
+ vpshufb ymm7,ymm7,ymm14
+ vpaddd ymm9,ymm9,ymm2
+ vpxor ymm4,ymm9,ymm4
+ vpshufb ymm4,ymm4,ymm14
+ vpaddd ymm12,ymm12,ymm7
+ vpxor ymm1,ymm12,ymm1
+ vpslld ymm15,ymm1,7
+ vpsrld ymm1,ymm1,25
+ vpor ymm1,ymm15,ymm1
+ vbroadcasti128 ymm15,XMMWORD[r10]
+ vpaddd ymm13,ymm13,ymm4
+ vpxor ymm2,ymm13,ymm2
+ vpslld ymm14,ymm2,7
+ vpsrld ymm2,ymm2,25
+ vpor ymm2,ymm14,ymm2
+ vmovdqa YMMWORD[64+rsp],ymm12
+ vmovdqa YMMWORD[96+rsp],ymm13
+ vmovdqa ymm12,YMMWORD[rsp]
+ vmovdqa ymm13,YMMWORD[32+rsp]
+ vpaddd ymm10,ymm10,ymm3
+ vpxor ymm5,ymm10,ymm5
+ vpshufb ymm5,ymm5,ymm15
+ vpaddd ymm11,ymm11,ymm0
+ vpxor ymm6,ymm11,ymm6
+ vpshufb ymm6,ymm6,ymm15
+ vpaddd ymm12,ymm12,ymm5
+ vpxor ymm3,ymm12,ymm3
+ vpslld ymm14,ymm3,12
+ vpsrld ymm3,ymm3,20
+ vpor ymm3,ymm14,ymm3
+ vbroadcasti128 ymm14,XMMWORD[r11]
+ vpaddd ymm13,ymm13,ymm6
+ vpxor ymm0,ymm13,ymm0
+ vpslld ymm15,ymm0,12
+ vpsrld ymm0,ymm0,20
+ vpor ymm0,ymm15,ymm0
+ vpaddd ymm10,ymm10,ymm3
+ vpxor ymm5,ymm10,ymm5
+ vpshufb ymm5,ymm5,ymm14
+ vpaddd ymm11,ymm11,ymm0
+ vpxor ymm6,ymm11,ymm6
+ vpshufb ymm6,ymm6,ymm14
+ vpaddd ymm12,ymm12,ymm5
+ vpxor ymm3,ymm12,ymm3
+ vpslld ymm15,ymm3,7
+ vpsrld ymm3,ymm3,25
+ vpor ymm3,ymm15,ymm3
+ vbroadcasti128 ymm15,XMMWORD[r10]
+ vpaddd ymm13,ymm13,ymm6
+ vpxor ymm0,ymm13,ymm0
+ vpslld ymm14,ymm0,7
+ vpsrld ymm0,ymm0,25
+ vpor ymm0,ymm14,ymm0
+ dec eax
+ jnz NEAR $L$oop8x
+
+ lea rax,[512+rsp]
+ vpaddd ymm8,ymm8,YMMWORD[((128-256))+rcx]
+ vpaddd ymm9,ymm9,YMMWORD[((160-256))+rcx]
+ vpaddd ymm10,ymm10,YMMWORD[((192-256))+rcx]
+ vpaddd ymm11,ymm11,YMMWORD[((224-256))+rcx]
+
+ vpunpckldq ymm14,ymm8,ymm9
+ vpunpckldq ymm15,ymm10,ymm11
+ vpunpckhdq ymm8,ymm8,ymm9
+ vpunpckhdq ymm10,ymm10,ymm11
+ vpunpcklqdq ymm9,ymm14,ymm15
+ vpunpckhqdq ymm14,ymm14,ymm15
+ vpunpcklqdq ymm11,ymm8,ymm10
+ vpunpckhqdq ymm8,ymm8,ymm10
+ vpaddd ymm0,ymm0,YMMWORD[((256-256))+rcx]
+ vpaddd ymm1,ymm1,YMMWORD[((288-256))+rcx]
+ vpaddd ymm2,ymm2,YMMWORD[((320-256))+rcx]
+ vpaddd ymm3,ymm3,YMMWORD[((352-256))+rcx]
+
+ vpunpckldq ymm10,ymm0,ymm1
+ vpunpckldq ymm15,ymm2,ymm3
+ vpunpckhdq ymm0,ymm0,ymm1
+ vpunpckhdq ymm2,ymm2,ymm3
+ vpunpcklqdq ymm1,ymm10,ymm15
+ vpunpckhqdq ymm10,ymm10,ymm15
+ vpunpcklqdq ymm3,ymm0,ymm2
+ vpunpckhqdq ymm0,ymm0,ymm2
+ vperm2i128 ymm15,ymm9,ymm1,0x20
+ vperm2i128 ymm1,ymm9,ymm1,0x31
+ vperm2i128 ymm9,ymm14,ymm10,0x20
+ vperm2i128 ymm10,ymm14,ymm10,0x31
+ vperm2i128 ymm14,ymm11,ymm3,0x20
+ vperm2i128 ymm3,ymm11,ymm3,0x31
+ vperm2i128 ymm11,ymm8,ymm0,0x20
+ vperm2i128 ymm0,ymm8,ymm0,0x31
+ vmovdqa YMMWORD[rsp],ymm15
+ vmovdqa YMMWORD[32+rsp],ymm9
+ vmovdqa ymm15,YMMWORD[64+rsp]
+ vmovdqa ymm9,YMMWORD[96+rsp]
+
+ vpaddd ymm12,ymm12,YMMWORD[((384-512))+rax]
+ vpaddd ymm13,ymm13,YMMWORD[((416-512))+rax]
+ vpaddd ymm15,ymm15,YMMWORD[((448-512))+rax]
+ vpaddd ymm9,ymm9,YMMWORD[((480-512))+rax]
+
+ vpunpckldq ymm2,ymm12,ymm13
+ vpunpckldq ymm8,ymm15,ymm9
+ vpunpckhdq ymm12,ymm12,ymm13
+ vpunpckhdq ymm15,ymm15,ymm9
+ vpunpcklqdq ymm13,ymm2,ymm8
+ vpunpckhqdq ymm2,ymm2,ymm8
+ vpunpcklqdq ymm9,ymm12,ymm15
+ vpunpckhqdq ymm12,ymm12,ymm15
+ vpaddd ymm4,ymm4,YMMWORD[((512-512))+rax]
+ vpaddd ymm5,ymm5,YMMWORD[((544-512))+rax]
+ vpaddd ymm6,ymm6,YMMWORD[((576-512))+rax]
+ vpaddd ymm7,ymm7,YMMWORD[((608-512))+rax]
+
+ vpunpckldq ymm15,ymm4,ymm5
+ vpunpckldq ymm8,ymm6,ymm7
+ vpunpckhdq ymm4,ymm4,ymm5
+ vpunpckhdq ymm6,ymm6,ymm7
+ vpunpcklqdq ymm5,ymm15,ymm8
+ vpunpckhqdq ymm15,ymm15,ymm8
+ vpunpcklqdq ymm7,ymm4,ymm6
+ vpunpckhqdq ymm4,ymm4,ymm6
+ vperm2i128 ymm8,ymm13,ymm5,0x20
+ vperm2i128 ymm5,ymm13,ymm5,0x31
+ vperm2i128 ymm13,ymm2,ymm15,0x20
+ vperm2i128 ymm15,ymm2,ymm15,0x31
+ vperm2i128 ymm2,ymm9,ymm7,0x20
+ vperm2i128 ymm7,ymm9,ymm7,0x31
+ vperm2i128 ymm9,ymm12,ymm4,0x20
+ vperm2i128 ymm4,ymm12,ymm4,0x31
+ vmovdqa ymm6,YMMWORD[rsp]
+ vmovdqa ymm12,YMMWORD[32+rsp]
+
+ cmp rdx,64*8
+ jb NEAR $L$tail8x
+
+ vpxor ymm6,ymm6,YMMWORD[rsi]
+ vpxor ymm8,ymm8,YMMWORD[32+rsi]
+ vpxor ymm1,ymm1,YMMWORD[64+rsi]
+ vpxor ymm5,ymm5,YMMWORD[96+rsi]
+ lea rsi,[128+rsi]
+ vmovdqu YMMWORD[rdi],ymm6
+ vmovdqu YMMWORD[32+rdi],ymm8
+ vmovdqu YMMWORD[64+rdi],ymm1
+ vmovdqu YMMWORD[96+rdi],ymm5
+ lea rdi,[128+rdi]
+
+ vpxor ymm12,ymm12,YMMWORD[rsi]
+ vpxor ymm13,ymm13,YMMWORD[32+rsi]
+ vpxor ymm10,ymm10,YMMWORD[64+rsi]
+ vpxor ymm15,ymm15,YMMWORD[96+rsi]
+ lea rsi,[128+rsi]
+ vmovdqu YMMWORD[rdi],ymm12
+ vmovdqu YMMWORD[32+rdi],ymm13
+ vmovdqu YMMWORD[64+rdi],ymm10
+ vmovdqu YMMWORD[96+rdi],ymm15
+ lea rdi,[128+rdi]
+
+ vpxor ymm14,ymm14,YMMWORD[rsi]
+ vpxor ymm2,ymm2,YMMWORD[32+rsi]
+ vpxor ymm3,ymm3,YMMWORD[64+rsi]
+ vpxor ymm7,ymm7,YMMWORD[96+rsi]
+ lea rsi,[128+rsi]
+ vmovdqu YMMWORD[rdi],ymm14
+ vmovdqu YMMWORD[32+rdi],ymm2
+ vmovdqu YMMWORD[64+rdi],ymm3
+ vmovdqu YMMWORD[96+rdi],ymm7
+ lea rdi,[128+rdi]
+
+ vpxor ymm11,ymm11,YMMWORD[rsi]
+ vpxor ymm9,ymm9,YMMWORD[32+rsi]
+ vpxor ymm0,ymm0,YMMWORD[64+rsi]
+ vpxor ymm4,ymm4,YMMWORD[96+rsi]
+ lea rsi,[128+rsi]
+ vmovdqu YMMWORD[rdi],ymm11
+ vmovdqu YMMWORD[32+rdi],ymm9
+ vmovdqu YMMWORD[64+rdi],ymm0
+ vmovdqu YMMWORD[96+rdi],ymm4
+ lea rdi,[128+rdi]
+
+ sub rdx,64*8
+ jnz NEAR $L$oop_outer8x
+
+ jmp NEAR $L$done8x
+
+$L$tail8x:
+ cmp rdx,448
+ jae NEAR $L$448_or_more8x
+ cmp rdx,384
+ jae NEAR $L$384_or_more8x
+ cmp rdx,320
+ jae NEAR $L$320_or_more8x
+ cmp rdx,256
+ jae NEAR $L$256_or_more8x
+ cmp rdx,192
+ jae NEAR $L$192_or_more8x
+ cmp rdx,128
+ jae NEAR $L$128_or_more8x
+ cmp rdx,64
+ jae NEAR $L$64_or_more8x
+
+ xor r10,r10
+ vmovdqa YMMWORD[rsp],ymm6
+ vmovdqa YMMWORD[32+rsp],ymm8
+ jmp NEAR $L$oop_tail8x
+
+ALIGN 32
+$L$64_or_more8x:
+ vpxor ymm6,ymm6,YMMWORD[rsi]
+ vpxor ymm8,ymm8,YMMWORD[32+rsi]
+ vmovdqu YMMWORD[rdi],ymm6
+ vmovdqu YMMWORD[32+rdi],ymm8
+ je NEAR $L$done8x
+
+ lea rsi,[64+rsi]
+ xor r10,r10
+ vmovdqa YMMWORD[rsp],ymm1
+ lea rdi,[64+rdi]
+ sub rdx,64
+ vmovdqa YMMWORD[32+rsp],ymm5
+ jmp NEAR $L$oop_tail8x
+
+ALIGN 32
+$L$128_or_more8x:
+ vpxor ymm6,ymm6,YMMWORD[rsi]
+ vpxor ymm8,ymm8,YMMWORD[32+rsi]
+ vpxor ymm1,ymm1,YMMWORD[64+rsi]
+ vpxor ymm5,ymm5,YMMWORD[96+rsi]
+ vmovdqu YMMWORD[rdi],ymm6
+ vmovdqu YMMWORD[32+rdi],ymm8
+ vmovdqu YMMWORD[64+rdi],ymm1
+ vmovdqu YMMWORD[96+rdi],ymm5
+ je NEAR $L$done8x
+
+ lea rsi,[128+rsi]
+ xor r10,r10
+ vmovdqa YMMWORD[rsp],ymm12
+ lea rdi,[128+rdi]
+ sub rdx,128
+ vmovdqa YMMWORD[32+rsp],ymm13
+ jmp NEAR $L$oop_tail8x
+
+ALIGN 32
+$L$192_or_more8x:
+ vpxor ymm6,ymm6,YMMWORD[rsi]
+ vpxor ymm8,ymm8,YMMWORD[32+rsi]
+ vpxor ymm1,ymm1,YMMWORD[64+rsi]
+ vpxor ymm5,ymm5,YMMWORD[96+rsi]
+ vpxor ymm12,ymm12,YMMWORD[128+rsi]
+ vpxor ymm13,ymm13,YMMWORD[160+rsi]
+ vmovdqu YMMWORD[rdi],ymm6
+ vmovdqu YMMWORD[32+rdi],ymm8
+ vmovdqu YMMWORD[64+rdi],ymm1
+ vmovdqu YMMWORD[96+rdi],ymm5
+ vmovdqu YMMWORD[128+rdi],ymm12
+ vmovdqu YMMWORD[160+rdi],ymm13
+ je NEAR $L$done8x
+
+ lea rsi,[192+rsi]
+ xor r10,r10
+ vmovdqa YMMWORD[rsp],ymm10
+ lea rdi,[192+rdi]
+ sub rdx,192
+ vmovdqa YMMWORD[32+rsp],ymm15
+ jmp NEAR $L$oop_tail8x
+
+ALIGN 32
+$L$256_or_more8x:
+ vpxor ymm6,ymm6,YMMWORD[rsi]
+ vpxor ymm8,ymm8,YMMWORD[32+rsi]
+ vpxor ymm1,ymm1,YMMWORD[64+rsi]
+ vpxor ymm5,ymm5,YMMWORD[96+rsi]
+ vpxor ymm12,ymm12,YMMWORD[128+rsi]
+ vpxor ymm13,ymm13,YMMWORD[160+rsi]
+ vpxor ymm10,ymm10,YMMWORD[192+rsi]
+ vpxor ymm15,ymm15,YMMWORD[224+rsi]
+ vmovdqu YMMWORD[rdi],ymm6
+ vmovdqu YMMWORD[32+rdi],ymm8
+ vmovdqu YMMWORD[64+rdi],ymm1
+ vmovdqu YMMWORD[96+rdi],ymm5
+ vmovdqu YMMWORD[128+rdi],ymm12
+ vmovdqu YMMWORD[160+rdi],ymm13
+ vmovdqu YMMWORD[192+rdi],ymm10
+ vmovdqu YMMWORD[224+rdi],ymm15
+ je NEAR $L$done8x
+
+ lea rsi,[256+rsi]
+ xor r10,r10
+ vmovdqa YMMWORD[rsp],ymm14
+ lea rdi,[256+rdi]
+ sub rdx,256
+ vmovdqa YMMWORD[32+rsp],ymm2
+ jmp NEAR $L$oop_tail8x
+
+ALIGN 32
+$L$320_or_more8x:
+ vpxor ymm6,ymm6,YMMWORD[rsi]
+ vpxor ymm8,ymm8,YMMWORD[32+rsi]
+ vpxor ymm1,ymm1,YMMWORD[64+rsi]
+ vpxor ymm5,ymm5,YMMWORD[96+rsi]
+ vpxor ymm12,ymm12,YMMWORD[128+rsi]
+ vpxor ymm13,ymm13,YMMWORD[160+rsi]
+ vpxor ymm10,ymm10,YMMWORD[192+rsi]
+ vpxor ymm15,ymm15,YMMWORD[224+rsi]
+ vpxor ymm14,ymm14,YMMWORD[256+rsi]
+ vpxor ymm2,ymm2,YMMWORD[288+rsi]
+ vmovdqu YMMWORD[rdi],ymm6
+ vmovdqu YMMWORD[32+rdi],ymm8
+ vmovdqu YMMWORD[64+rdi],ymm1
+ vmovdqu YMMWORD[96+rdi],ymm5
+ vmovdqu YMMWORD[128+rdi],ymm12
+ vmovdqu YMMWORD[160+rdi],ymm13
+ vmovdqu YMMWORD[192+rdi],ymm10
+ vmovdqu YMMWORD[224+rdi],ymm15
+ vmovdqu YMMWORD[256+rdi],ymm14
+ vmovdqu YMMWORD[288+rdi],ymm2
+ je NEAR $L$done8x
+
+ lea rsi,[320+rsi]
+ xor r10,r10
+ vmovdqa YMMWORD[rsp],ymm3
+ lea rdi,[320+rdi]
+ sub rdx,320
+ vmovdqa YMMWORD[32+rsp],ymm7
+ jmp NEAR $L$oop_tail8x
+
+ALIGN 32
+$L$384_or_more8x:
+ vpxor ymm6,ymm6,YMMWORD[rsi]
+ vpxor ymm8,ymm8,YMMWORD[32+rsi]
+ vpxor ymm1,ymm1,YMMWORD[64+rsi]
+ vpxor ymm5,ymm5,YMMWORD[96+rsi]
+ vpxor ymm12,ymm12,YMMWORD[128+rsi]
+ vpxor ymm13,ymm13,YMMWORD[160+rsi]
+ vpxor ymm10,ymm10,YMMWORD[192+rsi]
+ vpxor ymm15,ymm15,YMMWORD[224+rsi]
+ vpxor ymm14,ymm14,YMMWORD[256+rsi]
+ vpxor ymm2,ymm2,YMMWORD[288+rsi]
+ vpxor ymm3,ymm3,YMMWORD[320+rsi]
+ vpxor ymm7,ymm7,YMMWORD[352+rsi]
+ vmovdqu YMMWORD[rdi],ymm6
+ vmovdqu YMMWORD[32+rdi],ymm8
+ vmovdqu YMMWORD[64+rdi],ymm1
+ vmovdqu YMMWORD[96+rdi],ymm5
+ vmovdqu YMMWORD[128+rdi],ymm12
+ vmovdqu YMMWORD[160+rdi],ymm13
+ vmovdqu YMMWORD[192+rdi],ymm10
+ vmovdqu YMMWORD[224+rdi],ymm15
+ vmovdqu YMMWORD[256+rdi],ymm14
+ vmovdqu YMMWORD[288+rdi],ymm2
+ vmovdqu YMMWORD[320+rdi],ymm3
+ vmovdqu YMMWORD[352+rdi],ymm7
+ je NEAR $L$done8x
+
+ lea rsi,[384+rsi]
+ xor r10,r10
+ vmovdqa YMMWORD[rsp],ymm11
+ lea rdi,[384+rdi]
+ sub rdx,384
+ vmovdqa YMMWORD[32+rsp],ymm9
+ jmp NEAR $L$oop_tail8x
+
+ALIGN 32
+$L$448_or_more8x:
+ vpxor ymm6,ymm6,YMMWORD[rsi]
+ vpxor ymm8,ymm8,YMMWORD[32+rsi]
+ vpxor ymm1,ymm1,YMMWORD[64+rsi]
+ vpxor ymm5,ymm5,YMMWORD[96+rsi]
+ vpxor ymm12,ymm12,YMMWORD[128+rsi]
+ vpxor ymm13,ymm13,YMMWORD[160+rsi]
+ vpxor ymm10,ymm10,YMMWORD[192+rsi]
+ vpxor ymm15,ymm15,YMMWORD[224+rsi]
+ vpxor ymm14,ymm14,YMMWORD[256+rsi]
+ vpxor ymm2,ymm2,YMMWORD[288+rsi]
+ vpxor ymm3,ymm3,YMMWORD[320+rsi]
+ vpxor ymm7,ymm7,YMMWORD[352+rsi]
+ vpxor ymm11,ymm11,YMMWORD[384+rsi]
+ vpxor ymm9,ymm9,YMMWORD[416+rsi]
+ vmovdqu YMMWORD[rdi],ymm6
+ vmovdqu YMMWORD[32+rdi],ymm8
+ vmovdqu YMMWORD[64+rdi],ymm1
+ vmovdqu YMMWORD[96+rdi],ymm5
+ vmovdqu YMMWORD[128+rdi],ymm12
+ vmovdqu YMMWORD[160+rdi],ymm13
+ vmovdqu YMMWORD[192+rdi],ymm10
+ vmovdqu YMMWORD[224+rdi],ymm15
+ vmovdqu YMMWORD[256+rdi],ymm14
+ vmovdqu YMMWORD[288+rdi],ymm2
+ vmovdqu YMMWORD[320+rdi],ymm3
+ vmovdqu YMMWORD[352+rdi],ymm7
+ vmovdqu YMMWORD[384+rdi],ymm11
+ vmovdqu YMMWORD[416+rdi],ymm9
+ je NEAR $L$done8x
+
+ lea rsi,[448+rsi]
+ xor r10,r10
+ vmovdqa YMMWORD[rsp],ymm0
+ lea rdi,[448+rdi]
+ sub rdx,448
+ vmovdqa YMMWORD[32+rsp],ymm4
+
+$L$oop_tail8x:
+ movzx eax,BYTE[r10*1+rsi]
+ movzx ecx,BYTE[r10*1+rsp]
+ lea r10,[1+r10]
+ xor eax,ecx
+ mov BYTE[((-1))+r10*1+rdi],al
+ dec rdx
+ jnz NEAR $L$oop_tail8x
+
+$L$done8x:
+ vzeroall
+ lea r11,[((656+48))+rsp]
+ movaps xmm6,XMMWORD[((-48))+r11]
+ movaps xmm7,XMMWORD[((-32))+r11]
+ movaps xmm8,XMMWORD[((-16))+r11]
+ movaps xmm9,XMMWORD[r11]
+ movaps xmm10,XMMWORD[16+r11]
+ movaps xmm11,XMMWORD[32+r11]
+ movaps xmm12,XMMWORD[48+r11]
+ movaps xmm13,XMMWORD[64+r11]
+ movaps xmm14,XMMWORD[80+r11]
+ movaps xmm15,XMMWORD[96+r11]
+ mov rsp,QWORD[640+rsp]
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ChaCha20_8x:
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 c92d7bb..0000000
--- 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/ec/p256-x86_64-asm.asm b/third_party/boringssl/win-x86_64/crypto/ec/p256-x86_64-asm.asm
new file mode 100644
index 0000000..a2e4075
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/ec/p256-x86_64-asm.asm
@@ -0,0 +1,1925 @@
+default rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section .text code align=64
+
+EXTERN OPENSSL_ia32cap_P
+
+
+ALIGN 64
+$L$poly:
+ DQ 0xffffffffffffffff,0x00000000ffffffff,0x0000000000000000,0xffffffff00000001
+
+$L$One:
+ DD 1,1,1,1,1,1,1,1
+$L$Two:
+ DD 2,2,2,2,2,2,2,2
+$L$Three:
+ DD 3,3,3,3,3,3,3,3
+$L$ONE_mont:
+ DQ 0x0000000000000001,0xffffffff00000000,0xffffffffffffffff,0x00000000fffffffe
+
+
+ALIGN 64
+ecp_nistz256_mul_by_2:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_mul_by_2:
+ mov rdi,rcx
+ mov rsi,rdx
+
+
+ push r12
+ push r13
+
+ mov r8,QWORD[rsi]
+ mov r9,QWORD[8+rsi]
+ add r8,r8
+ mov r10,QWORD[16+rsi]
+ adc r9,r9
+ mov r11,QWORD[24+rsi]
+ lea rsi,[$L$poly]
+ mov rax,r8
+ adc r10,r10
+ adc r11,r11
+ mov rdx,r9
+ sbb r13,r13
+
+ sub r8,QWORD[rsi]
+ mov rcx,r10
+ sbb r9,QWORD[8+rsi]
+ sbb r10,QWORD[16+rsi]
+ mov r12,r11
+ sbb r11,QWORD[24+rsi]
+ test r13,r13
+
+ cmovz r8,rax
+ cmovz r9,rdx
+ mov QWORD[rdi],r8
+ cmovz r10,rcx
+ mov QWORD[8+rdi],r9
+ cmovz r11,r12
+ mov QWORD[16+rdi],r10
+ mov QWORD[24+rdi],r11
+
+ pop r13
+ pop r12
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_mul_by_2:
+
+
+
+global ecp_nistz256_neg
+
+ALIGN 32
+ecp_nistz256_neg:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_neg:
+ mov rdi,rcx
+ mov rsi,rdx
+
+
+ push r12
+ push r13
+
+ xor r8,r8
+ xor r9,r9
+ xor r10,r10
+ xor r11,r11
+ xor r13,r13
+
+ sub r8,QWORD[rsi]
+ sbb r9,QWORD[8+rsi]
+ sbb r10,QWORD[16+rsi]
+ mov rax,r8
+ sbb r11,QWORD[24+rsi]
+ lea rsi,[$L$poly]
+ mov rdx,r9
+ sbb r13,0
+
+ add r8,QWORD[rsi]
+ mov rcx,r10
+ adc r9,QWORD[8+rsi]
+ adc r10,QWORD[16+rsi]
+ mov r12,r11
+ adc r11,QWORD[24+rsi]
+ test r13,r13
+
+ cmovz r8,rax
+ cmovz r9,rdx
+ mov QWORD[rdi],r8
+ cmovz r10,rcx
+ mov QWORD[8+rdi],r9
+ cmovz r11,r12
+ mov QWORD[16+rdi],r10
+ mov QWORD[24+rdi],r11
+
+ pop r13
+ pop r12
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_neg:
+
+
+
+
+
+
+global ecp_nistz256_mul_mont
+
+ALIGN 32
+ecp_nistz256_mul_mont:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_mul_mont:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+$L$mul_mont:
+ push rbp
+ push rbx
+ push r12
+ push r13
+ push r14
+ push r15
+ mov rbx,rdx
+ mov rax,QWORD[rdx]
+ mov r9,QWORD[rsi]
+ mov r10,QWORD[8+rsi]
+ mov r11,QWORD[16+rsi]
+ mov r12,QWORD[24+rsi]
+
+ call __ecp_nistz256_mul_montq
+$L$mul_mont_done:
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbx
+ pop rbp
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_mul_mont:
+
+
+ALIGN 32
+__ecp_nistz256_mul_montq:
+
+
+ mov rbp,rax
+ mul r9
+ mov r14,QWORD[(($L$poly+8))]
+ mov r8,rax
+ mov rax,rbp
+ mov r9,rdx
+
+ mul r10
+ mov r15,QWORD[(($L$poly+24))]
+ add r9,rax
+ mov rax,rbp
+ adc rdx,0
+ mov r10,rdx
+
+ mul r11
+ add r10,rax
+ mov rax,rbp
+ adc rdx,0
+ mov r11,rdx
+
+ mul r12
+ add r11,rax
+ mov rax,r8
+ adc rdx,0
+ xor r13,r13
+ mov r12,rdx
+
+
+
+
+
+
+
+
+
+
+ mov rbp,r8
+ shl r8,32
+ mul r15
+ shr rbp,32
+ add r9,r8
+ adc r10,rbp
+ adc r11,rax
+ mov rax,QWORD[8+rbx]
+ adc r12,rdx
+ adc r13,0
+ xor r8,r8
+
+
+
+ mov rbp,rax
+ mul QWORD[rsi]
+ add r9,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[8+rsi]
+ add r10,rcx
+ adc rdx,0
+ add r10,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[16+rsi]
+ add r11,rcx
+ adc rdx,0
+ add r11,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[24+rsi]
+ add r12,rcx
+ adc rdx,0
+ add r12,rax
+ mov rax,r9
+ adc r13,rdx
+ adc r8,0
+
+
+
+ mov rbp,r9
+ shl r9,32
+ mul r15
+ shr rbp,32
+ add r10,r9
+ adc r11,rbp
+ adc r12,rax
+ mov rax,QWORD[16+rbx]
+ adc r13,rdx
+ adc r8,0
+ xor r9,r9
+
+
+
+ mov rbp,rax
+ mul QWORD[rsi]
+ add r10,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[8+rsi]
+ add r11,rcx
+ adc rdx,0
+ add r11,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[16+rsi]
+ add r12,rcx
+ adc rdx,0
+ add r12,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[24+rsi]
+ add r13,rcx
+ adc rdx,0
+ add r13,rax
+ mov rax,r10
+ adc r8,rdx
+ adc r9,0
+
+
+
+ mov rbp,r10
+ shl r10,32
+ mul r15
+ shr rbp,32
+ add r11,r10
+ adc r12,rbp
+ adc r13,rax
+ mov rax,QWORD[24+rbx]
+ adc r8,rdx
+ adc r9,0
+ xor r10,r10
+
+
+
+ mov rbp,rax
+ mul QWORD[rsi]
+ add r11,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[8+rsi]
+ add r12,rcx
+ adc rdx,0
+ add r12,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[16+rsi]
+ add r13,rcx
+ adc rdx,0
+ add r13,rax
+ mov rax,rbp
+ adc rdx,0
+ mov rcx,rdx
+
+ mul QWORD[24+rsi]
+ add r8,rcx
+ adc rdx,0
+ add r8,rax
+ mov rax,r11
+ adc r9,rdx
+ adc r10,0
+
+
+
+ mov rbp,r11
+ shl r11,32
+ mul r15
+ shr rbp,32
+ add r12,r11
+ adc r13,rbp
+ mov rcx,r12
+ adc r8,rax
+ adc r9,rdx
+ mov rbp,r13
+ adc r10,0
+
+
+
+ sub r12,-1
+ mov rbx,r8
+ sbb r13,r14
+ sbb r8,0
+ mov rdx,r9
+ sbb r9,r15
+ sbb r10,0
+
+ cmovc r12,rcx
+ cmovc r13,rbp
+ mov QWORD[rdi],r12
+ cmovc r8,rbx
+ mov QWORD[8+rdi],r13
+ cmovc r9,rdx
+ mov QWORD[16+rdi],r8
+ mov QWORD[24+rdi],r9
+
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+
+
+global ecp_nistz256_sqr_mont
+
+ALIGN 32
+ecp_nistz256_sqr_mont:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_sqr_mont:
+ mov rdi,rcx
+ mov rsi,rdx
+
+
+ push rbp
+ push rbx
+ push r12
+ push r13
+ push r14
+ push r15
+ mov rax,QWORD[rsi]
+ mov r14,QWORD[8+rsi]
+ mov r15,QWORD[16+rsi]
+ mov r8,QWORD[24+rsi]
+
+ call __ecp_nistz256_sqr_montq
+$L$sqr_mont_done:
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbx
+ pop rbp
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_sqr_mont:
+
+
+ALIGN 32
+__ecp_nistz256_sqr_montq:
+ mov r13,rax
+ mul r14
+ mov r9,rax
+ mov rax,r15
+ mov r10,rdx
+
+ mul r13
+ add r10,rax
+ mov rax,r8
+ adc rdx,0
+ mov r11,rdx
+
+ mul r13
+ add r11,rax
+ mov rax,r15
+ adc rdx,0
+ mov r12,rdx
+
+
+ mul r14
+ add r11,rax
+ mov rax,r8
+ adc rdx,0
+ mov rbp,rdx
+
+ mul r14
+ add r12,rax
+ mov rax,r8
+ adc rdx,0
+ add r12,rbp
+ mov r13,rdx
+ adc r13,0
+
+
+ mul r15
+ xor r15,r15
+ add r13,rax
+ mov rax,QWORD[rsi]
+ mov r14,rdx
+ adc r14,0
+
+ add r9,r9
+ adc r10,r10
+ adc r11,r11
+ adc r12,r12
+ adc r13,r13
+ adc r14,r14
+ adc r15,0
+
+ mul rax
+ mov r8,rax
+ mov rax,QWORD[8+rsi]
+ mov rcx,rdx
+
+ mul rax
+ add r9,rcx
+ adc r10,rax
+ mov rax,QWORD[16+rsi]
+ adc rdx,0
+ mov rcx,rdx
+
+ mul rax
+ add r11,rcx
+ adc r12,rax
+ mov rax,QWORD[24+rsi]
+ adc rdx,0
+ mov rcx,rdx
+
+ mul rax
+ add r13,rcx
+ adc r14,rax
+ mov rax,r8
+ adc r15,rdx
+
+ mov rsi,QWORD[(($L$poly+8))]
+ mov rbp,QWORD[(($L$poly+24))]
+
+
+
+
+ mov rcx,r8
+ shl r8,32
+ mul rbp
+ shr rcx,32
+ add r9,r8
+ adc r10,rcx
+ adc r11,rax
+ mov rax,r9
+ adc rdx,0
+
+
+
+ mov rcx,r9
+ shl r9,32
+ mov r8,rdx
+ mul rbp
+ shr rcx,32
+ add r10,r9
+ adc r11,rcx
+ adc r8,rax
+ mov rax,r10
+ adc rdx,0
+
+
+
+ mov rcx,r10
+ shl r10,32
+ mov r9,rdx
+ mul rbp
+ shr rcx,32
+ add r11,r10
+ adc r8,rcx
+ adc r9,rax
+ mov rax,r11
+ adc rdx,0
+
+
+
+ mov rcx,r11
+ shl r11,32
+ mov r10,rdx
+ mul rbp
+ shr rcx,32
+ add r8,r11
+ adc r9,rcx
+ adc r10,rax
+ adc rdx,0
+ xor r11,r11
+
+
+
+ add r12,r8
+ adc r13,r9
+ mov r8,r12
+ adc r14,r10
+ adc r15,rdx
+ mov r9,r13
+ adc r11,0
+
+ sub r12,-1
+ mov r10,r14
+ sbb r13,rsi
+ sbb r14,0
+ mov rcx,r15
+ sbb r15,rbp
+ sbb r11,0
+
+ cmovc r12,r8
+ cmovc r13,r9
+ mov QWORD[rdi],r12
+ cmovc r14,r10
+ mov QWORD[8+rdi],r13
+ cmovc r15,rcx
+ mov QWORD[16+rdi],r14
+ mov QWORD[24+rdi],r15
+
+ DB 0F3h,0C3h ;repret
+
+
+
+
+
+
+
+global ecp_nistz256_from_mont
+
+ALIGN 32
+ecp_nistz256_from_mont:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_from_mont:
+ mov rdi,rcx
+ mov rsi,rdx
+
+
+ push r12
+ push r13
+
+ mov rax,QWORD[rsi]
+ mov r13,QWORD[(($L$poly+24))]
+ mov r9,QWORD[8+rsi]
+ mov r10,QWORD[16+rsi]
+ mov r11,QWORD[24+rsi]
+ mov r8,rax
+ mov r12,QWORD[(($L$poly+8))]
+
+
+
+ mov rcx,rax
+ shl r8,32
+ mul r13
+ shr rcx,32
+ add r9,r8
+ adc r10,rcx
+ adc r11,rax
+ mov rax,r9
+ adc rdx,0
+
+
+
+ mov rcx,r9
+ shl r9,32
+ mov r8,rdx
+ mul r13
+ shr rcx,32
+ add r10,r9
+ adc r11,rcx
+ adc r8,rax
+ mov rax,r10
+ adc rdx,0
+
+
+
+ mov rcx,r10
+ shl r10,32
+ mov r9,rdx
+ mul r13
+ shr rcx,32
+ add r11,r10
+ adc r8,rcx
+ adc r9,rax
+ mov rax,r11
+ adc rdx,0
+
+
+
+ mov rcx,r11
+ shl r11,32
+ mov r10,rdx
+ mul r13
+ shr rcx,32
+ add r8,r11
+ adc r9,rcx
+ mov rcx,r8
+ adc r10,rax
+ mov rsi,r9
+ adc rdx,0
+
+ sub r8,-1
+ mov rax,r10
+ sbb r9,r12
+ sbb r10,0
+ mov r11,rdx
+ sbb rdx,r13
+ sbb r13,r13
+
+ cmovnz r8,rcx
+ cmovnz r9,rsi
+ mov QWORD[rdi],r8
+ cmovnz r10,rax
+ mov QWORD[8+rdi],r9
+ cmovz r11,rdx
+ mov QWORD[16+rdi],r10
+ mov QWORD[24+rdi],r11
+
+ pop r13
+ pop r12
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_from_mont:
+
+
+global ecp_nistz256_select_w5
+
+ALIGN 32
+ecp_nistz256_select_w5:
+ lea rax,[((-136))+rsp]
+$L$SEH_begin_ecp_nistz256_select_w5:
+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 xmm0,XMMWORD[$L$One]
+ movd xmm1,r8d
+
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+ pxor xmm6,xmm6
+ pxor xmm7,xmm7
+
+ movdqa xmm8,xmm0
+ pshufd xmm1,xmm1,0
+
+ mov rax,16
+$L$select_loop_sse_w5:
+
+ movdqa xmm15,xmm8
+ paddd xmm8,xmm0
+ pcmpeqd xmm15,xmm1
+
+ movdqa xmm9,XMMWORD[rdx]
+ movdqa xmm10,XMMWORD[16+rdx]
+ movdqa xmm11,XMMWORD[32+rdx]
+ movdqa xmm12,XMMWORD[48+rdx]
+ movdqa xmm13,XMMWORD[64+rdx]
+ movdqa xmm14,XMMWORD[80+rdx]
+ lea rdx,[96+rdx]
+
+ pand xmm9,xmm15
+ pand xmm10,xmm15
+ por xmm2,xmm9
+ pand xmm11,xmm15
+ por xmm3,xmm10
+ pand xmm12,xmm15
+ por xmm4,xmm11
+ pand xmm13,xmm15
+ por xmm5,xmm12
+ pand xmm14,xmm15
+ por xmm6,xmm13
+ por xmm7,xmm14
+
+ dec rax
+ jnz NEAR $L$select_loop_sse_w5
+
+ movdqu XMMWORD[rcx],xmm2
+ movdqu XMMWORD[16+rcx],xmm3
+ movdqu XMMWORD[32+rcx],xmm4
+ movdqu XMMWORD[48+rcx],xmm5
+ movdqu XMMWORD[64+rcx],xmm6
+ movdqu XMMWORD[80+rcx],xmm7
+ 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_ecp_nistz256_select_w5:
+ DB 0F3h,0C3h ;repret
+
+
+
+
+global ecp_nistz256_select_w7
+
+ALIGN 32
+ecp_nistz256_select_w7:
+ lea rax,[((-136))+rsp]
+$L$SEH_begin_ecp_nistz256_select_w7:
+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 xmm8,XMMWORD[$L$One]
+ movd xmm1,r8d
+
+ pxor xmm2,xmm2
+ pxor xmm3,xmm3
+ pxor xmm4,xmm4
+ pxor xmm5,xmm5
+
+ movdqa xmm0,xmm8
+ pshufd xmm1,xmm1,0
+ mov rax,64
+
+$L$select_loop_sse_w7:
+ movdqa xmm15,xmm8
+ paddd xmm8,xmm0
+ movdqa xmm9,XMMWORD[rdx]
+ movdqa xmm10,XMMWORD[16+rdx]
+ pcmpeqd xmm15,xmm1
+ movdqa xmm11,XMMWORD[32+rdx]
+ movdqa xmm12,XMMWORD[48+rdx]
+ lea rdx,[64+rdx]
+
+ pand xmm9,xmm15
+ pand xmm10,xmm15
+ por xmm2,xmm9
+ pand xmm11,xmm15
+ por xmm3,xmm10
+ pand xmm12,xmm15
+ por xmm4,xmm11
+ prefetcht0 [255+rdx]
+ por xmm5,xmm12
+
+ dec rax
+ jnz NEAR $L$select_loop_sse_w7
+
+ movdqu XMMWORD[rcx],xmm2
+ movdqu XMMWORD[16+rcx],xmm3
+ movdqu XMMWORD[32+rcx],xmm4
+ movdqu XMMWORD[48+rcx],xmm5
+ 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_ecp_nistz256_select_w7:
+ DB 0F3h,0C3h ;repret
+
+global ecp_nistz256_avx2_select_w7
+
+ALIGN 32
+ecp_nistz256_avx2_select_w7:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_avx2_select_w7:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+DB 0x0f,0x0b
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_avx2_select_w7:
+
+ALIGN 32
+__ecp_nistz256_add_toq:
+ add r12,QWORD[rbx]
+ adc r13,QWORD[8+rbx]
+ mov rax,r12
+ adc r8,QWORD[16+rbx]
+ adc r9,QWORD[24+rbx]
+ mov rbp,r13
+ sbb r11,r11
+
+ sub r12,-1
+ mov rcx,r8
+ sbb r13,r14
+ sbb r8,0
+ mov r10,r9
+ sbb r9,r15
+ test r11,r11
+
+ cmovz r12,rax
+ cmovz r13,rbp
+ mov QWORD[rdi],r12
+ cmovz r8,rcx
+ mov QWORD[8+rdi],r13
+ cmovz r9,r10
+ mov QWORD[16+rdi],r8
+ mov QWORD[24+rdi],r9
+
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 32
+__ecp_nistz256_sub_fromq:
+ sub r12,QWORD[rbx]
+ sbb r13,QWORD[8+rbx]
+ mov rax,r12
+ sbb r8,QWORD[16+rbx]
+ sbb r9,QWORD[24+rbx]
+ mov rbp,r13
+ sbb r11,r11
+
+ add r12,-1
+ mov rcx,r8
+ adc r13,r14
+ adc r8,0
+ mov r10,r9
+ adc r9,r15
+ test r11,r11
+
+ cmovz r12,rax
+ cmovz r13,rbp
+ mov QWORD[rdi],r12
+ cmovz r8,rcx
+ mov QWORD[8+rdi],r13
+ cmovz r9,r10
+ mov QWORD[16+rdi],r8
+ mov QWORD[24+rdi],r9
+
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 32
+__ecp_nistz256_subq:
+ sub rax,r12
+ sbb rbp,r13
+ mov r12,rax
+ sbb rcx,r8
+ sbb r10,r9
+ mov r13,rbp
+ sbb r11,r11
+
+ add rax,-1
+ mov r8,rcx
+ adc rbp,r14
+ adc rcx,0
+ mov r9,r10
+ adc r10,r15
+ test r11,r11
+
+ cmovnz r12,rax
+ cmovnz r13,rbp
+ cmovnz r8,rcx
+ cmovnz r9,r10
+
+ DB 0F3h,0C3h ;repret
+
+
+
+ALIGN 32
+__ecp_nistz256_mul_by_2q:
+ add r12,r12
+ adc r13,r13
+ mov rax,r12
+ adc r8,r8
+ adc r9,r9
+ mov rbp,r13
+ sbb r11,r11
+
+ sub r12,-1
+ mov rcx,r8
+ sbb r13,r14
+ sbb r8,0
+ mov r10,r9
+ sbb r9,r15
+ test r11,r11
+
+ cmovz r12,rax
+ cmovz r13,rbp
+ mov QWORD[rdi],r12
+ cmovz r8,rcx
+ mov QWORD[8+rdi],r13
+ cmovz r9,r10
+ mov QWORD[16+rdi],r8
+ mov QWORD[24+rdi],r9
+
+ DB 0F3h,0C3h ;repret
+
+global ecp_nistz256_point_double
+
+ALIGN 32
+ecp_nistz256_point_double:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_point_double:
+ mov rdi,rcx
+ mov rsi,rdx
+
+
+ push rbp
+ push rbx
+ push r12
+ push r13
+ push r14
+ push r15
+ sub rsp,32*5+8
+
+$L$point_double_shortcutq:
+ movdqu xmm0,XMMWORD[rsi]
+ mov rbx,rsi
+ movdqu xmm1,XMMWORD[16+rsi]
+ mov r12,QWORD[((32+0))+rsi]
+ mov r13,QWORD[((32+8))+rsi]
+ mov r8,QWORD[((32+16))+rsi]
+ mov r9,QWORD[((32+24))+rsi]
+ mov r14,QWORD[(($L$poly+8))]
+ mov r15,QWORD[(($L$poly+24))]
+ movdqa XMMWORD[96+rsp],xmm0
+ movdqa XMMWORD[(96+16)+rsp],xmm1
+ lea r10,[32+rdi]
+ lea r11,[64+rdi]
+DB 102,72,15,110,199
+DB 102,73,15,110,202
+DB 102,73,15,110,211
+
+ lea rdi,[rsp]
+ call __ecp_nistz256_mul_by_2q
+
+ mov rax,QWORD[((64+0))+rsi]
+ mov r14,QWORD[((64+8))+rsi]
+ mov r15,QWORD[((64+16))+rsi]
+ mov r8,QWORD[((64+24))+rsi]
+ lea rsi,[((64-0))+rsi]
+ lea rdi,[64+rsp]
+ call __ecp_nistz256_sqr_montq
+
+ mov rax,QWORD[((0+0))+rsp]
+ mov r14,QWORD[((8+0))+rsp]
+ lea rsi,[((0+0))+rsp]
+ mov r15,QWORD[((16+0))+rsp]
+ mov r8,QWORD[((24+0))+rsp]
+ lea rdi,[rsp]
+ call __ecp_nistz256_sqr_montq
+
+ mov rax,QWORD[32+rbx]
+ mov r9,QWORD[((64+0))+rbx]
+ mov r10,QWORD[((64+8))+rbx]
+ mov r11,QWORD[((64+16))+rbx]
+ mov r12,QWORD[((64+24))+rbx]
+ lea rsi,[((64-0))+rbx]
+ lea rbx,[32+rbx]
+DB 102,72,15,126,215
+ call __ecp_nistz256_mul_montq
+ call __ecp_nistz256_mul_by_2q
+
+ mov r12,QWORD[((96+0))+rsp]
+ mov r13,QWORD[((96+8))+rsp]
+ lea rbx,[64+rsp]
+ mov r8,QWORD[((96+16))+rsp]
+ mov r9,QWORD[((96+24))+rsp]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_add_toq
+
+ mov r12,QWORD[((96+0))+rsp]
+ mov r13,QWORD[((96+8))+rsp]
+ lea rbx,[64+rsp]
+ mov r8,QWORD[((96+16))+rsp]
+ mov r9,QWORD[((96+24))+rsp]
+ lea rdi,[64+rsp]
+ call __ecp_nistz256_sub_fromq
+
+ mov rax,QWORD[((0+0))+rsp]
+ mov r14,QWORD[((8+0))+rsp]
+ lea rsi,[((0+0))+rsp]
+ mov r15,QWORD[((16+0))+rsp]
+ mov r8,QWORD[((24+0))+rsp]
+DB 102,72,15,126,207
+ call __ecp_nistz256_sqr_montq
+ xor r9,r9
+ mov rax,r12
+ add r12,-1
+ mov r10,r13
+ adc r13,rsi
+ mov rcx,r14
+ adc r14,0
+ mov r8,r15
+ adc r15,rbp
+ adc r9,0
+ xor rsi,rsi
+ test rax,1
+
+ cmovz r12,rax
+ cmovz r13,r10
+ cmovz r14,rcx
+ cmovz r15,r8
+ cmovz r9,rsi
+
+ mov rax,r13
+ shr r12,1
+ shl rax,63
+ mov r10,r14
+ shr r13,1
+ or r12,rax
+ shl r10,63
+ mov rcx,r15
+ shr r14,1
+ or r13,r10
+ shl rcx,63
+ mov QWORD[rdi],r12
+ shr r15,1
+ mov QWORD[8+rdi],r13
+ shl r9,63
+ or r14,rcx
+ or r15,r9
+ mov QWORD[16+rdi],r14
+ mov QWORD[24+rdi],r15
+ mov rax,QWORD[64+rsp]
+ lea rbx,[64+rsp]
+ mov r9,QWORD[((0+32))+rsp]
+ mov r10,QWORD[((8+32))+rsp]
+ lea rsi,[((0+32))+rsp]
+ mov r11,QWORD[((16+32))+rsp]
+ mov r12,QWORD[((24+32))+rsp]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_mul_montq
+
+ lea rdi,[128+rsp]
+ call __ecp_nistz256_mul_by_2q
+
+ lea rbx,[32+rsp]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_add_toq
+
+ mov rax,QWORD[96+rsp]
+ lea rbx,[96+rsp]
+ mov r9,QWORD[((0+0))+rsp]
+ mov r10,QWORD[((8+0))+rsp]
+ lea rsi,[((0+0))+rsp]
+ mov r11,QWORD[((16+0))+rsp]
+ mov r12,QWORD[((24+0))+rsp]
+ lea rdi,[rsp]
+ call __ecp_nistz256_mul_montq
+
+ lea rdi,[128+rsp]
+ call __ecp_nistz256_mul_by_2q
+
+ mov rax,QWORD[((0+32))+rsp]
+ mov r14,QWORD[((8+32))+rsp]
+ lea rsi,[((0+32))+rsp]
+ mov r15,QWORD[((16+32))+rsp]
+ mov r8,QWORD[((24+32))+rsp]
+DB 102,72,15,126,199
+ call __ecp_nistz256_sqr_montq
+
+ lea rbx,[128+rsp]
+ mov r8,r14
+ mov r9,r15
+ mov r14,rsi
+ mov r15,rbp
+ call __ecp_nistz256_sub_fromq
+
+ mov rax,QWORD[((0+0))+rsp]
+ mov rbp,QWORD[((0+8))+rsp]
+ mov rcx,QWORD[((0+16))+rsp]
+ mov r10,QWORD[((0+24))+rsp]
+ lea rdi,[rsp]
+ call __ecp_nistz256_subq
+
+ mov rax,QWORD[32+rsp]
+ lea rbx,[32+rsp]
+ mov r14,r12
+ xor ecx,ecx
+ mov QWORD[((0+0))+rsp],r12
+ mov r10,r13
+ mov QWORD[((0+8))+rsp],r13
+ cmovz r11,r8
+ mov QWORD[((0+16))+rsp],r8
+ lea rsi,[((0-0))+rsp]
+ cmovz r12,r9
+ mov QWORD[((0+24))+rsp],r9
+ mov r9,r14
+ lea rdi,[rsp]
+ call __ecp_nistz256_mul_montq
+
+DB 102,72,15,126,203
+DB 102,72,15,126,207
+ call __ecp_nistz256_sub_fromq
+
+ add rsp,32*5+8
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbx
+ pop rbp
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_point_double:
+global ecp_nistz256_point_add
+
+ALIGN 32
+ecp_nistz256_point_add:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_point_add:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+ push rbp
+ push rbx
+ push r12
+ push r13
+ push r14
+ push r15
+ sub rsp,32*18+8
+
+ movdqu xmm0,XMMWORD[rsi]
+ movdqu xmm1,XMMWORD[16+rsi]
+ movdqu xmm2,XMMWORD[32+rsi]
+ movdqu xmm3,XMMWORD[48+rsi]
+ movdqu xmm4,XMMWORD[64+rsi]
+ movdqu xmm5,XMMWORD[80+rsi]
+ mov rbx,rsi
+ mov rsi,rdx
+ movdqa XMMWORD[384+rsp],xmm0
+ movdqa XMMWORD[(384+16)+rsp],xmm1
+ por xmm1,xmm0
+ movdqa XMMWORD[416+rsp],xmm2
+ movdqa XMMWORD[(416+16)+rsp],xmm3
+ por xmm3,xmm2
+ movdqa XMMWORD[448+rsp],xmm4
+ movdqa XMMWORD[(448+16)+rsp],xmm5
+ por xmm3,xmm1
+
+ movdqu xmm0,XMMWORD[rsi]
+ pshufd xmm5,xmm3,0xb1
+ movdqu xmm1,XMMWORD[16+rsi]
+ movdqu xmm2,XMMWORD[32+rsi]
+ por xmm5,xmm3
+ movdqu xmm3,XMMWORD[48+rsi]
+ mov rax,QWORD[((64+0))+rsi]
+ mov r14,QWORD[((64+8))+rsi]
+ mov r15,QWORD[((64+16))+rsi]
+ mov r8,QWORD[((64+24))+rsi]
+ movdqa XMMWORD[480+rsp],xmm0
+ pshufd xmm4,xmm5,0x1e
+ movdqa XMMWORD[(480+16)+rsp],xmm1
+ por xmm1,xmm0
+DB 102,72,15,110,199
+ movdqa XMMWORD[512+rsp],xmm2
+ movdqa XMMWORD[(512+16)+rsp],xmm3
+ por xmm3,xmm2
+ por xmm5,xmm4
+ pxor xmm4,xmm4
+ por xmm3,xmm1
+
+ lea rsi,[((64-0))+rsi]
+ mov QWORD[((544+0))+rsp],rax
+ mov QWORD[((544+8))+rsp],r14
+ mov QWORD[((544+16))+rsp],r15
+ mov QWORD[((544+24))+rsp],r8
+ lea rdi,[96+rsp]
+ call __ecp_nistz256_sqr_montq
+
+ pcmpeqd xmm5,xmm4
+ pshufd xmm4,xmm3,0xb1
+ por xmm4,xmm3
+ pshufd xmm5,xmm5,0
+ pshufd xmm3,xmm4,0x1e
+ por xmm4,xmm3
+ pxor xmm3,xmm3
+ pcmpeqd xmm4,xmm3
+ pshufd xmm4,xmm4,0
+ mov rax,QWORD[((64+0))+rbx]
+ mov r14,QWORD[((64+8))+rbx]
+ mov r15,QWORD[((64+16))+rbx]
+ mov r8,QWORD[((64+24))+rbx]
+DB 102,72,15,110,203
+
+ lea rsi,[((64-0))+rbx]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_sqr_montq
+
+ mov rax,QWORD[544+rsp]
+ lea rbx,[544+rsp]
+ mov r9,QWORD[((0+96))+rsp]
+ mov r10,QWORD[((8+96))+rsp]
+ lea rsi,[((0+96))+rsp]
+ mov r11,QWORD[((16+96))+rsp]
+ mov r12,QWORD[((24+96))+rsp]
+ lea rdi,[224+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[448+rsp]
+ lea rbx,[448+rsp]
+ mov r9,QWORD[((0+32))+rsp]
+ mov r10,QWORD[((8+32))+rsp]
+ lea rsi,[((0+32))+rsp]
+ mov r11,QWORD[((16+32))+rsp]
+ mov r12,QWORD[((24+32))+rsp]
+ lea rdi,[256+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[416+rsp]
+ lea rbx,[416+rsp]
+ mov r9,QWORD[((0+224))+rsp]
+ mov r10,QWORD[((8+224))+rsp]
+ lea rsi,[((0+224))+rsp]
+ mov r11,QWORD[((16+224))+rsp]
+ mov r12,QWORD[((24+224))+rsp]
+ lea rdi,[224+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[512+rsp]
+ lea rbx,[512+rsp]
+ mov r9,QWORD[((0+256))+rsp]
+ mov r10,QWORD[((8+256))+rsp]
+ lea rsi,[((0+256))+rsp]
+ mov r11,QWORD[((16+256))+rsp]
+ mov r12,QWORD[((24+256))+rsp]
+ lea rdi,[256+rsp]
+ call __ecp_nistz256_mul_montq
+
+ lea rbx,[224+rsp]
+ lea rdi,[64+rsp]
+ call __ecp_nistz256_sub_fromq
+
+ or r12,r13
+ movdqa xmm2,xmm4
+ or r12,r8
+ or r12,r9
+ por xmm2,xmm5
+DB 102,73,15,110,220
+
+ mov rax,QWORD[384+rsp]
+ lea rbx,[384+rsp]
+ mov r9,QWORD[((0+96))+rsp]
+ mov r10,QWORD[((8+96))+rsp]
+ lea rsi,[((0+96))+rsp]
+ mov r11,QWORD[((16+96))+rsp]
+ mov r12,QWORD[((24+96))+rsp]
+ lea rdi,[160+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[480+rsp]
+ lea rbx,[480+rsp]
+ mov r9,QWORD[((0+32))+rsp]
+ mov r10,QWORD[((8+32))+rsp]
+ lea rsi,[((0+32))+rsp]
+ mov r11,QWORD[((16+32))+rsp]
+ mov r12,QWORD[((24+32))+rsp]
+ lea rdi,[192+rsp]
+ call __ecp_nistz256_mul_montq
+
+ lea rbx,[160+rsp]
+ lea rdi,[rsp]
+ call __ecp_nistz256_sub_fromq
+
+ or r12,r13
+ or r12,r8
+ or r12,r9
+
+DB 0x3e
+ jnz NEAR $L$add_proceedq
+DB 102,73,15,126,208
+DB 102,73,15,126,217
+ test r8,r8
+ jnz NEAR $L$add_proceedq
+ test r9,r9
+ jz NEAR $L$add_doubleq
+
+DB 102,72,15,126,199
+ pxor xmm0,xmm0
+ movdqu XMMWORD[rdi],xmm0
+ movdqu XMMWORD[16+rdi],xmm0
+ movdqu XMMWORD[32+rdi],xmm0
+ movdqu XMMWORD[48+rdi],xmm0
+ movdqu XMMWORD[64+rdi],xmm0
+ movdqu XMMWORD[80+rdi],xmm0
+ jmp NEAR $L$add_doneq
+
+ALIGN 32
+$L$add_doubleq:
+DB 102,72,15,126,206
+DB 102,72,15,126,199
+ add rsp,416
+ jmp NEAR $L$point_double_shortcutq
+
+ALIGN 32
+$L$add_proceedq:
+ mov rax,QWORD[((0+64))+rsp]
+ mov r14,QWORD[((8+64))+rsp]
+ lea rsi,[((0+64))+rsp]
+ mov r15,QWORD[((16+64))+rsp]
+ mov r8,QWORD[((24+64))+rsp]
+ lea rdi,[96+rsp]
+ call __ecp_nistz256_sqr_montq
+
+ mov rax,QWORD[448+rsp]
+ lea rbx,[448+rsp]
+ mov r9,QWORD[((0+0))+rsp]
+ mov r10,QWORD[((8+0))+rsp]
+ lea rsi,[((0+0))+rsp]
+ mov r11,QWORD[((16+0))+rsp]
+ mov r12,QWORD[((24+0))+rsp]
+ lea rdi,[352+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[((0+0))+rsp]
+ mov r14,QWORD[((8+0))+rsp]
+ lea rsi,[((0+0))+rsp]
+ mov r15,QWORD[((16+0))+rsp]
+ mov r8,QWORD[((24+0))+rsp]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_sqr_montq
+
+ mov rax,QWORD[544+rsp]
+ lea rbx,[544+rsp]
+ mov r9,QWORD[((0+352))+rsp]
+ mov r10,QWORD[((8+352))+rsp]
+ lea rsi,[((0+352))+rsp]
+ mov r11,QWORD[((16+352))+rsp]
+ mov r12,QWORD[((24+352))+rsp]
+ lea rdi,[352+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[rsp]
+ lea rbx,[rsp]
+ mov r9,QWORD[((0+32))+rsp]
+ mov r10,QWORD[((8+32))+rsp]
+ lea rsi,[((0+32))+rsp]
+ mov r11,QWORD[((16+32))+rsp]
+ mov r12,QWORD[((24+32))+rsp]
+ lea rdi,[128+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[160+rsp]
+ lea rbx,[160+rsp]
+ mov r9,QWORD[((0+32))+rsp]
+ mov r10,QWORD[((8+32))+rsp]
+ lea rsi,[((0+32))+rsp]
+ mov r11,QWORD[((16+32))+rsp]
+ mov r12,QWORD[((24+32))+rsp]
+ lea rdi,[192+rsp]
+ call __ecp_nistz256_mul_montq
+
+
+
+
+ add r12,r12
+ lea rsi,[96+rsp]
+ adc r13,r13
+ mov rax,r12
+ adc r8,r8
+ adc r9,r9
+ mov rbp,r13
+ sbb r11,r11
+
+ sub r12,-1
+ mov rcx,r8
+ sbb r13,r14
+ sbb r8,0
+ mov r10,r9
+ sbb r9,r15
+ test r11,r11
+
+ cmovz r12,rax
+ mov rax,QWORD[rsi]
+ cmovz r13,rbp
+ mov rbp,QWORD[8+rsi]
+ cmovz r8,rcx
+ mov rcx,QWORD[16+rsi]
+ cmovz r9,r10
+ mov r10,QWORD[24+rsi]
+
+ call __ecp_nistz256_subq
+
+ lea rbx,[128+rsp]
+ lea rdi,[288+rsp]
+ call __ecp_nistz256_sub_fromq
+
+ mov rax,QWORD[((192+0))+rsp]
+ mov rbp,QWORD[((192+8))+rsp]
+ mov rcx,QWORD[((192+16))+rsp]
+ mov r10,QWORD[((192+24))+rsp]
+ lea rdi,[320+rsp]
+
+ call __ecp_nistz256_subq
+
+ mov QWORD[rdi],r12
+ mov QWORD[8+rdi],r13
+ mov QWORD[16+rdi],r8
+ mov QWORD[24+rdi],r9
+ mov rax,QWORD[128+rsp]
+ lea rbx,[128+rsp]
+ mov r9,QWORD[((0+224))+rsp]
+ mov r10,QWORD[((8+224))+rsp]
+ lea rsi,[((0+224))+rsp]
+ mov r11,QWORD[((16+224))+rsp]
+ mov r12,QWORD[((24+224))+rsp]
+ lea rdi,[256+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[320+rsp]
+ lea rbx,[320+rsp]
+ mov r9,QWORD[((0+64))+rsp]
+ mov r10,QWORD[((8+64))+rsp]
+ lea rsi,[((0+64))+rsp]
+ mov r11,QWORD[((16+64))+rsp]
+ mov r12,QWORD[((24+64))+rsp]
+ lea rdi,[320+rsp]
+ call __ecp_nistz256_mul_montq
+
+ lea rbx,[256+rsp]
+ lea rdi,[320+rsp]
+ call __ecp_nistz256_sub_fromq
+
+DB 102,72,15,126,199
+
+ movdqa xmm0,xmm5
+ movdqa xmm1,xmm5
+ pandn xmm0,XMMWORD[352+rsp]
+ movdqa xmm2,xmm5
+ pandn xmm1,XMMWORD[((352+16))+rsp]
+ movdqa xmm3,xmm5
+ pand xmm2,XMMWORD[544+rsp]
+ pand xmm3,XMMWORD[((544+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+
+ movdqa xmm0,xmm4
+ movdqa xmm1,xmm4
+ pandn xmm0,xmm2
+ movdqa xmm2,xmm4
+ pandn xmm1,xmm3
+ movdqa xmm3,xmm4
+ pand xmm2,XMMWORD[448+rsp]
+ pand xmm3,XMMWORD[((448+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+ movdqu XMMWORD[64+rdi],xmm2
+ movdqu XMMWORD[80+rdi],xmm3
+
+ movdqa xmm0,xmm5
+ movdqa xmm1,xmm5
+ pandn xmm0,XMMWORD[288+rsp]
+ movdqa xmm2,xmm5
+ pandn xmm1,XMMWORD[((288+16))+rsp]
+ movdqa xmm3,xmm5
+ pand xmm2,XMMWORD[480+rsp]
+ pand xmm3,XMMWORD[((480+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+
+ movdqa xmm0,xmm4
+ movdqa xmm1,xmm4
+ pandn xmm0,xmm2
+ movdqa xmm2,xmm4
+ pandn xmm1,xmm3
+ movdqa xmm3,xmm4
+ pand xmm2,XMMWORD[384+rsp]
+ pand xmm3,XMMWORD[((384+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+ movdqu XMMWORD[rdi],xmm2
+ movdqu XMMWORD[16+rdi],xmm3
+
+ movdqa xmm0,xmm5
+ movdqa xmm1,xmm5
+ pandn xmm0,XMMWORD[320+rsp]
+ movdqa xmm2,xmm5
+ pandn xmm1,XMMWORD[((320+16))+rsp]
+ movdqa xmm3,xmm5
+ pand xmm2,XMMWORD[512+rsp]
+ pand xmm3,XMMWORD[((512+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+
+ movdqa xmm0,xmm4
+ movdqa xmm1,xmm4
+ pandn xmm0,xmm2
+ movdqa xmm2,xmm4
+ pandn xmm1,xmm3
+ movdqa xmm3,xmm4
+ pand xmm2,XMMWORD[416+rsp]
+ pand xmm3,XMMWORD[((416+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu XMMWORD[48+rdi],xmm3
+
+$L$add_doneq:
+ add rsp,32*18+8
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbx
+ pop rbp
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_point_add:
+global ecp_nistz256_point_add_affine
+
+ALIGN 32
+ecp_nistz256_point_add_affine:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_ecp_nistz256_point_add_affine:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+ push rbp
+ push rbx
+ push r12
+ push r13
+ push r14
+ push r15
+ sub rsp,32*15+8
+
+ movdqu xmm0,XMMWORD[rsi]
+ mov rbx,rdx
+ movdqu xmm1,XMMWORD[16+rsi]
+ movdqu xmm2,XMMWORD[32+rsi]
+ movdqu xmm3,XMMWORD[48+rsi]
+ movdqu xmm4,XMMWORD[64+rsi]
+ movdqu xmm5,XMMWORD[80+rsi]
+ mov rax,QWORD[((64+0))+rsi]
+ mov r14,QWORD[((64+8))+rsi]
+ mov r15,QWORD[((64+16))+rsi]
+ mov r8,QWORD[((64+24))+rsi]
+ movdqa XMMWORD[320+rsp],xmm0
+ movdqa XMMWORD[(320+16)+rsp],xmm1
+ por xmm1,xmm0
+ movdqa XMMWORD[352+rsp],xmm2
+ movdqa XMMWORD[(352+16)+rsp],xmm3
+ por xmm3,xmm2
+ movdqa XMMWORD[384+rsp],xmm4
+ movdqa XMMWORD[(384+16)+rsp],xmm5
+ por xmm3,xmm1
+
+ movdqu xmm0,XMMWORD[rbx]
+ pshufd xmm5,xmm3,0xb1
+ movdqu xmm1,XMMWORD[16+rbx]
+ movdqu xmm2,XMMWORD[32+rbx]
+ por xmm5,xmm3
+ movdqu xmm3,XMMWORD[48+rbx]
+ movdqa XMMWORD[416+rsp],xmm0
+ pshufd xmm4,xmm5,0x1e
+ movdqa XMMWORD[(416+16)+rsp],xmm1
+ por xmm1,xmm0
+DB 102,72,15,110,199
+ movdqa XMMWORD[448+rsp],xmm2
+ movdqa XMMWORD[(448+16)+rsp],xmm3
+ por xmm3,xmm2
+ por xmm5,xmm4
+ pxor xmm4,xmm4
+ por xmm3,xmm1
+
+ lea rsi,[((64-0))+rsi]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_sqr_montq
+
+ pcmpeqd xmm5,xmm4
+ pshufd xmm4,xmm3,0xb1
+ mov rax,QWORD[rbx]
+
+ mov r9,r12
+ por xmm4,xmm3
+ pshufd xmm5,xmm5,0
+ pshufd xmm3,xmm4,0x1e
+ mov r10,r13
+ por xmm4,xmm3
+ pxor xmm3,xmm3
+ mov r11,r14
+ pcmpeqd xmm4,xmm3
+ pshufd xmm4,xmm4,0
+
+ lea rsi,[((32-0))+rsp]
+ mov r12,r15
+ lea rdi,[rsp]
+ call __ecp_nistz256_mul_montq
+
+ lea rbx,[320+rsp]
+ lea rdi,[64+rsp]
+ call __ecp_nistz256_sub_fromq
+
+ mov rax,QWORD[384+rsp]
+ lea rbx,[384+rsp]
+ mov r9,QWORD[((0+32))+rsp]
+ mov r10,QWORD[((8+32))+rsp]
+ lea rsi,[((0+32))+rsp]
+ mov r11,QWORD[((16+32))+rsp]
+ mov r12,QWORD[((24+32))+rsp]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[384+rsp]
+ lea rbx,[384+rsp]
+ mov r9,QWORD[((0+64))+rsp]
+ mov r10,QWORD[((8+64))+rsp]
+ lea rsi,[((0+64))+rsp]
+ mov r11,QWORD[((16+64))+rsp]
+ mov r12,QWORD[((24+64))+rsp]
+ lea rdi,[288+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[448+rsp]
+ lea rbx,[448+rsp]
+ mov r9,QWORD[((0+32))+rsp]
+ mov r10,QWORD[((8+32))+rsp]
+ lea rsi,[((0+32))+rsp]
+ mov r11,QWORD[((16+32))+rsp]
+ mov r12,QWORD[((24+32))+rsp]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_mul_montq
+
+ lea rbx,[352+rsp]
+ lea rdi,[96+rsp]
+ call __ecp_nistz256_sub_fromq
+
+ mov rax,QWORD[((0+64))+rsp]
+ mov r14,QWORD[((8+64))+rsp]
+ lea rsi,[((0+64))+rsp]
+ mov r15,QWORD[((16+64))+rsp]
+ mov r8,QWORD[((24+64))+rsp]
+ lea rdi,[128+rsp]
+ call __ecp_nistz256_sqr_montq
+
+ mov rax,QWORD[((0+96))+rsp]
+ mov r14,QWORD[((8+96))+rsp]
+ lea rsi,[((0+96))+rsp]
+ mov r15,QWORD[((16+96))+rsp]
+ mov r8,QWORD[((24+96))+rsp]
+ lea rdi,[192+rsp]
+ call __ecp_nistz256_sqr_montq
+
+ mov rax,QWORD[128+rsp]
+ lea rbx,[128+rsp]
+ mov r9,QWORD[((0+64))+rsp]
+ mov r10,QWORD[((8+64))+rsp]
+ lea rsi,[((0+64))+rsp]
+ mov r11,QWORD[((16+64))+rsp]
+ mov r12,QWORD[((24+64))+rsp]
+ lea rdi,[160+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[320+rsp]
+ lea rbx,[320+rsp]
+ mov r9,QWORD[((0+128))+rsp]
+ mov r10,QWORD[((8+128))+rsp]
+ lea rsi,[((0+128))+rsp]
+ mov r11,QWORD[((16+128))+rsp]
+ mov r12,QWORD[((24+128))+rsp]
+ lea rdi,[rsp]
+ call __ecp_nistz256_mul_montq
+
+
+
+
+ add r12,r12
+ lea rsi,[192+rsp]
+ adc r13,r13
+ mov rax,r12
+ adc r8,r8
+ adc r9,r9
+ mov rbp,r13
+ sbb r11,r11
+
+ sub r12,-1
+ mov rcx,r8
+ sbb r13,r14
+ sbb r8,0
+ mov r10,r9
+ sbb r9,r15
+ test r11,r11
+
+ cmovz r12,rax
+ mov rax,QWORD[rsi]
+ cmovz r13,rbp
+ mov rbp,QWORD[8+rsi]
+ cmovz r8,rcx
+ mov rcx,QWORD[16+rsi]
+ cmovz r9,r10
+ mov r10,QWORD[24+rsi]
+
+ call __ecp_nistz256_subq
+
+ lea rbx,[160+rsp]
+ lea rdi,[224+rsp]
+ call __ecp_nistz256_sub_fromq
+
+ mov rax,QWORD[((0+0))+rsp]
+ mov rbp,QWORD[((0+8))+rsp]
+ mov rcx,QWORD[((0+16))+rsp]
+ mov r10,QWORD[((0+24))+rsp]
+ lea rdi,[64+rsp]
+
+ call __ecp_nistz256_subq
+
+ mov QWORD[rdi],r12
+ mov QWORD[8+rdi],r13
+ mov QWORD[16+rdi],r8
+ mov QWORD[24+rdi],r9
+ mov rax,QWORD[352+rsp]
+ lea rbx,[352+rsp]
+ mov r9,QWORD[((0+160))+rsp]
+ mov r10,QWORD[((8+160))+rsp]
+ lea rsi,[((0+160))+rsp]
+ mov r11,QWORD[((16+160))+rsp]
+ mov r12,QWORD[((24+160))+rsp]
+ lea rdi,[32+rsp]
+ call __ecp_nistz256_mul_montq
+
+ mov rax,QWORD[96+rsp]
+ lea rbx,[96+rsp]
+ mov r9,QWORD[((0+64))+rsp]
+ mov r10,QWORD[((8+64))+rsp]
+ lea rsi,[((0+64))+rsp]
+ mov r11,QWORD[((16+64))+rsp]
+ mov r12,QWORD[((24+64))+rsp]
+ lea rdi,[64+rsp]
+ call __ecp_nistz256_mul_montq
+
+ lea rbx,[32+rsp]
+ lea rdi,[256+rsp]
+ call __ecp_nistz256_sub_fromq
+
+DB 102,72,15,126,199
+
+ movdqa xmm0,xmm5
+ movdqa xmm1,xmm5
+ pandn xmm0,XMMWORD[288+rsp]
+ movdqa xmm2,xmm5
+ pandn xmm1,XMMWORD[((288+16))+rsp]
+ movdqa xmm3,xmm5
+ pand xmm2,XMMWORD[$L$ONE_mont]
+ pand xmm3,XMMWORD[(($L$ONE_mont+16))]
+ por xmm2,xmm0
+ por xmm3,xmm1
+
+ movdqa xmm0,xmm4
+ movdqa xmm1,xmm4
+ pandn xmm0,xmm2
+ movdqa xmm2,xmm4
+ pandn xmm1,xmm3
+ movdqa xmm3,xmm4
+ pand xmm2,XMMWORD[384+rsp]
+ pand xmm3,XMMWORD[((384+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+ movdqu XMMWORD[64+rdi],xmm2
+ movdqu XMMWORD[80+rdi],xmm3
+
+ movdqa xmm0,xmm5
+ movdqa xmm1,xmm5
+ pandn xmm0,XMMWORD[224+rsp]
+ movdqa xmm2,xmm5
+ pandn xmm1,XMMWORD[((224+16))+rsp]
+ movdqa xmm3,xmm5
+ pand xmm2,XMMWORD[416+rsp]
+ pand xmm3,XMMWORD[((416+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+
+ movdqa xmm0,xmm4
+ movdqa xmm1,xmm4
+ pandn xmm0,xmm2
+ movdqa xmm2,xmm4
+ pandn xmm1,xmm3
+ movdqa xmm3,xmm4
+ pand xmm2,XMMWORD[320+rsp]
+ pand xmm3,XMMWORD[((320+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+ movdqu XMMWORD[rdi],xmm2
+ movdqu XMMWORD[16+rdi],xmm3
+
+ movdqa xmm0,xmm5
+ movdqa xmm1,xmm5
+ pandn xmm0,XMMWORD[256+rsp]
+ movdqa xmm2,xmm5
+ pandn xmm1,XMMWORD[((256+16))+rsp]
+ movdqa xmm3,xmm5
+ pand xmm2,XMMWORD[448+rsp]
+ pand xmm3,XMMWORD[((448+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+
+ movdqa xmm0,xmm4
+ movdqa xmm1,xmm4
+ pandn xmm0,xmm2
+ movdqa xmm2,xmm4
+ pandn xmm1,xmm3
+ movdqa xmm3,xmm4
+ pand xmm2,XMMWORD[352+rsp]
+ pand xmm3,XMMWORD[((352+16))+rsp]
+ por xmm2,xmm0
+ por xmm3,xmm1
+ movdqu XMMWORD[32+rdi],xmm2
+ movdqu XMMWORD[48+rdi],xmm3
+
+ add rsp,32*15+8
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbx
+ pop rbp
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_ecp_nistz256_point_add_affine:
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 f1ea965..0000000
--- 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/sha/sha1-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/sha/sha1-x86_64.asm
index 0f5361a..168f78d 100644
--- 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
@@ -24,6 +24,11 @@
mov r10d,DWORD[((OPENSSL_ia32cap_P+8))]
test r8d,512
jz NEAR $L$ialu
+ and r8d,268435456
+ and r9d,1073741824
+ or r8d,r9d
+ cmp r8d,1342177280
+ je NEAR _avx_shortcut
jmp NEAR _ssse3_shortcut
ALIGN 16
@@ -2445,6 +2450,1146 @@
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_sha1_block_data_order_ssse3:
+
+ALIGN 16
+sha1_block_data_order_avx:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha1_block_data_order_avx:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+_avx_shortcut:
+ mov rax,rsp
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ lea rsp,[((-160))+rsp]
+ vzeroupper
+ vmovaps XMMWORD[(-40-96)+rax],xmm6
+ vmovaps XMMWORD[(-40-80)+rax],xmm7
+ vmovaps XMMWORD[(-40-64)+rax],xmm8
+ vmovaps XMMWORD[(-40-48)+rax],xmm9
+ vmovaps XMMWORD[(-40-32)+rax],xmm10
+ vmovaps XMMWORD[(-40-16)+rax],xmm11
+$L$prologue_avx:
+ 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
+
+ vmovdqa xmm6,XMMWORD[64+r11]
+ vmovdqa xmm11,XMMWORD[((-64))+r11]
+ vmovdqu xmm0,XMMWORD[r9]
+ vmovdqu xmm1,XMMWORD[16+r9]
+ vmovdqu xmm2,XMMWORD[32+r9]
+ vmovdqu xmm3,XMMWORD[48+r9]
+ vpshufb xmm0,xmm0,xmm6
+ add r9,64
+ vpshufb xmm1,xmm1,xmm6
+ vpshufb xmm2,xmm2,xmm6
+ vpshufb xmm3,xmm3,xmm6
+ vpaddd xmm4,xmm0,xmm11
+ vpaddd xmm5,xmm1,xmm11
+ vpaddd xmm6,xmm2,xmm11
+ vmovdqa XMMWORD[rsp],xmm4
+ vmovdqa XMMWORD[16+rsp],xmm5
+ vmovdqa XMMWORD[32+rsp],xmm6
+ jmp NEAR $L$oop_avx
+ALIGN 16
+$L$oop_avx:
+ shrd ebx,ebx,2
+ xor esi,edx
+ vpalignr xmm4,xmm1,xmm0,8
+ mov edi,eax
+ add ebp,DWORD[rsp]
+ vpaddd xmm9,xmm11,xmm3
+ xor ebx,ecx
+ shld eax,eax,5
+ vpsrldq xmm8,xmm3,4
+ add ebp,esi
+ and edi,ebx
+ vpxor xmm4,xmm4,xmm0
+ xor ebx,ecx
+ add ebp,eax
+ vpxor xmm8,xmm8,xmm2
+ shrd eax,eax,7
+ xor edi,ecx
+ mov esi,ebp
+ add edx,DWORD[4+rsp]
+ vpxor xmm4,xmm4,xmm8
+ xor eax,ebx
+ shld ebp,ebp,5
+ vmovdqa XMMWORD[48+rsp],xmm9
+ add edx,edi
+ and esi,eax
+ vpsrld xmm8,xmm4,31
+ xor eax,ebx
+ add edx,ebp
+ shrd ebp,ebp,7
+ xor esi,ebx
+ vpslldq xmm10,xmm4,12
+ vpaddd xmm4,xmm4,xmm4
+ mov edi,edx
+ add ecx,DWORD[8+rsp]
+ xor ebp,eax
+ shld edx,edx,5
+ vpsrld xmm9,xmm10,30
+ vpor xmm4,xmm4,xmm8
+ add ecx,esi
+ and edi,ebp
+ xor ebp,eax
+ add ecx,edx
+ vpslld xmm10,xmm10,2
+ vpxor xmm4,xmm4,xmm9
+ shrd edx,edx,7
+ xor edi,eax
+ mov esi,ecx
+ add ebx,DWORD[12+rsp]
+ vpxor xmm4,xmm4,xmm10
+ xor edx,ebp
+ shld ecx,ecx,5
+ add ebx,edi
+ and esi,edx
+ xor edx,ebp
+ add ebx,ecx
+ shrd ecx,ecx,7
+ xor esi,ebp
+ vpalignr xmm5,xmm2,xmm1,8
+ mov edi,ebx
+ add eax,DWORD[16+rsp]
+ vpaddd xmm9,xmm11,xmm4
+ xor ecx,edx
+ shld ebx,ebx,5
+ vpsrldq xmm8,xmm4,4
+ add eax,esi
+ and edi,ecx
+ vpxor xmm5,xmm5,xmm1
+ xor ecx,edx
+ add eax,ebx
+ vpxor xmm8,xmm8,xmm3
+ shrd ebx,ebx,7
+ xor edi,edx
+ mov esi,eax
+ add ebp,DWORD[20+rsp]
+ vpxor xmm5,xmm5,xmm8
+ xor ebx,ecx
+ shld eax,eax,5
+ vmovdqa XMMWORD[rsp],xmm9
+ add ebp,edi
+ and esi,ebx
+ vpsrld xmm8,xmm5,31
+ xor ebx,ecx
+ add ebp,eax
+ shrd eax,eax,7
+ xor esi,ecx
+ vpslldq xmm10,xmm5,12
+ vpaddd xmm5,xmm5,xmm5
+ mov edi,ebp
+ add edx,DWORD[24+rsp]
+ xor eax,ebx
+ shld ebp,ebp,5
+ vpsrld xmm9,xmm10,30
+ vpor xmm5,xmm5,xmm8
+ add edx,esi
+ and edi,eax
+ xor eax,ebx
+ add edx,ebp
+ vpslld xmm10,xmm10,2
+ vpxor xmm5,xmm5,xmm9
+ shrd ebp,ebp,7
+ xor edi,ebx
+ mov esi,edx
+ add ecx,DWORD[28+rsp]
+ vpxor xmm5,xmm5,xmm10
+ xor ebp,eax
+ shld edx,edx,5
+ vmovdqa xmm11,XMMWORD[((-32))+r11]
+ add ecx,edi
+ and esi,ebp
+ xor ebp,eax
+ add ecx,edx
+ shrd edx,edx,7
+ xor esi,eax
+ vpalignr xmm6,xmm3,xmm2,8
+ mov edi,ecx
+ add ebx,DWORD[32+rsp]
+ vpaddd xmm9,xmm11,xmm5
+ xor edx,ebp
+ shld ecx,ecx,5
+ vpsrldq xmm8,xmm5,4
+ add ebx,esi
+ and edi,edx
+ vpxor xmm6,xmm6,xmm2
+ xor edx,ebp
+ add ebx,ecx
+ vpxor xmm8,xmm8,xmm4
+ shrd ecx,ecx,7
+ xor edi,ebp
+ mov esi,ebx
+ add eax,DWORD[36+rsp]
+ vpxor xmm6,xmm6,xmm8
+ xor ecx,edx
+ shld ebx,ebx,5
+ vmovdqa XMMWORD[16+rsp],xmm9
+ add eax,edi
+ and esi,ecx
+ vpsrld xmm8,xmm6,31
+ xor ecx,edx
+ add eax,ebx
+ shrd ebx,ebx,7
+ xor esi,edx
+ vpslldq xmm10,xmm6,12
+ vpaddd xmm6,xmm6,xmm6
+ mov edi,eax
+ add ebp,DWORD[40+rsp]
+ xor ebx,ecx
+ shld eax,eax,5
+ vpsrld xmm9,xmm10,30
+ vpor xmm6,xmm6,xmm8
+ add ebp,esi
+ and edi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ vpslld xmm10,xmm10,2
+ vpxor xmm6,xmm6,xmm9
+ shrd eax,eax,7
+ xor edi,ecx
+ mov esi,ebp
+ add edx,DWORD[44+rsp]
+ vpxor xmm6,xmm6,xmm10
+ xor eax,ebx
+ shld ebp,ebp,5
+ add edx,edi
+ and esi,eax
+ xor eax,ebx
+ add edx,ebp
+ shrd ebp,ebp,7
+ xor esi,ebx
+ vpalignr xmm7,xmm4,xmm3,8
+ mov edi,edx
+ add ecx,DWORD[48+rsp]
+ vpaddd xmm9,xmm11,xmm6
+ xor ebp,eax
+ shld edx,edx,5
+ vpsrldq xmm8,xmm6,4
+ add ecx,esi
+ and edi,ebp
+ vpxor xmm7,xmm7,xmm3
+ xor ebp,eax
+ add ecx,edx
+ vpxor xmm8,xmm8,xmm5
+ shrd edx,edx,7
+ xor edi,eax
+ mov esi,ecx
+ add ebx,DWORD[52+rsp]
+ vpxor xmm7,xmm7,xmm8
+ xor edx,ebp
+ shld ecx,ecx,5
+ vmovdqa XMMWORD[32+rsp],xmm9
+ add ebx,edi
+ and esi,edx
+ vpsrld xmm8,xmm7,31
+ xor edx,ebp
+ add ebx,ecx
+ shrd ecx,ecx,7
+ xor esi,ebp
+ vpslldq xmm10,xmm7,12
+ vpaddd xmm7,xmm7,xmm7
+ mov edi,ebx
+ add eax,DWORD[56+rsp]
+ xor ecx,edx
+ shld ebx,ebx,5
+ vpsrld xmm9,xmm10,30
+ vpor xmm7,xmm7,xmm8
+ add eax,esi
+ and edi,ecx
+ xor ecx,edx
+ add eax,ebx
+ vpslld xmm10,xmm10,2
+ vpxor xmm7,xmm7,xmm9
+ shrd ebx,ebx,7
+ xor edi,edx
+ mov esi,eax
+ add ebp,DWORD[60+rsp]
+ vpxor xmm7,xmm7,xmm10
+ xor ebx,ecx
+ shld eax,eax,5
+ add ebp,edi
+ and esi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ vpalignr xmm8,xmm7,xmm6,8
+ vpxor xmm0,xmm0,xmm4
+ shrd eax,eax,7
+ xor esi,ecx
+ mov edi,ebp
+ add edx,DWORD[rsp]
+ vpxor xmm0,xmm0,xmm1
+ xor eax,ebx
+ shld ebp,ebp,5
+ vpaddd xmm9,xmm11,xmm7
+ add edx,esi
+ and edi,eax
+ vpxor xmm0,xmm0,xmm8
+ xor eax,ebx
+ add edx,ebp
+ shrd ebp,ebp,7
+ xor edi,ebx
+ vpsrld xmm8,xmm0,30
+ vmovdqa XMMWORD[48+rsp],xmm9
+ mov esi,edx
+ add ecx,DWORD[4+rsp]
+ xor ebp,eax
+ shld edx,edx,5
+ vpslld xmm0,xmm0,2
+ add ecx,edi
+ and esi,ebp
+ xor ebp,eax
+ add ecx,edx
+ shrd edx,edx,7
+ xor esi,eax
+ mov edi,ecx
+ add ebx,DWORD[8+rsp]
+ vpor xmm0,xmm0,xmm8
+ xor edx,ebp
+ shld ecx,ecx,5
+ add ebx,esi
+ and edi,edx
+ xor edx,ebp
+ add ebx,ecx
+ add eax,DWORD[12+rsp]
+ xor edi,ebp
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,edi
+ xor esi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ vpalignr xmm8,xmm0,xmm7,8
+ vpxor xmm1,xmm1,xmm5
+ add ebp,DWORD[16+rsp]
+ xor esi,ecx
+ mov edi,eax
+ shld eax,eax,5
+ vpxor xmm1,xmm1,xmm2
+ add ebp,esi
+ xor edi,ecx
+ vpaddd xmm9,xmm11,xmm0
+ shrd ebx,ebx,7
+ add ebp,eax
+ vpxor xmm1,xmm1,xmm8
+ add edx,DWORD[20+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ shld ebp,ebp,5
+ vpsrld xmm8,xmm1,30
+ vmovdqa XMMWORD[rsp],xmm9
+ add edx,edi
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ vpslld xmm1,xmm1,2
+ add ecx,DWORD[24+rsp]
+ xor esi,eax
+ mov edi,edx
+ shld edx,edx,5
+ add ecx,esi
+ xor edi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ vpor xmm1,xmm1,xmm8
+ add ebx,DWORD[28+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ shld ecx,ecx,5
+ add ebx,edi
+ xor esi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ vpalignr xmm8,xmm1,xmm0,8
+ vpxor xmm2,xmm2,xmm6
+ add eax,DWORD[32+rsp]
+ xor esi,edx
+ mov edi,ebx
+ shld ebx,ebx,5
+ vpxor xmm2,xmm2,xmm3
+ add eax,esi
+ xor edi,edx
+ vpaddd xmm9,xmm11,xmm1
+ vmovdqa xmm11,XMMWORD[r11]
+ shrd ecx,ecx,7
+ add eax,ebx
+ vpxor xmm2,xmm2,xmm8
+ add ebp,DWORD[36+rsp]
+ xor edi,ecx
+ mov esi,eax
+ shld eax,eax,5
+ vpsrld xmm8,xmm2,30
+ vmovdqa XMMWORD[16+rsp],xmm9
+ add ebp,edi
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add ebp,eax
+ vpslld xmm2,xmm2,2
+ add edx,DWORD[40+rsp]
+ xor esi,ebx
+ mov edi,ebp
+ shld ebp,ebp,5
+ add edx,esi
+ xor edi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ vpor xmm2,xmm2,xmm8
+ add ecx,DWORD[44+rsp]
+ xor edi,eax
+ mov esi,edx
+ shld edx,edx,5
+ add ecx,edi
+ xor esi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ vpalignr xmm8,xmm2,xmm1,8
+ vpxor xmm3,xmm3,xmm7
+ add ebx,DWORD[48+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ shld ecx,ecx,5
+ vpxor xmm3,xmm3,xmm4
+ add ebx,esi
+ xor edi,ebp
+ vpaddd xmm9,xmm11,xmm2
+ shrd edx,edx,7
+ add ebx,ecx
+ vpxor xmm3,xmm3,xmm8
+ add eax,DWORD[52+rsp]
+ xor edi,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ vpsrld xmm8,xmm3,30
+ vmovdqa XMMWORD[32+rsp],xmm9
+ add eax,edi
+ xor esi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ vpslld xmm3,xmm3,2
+ add ebp,DWORD[56+rsp]
+ xor esi,ecx
+ mov edi,eax
+ shld eax,eax,5
+ add ebp,esi
+ xor edi,ecx
+ shrd ebx,ebx,7
+ add ebp,eax
+ vpor xmm3,xmm3,xmm8
+ add edx,DWORD[60+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ shld ebp,ebp,5
+ add edx,edi
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ vpalignr xmm8,xmm3,xmm2,8
+ vpxor xmm4,xmm4,xmm0
+ add ecx,DWORD[rsp]
+ xor esi,eax
+ mov edi,edx
+ shld edx,edx,5
+ vpxor xmm4,xmm4,xmm5
+ add ecx,esi
+ xor edi,eax
+ vpaddd xmm9,xmm11,xmm3
+ shrd ebp,ebp,7
+ add ecx,edx
+ vpxor xmm4,xmm4,xmm8
+ add ebx,DWORD[4+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ shld ecx,ecx,5
+ vpsrld xmm8,xmm4,30
+ vmovdqa XMMWORD[48+rsp],xmm9
+ add ebx,edi
+ xor esi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ vpslld xmm4,xmm4,2
+ add eax,DWORD[8+rsp]
+ xor esi,edx
+ mov edi,ebx
+ shld ebx,ebx,5
+ add eax,esi
+ xor edi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ vpor xmm4,xmm4,xmm8
+ add ebp,DWORD[12+rsp]
+ xor edi,ecx
+ mov esi,eax
+ shld eax,eax,5
+ add ebp,edi
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add ebp,eax
+ vpalignr xmm8,xmm4,xmm3,8
+ vpxor xmm5,xmm5,xmm1
+ add edx,DWORD[16+rsp]
+ xor esi,ebx
+ mov edi,ebp
+ shld ebp,ebp,5
+ vpxor xmm5,xmm5,xmm6
+ add edx,esi
+ xor edi,ebx
+ vpaddd xmm9,xmm11,xmm4
+ shrd eax,eax,7
+ add edx,ebp
+ vpxor xmm5,xmm5,xmm8
+ add ecx,DWORD[20+rsp]
+ xor edi,eax
+ mov esi,edx
+ shld edx,edx,5
+ vpsrld xmm8,xmm5,30
+ vmovdqa XMMWORD[rsp],xmm9
+ add ecx,edi
+ xor esi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ vpslld xmm5,xmm5,2
+ add ebx,DWORD[24+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ shld ecx,ecx,5
+ add ebx,esi
+ xor edi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ vpor xmm5,xmm5,xmm8
+ add eax,DWORD[28+rsp]
+ shrd ecx,ecx,7
+ mov esi,ebx
+ xor edi,edx
+ shld ebx,ebx,5
+ add eax,edi
+ xor esi,ecx
+ xor ecx,edx
+ add eax,ebx
+ vpalignr xmm8,xmm5,xmm4,8
+ vpxor xmm6,xmm6,xmm2
+ add ebp,DWORD[32+rsp]
+ and esi,ecx
+ xor ecx,edx
+ shrd ebx,ebx,7
+ vpxor xmm6,xmm6,xmm7
+ mov edi,eax
+ xor esi,ecx
+ vpaddd xmm9,xmm11,xmm5
+ shld eax,eax,5
+ add ebp,esi
+ vpxor xmm6,xmm6,xmm8
+ xor edi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ add edx,DWORD[36+rsp]
+ vpsrld xmm8,xmm6,30
+ vmovdqa XMMWORD[16+rsp],xmm9
+ and edi,ebx
+ xor ebx,ecx
+ shrd eax,eax,7
+ mov esi,ebp
+ vpslld xmm6,xmm6,2
+ xor edi,ebx
+ shld ebp,ebp,5
+ add edx,edi
+ xor esi,eax
+ xor eax,ebx
+ add edx,ebp
+ add ecx,DWORD[40+rsp]
+ and esi,eax
+ vpor xmm6,xmm6,xmm8
+ xor eax,ebx
+ shrd ebp,ebp,7
+ mov edi,edx
+ xor esi,eax
+ shld edx,edx,5
+ add ecx,esi
+ xor edi,ebp
+ xor ebp,eax
+ add ecx,edx
+ add ebx,DWORD[44+rsp]
+ and edi,ebp
+ xor ebp,eax
+ shrd edx,edx,7
+ mov esi,ecx
+ xor edi,ebp
+ shld ecx,ecx,5
+ add ebx,edi
+ xor esi,edx
+ xor edx,ebp
+ add ebx,ecx
+ vpalignr xmm8,xmm6,xmm5,8
+ vpxor xmm7,xmm7,xmm3
+ add eax,DWORD[48+rsp]
+ and esi,edx
+ xor edx,ebp
+ shrd ecx,ecx,7
+ vpxor xmm7,xmm7,xmm0
+ mov edi,ebx
+ xor esi,edx
+ vpaddd xmm9,xmm11,xmm6
+ vmovdqa xmm11,XMMWORD[32+r11]
+ shld ebx,ebx,5
+ add eax,esi
+ vpxor xmm7,xmm7,xmm8
+ xor edi,ecx
+ xor ecx,edx
+ add eax,ebx
+ add ebp,DWORD[52+rsp]
+ vpsrld xmm8,xmm7,30
+ vmovdqa XMMWORD[32+rsp],xmm9
+ and edi,ecx
+ xor ecx,edx
+ shrd ebx,ebx,7
+ mov esi,eax
+ vpslld xmm7,xmm7,2
+ xor edi,ecx
+ shld eax,eax,5
+ add ebp,edi
+ xor esi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ add edx,DWORD[56+rsp]
+ and esi,ebx
+ vpor xmm7,xmm7,xmm8
+ xor ebx,ecx
+ shrd eax,eax,7
+ mov edi,ebp
+ xor esi,ebx
+ shld ebp,ebp,5
+ add edx,esi
+ xor edi,eax
+ xor eax,ebx
+ add edx,ebp
+ add ecx,DWORD[60+rsp]
+ and edi,eax
+ xor eax,ebx
+ shrd ebp,ebp,7
+ mov esi,edx
+ xor edi,eax
+ shld edx,edx,5
+ add ecx,edi
+ xor esi,ebp
+ xor ebp,eax
+ add ecx,edx
+ vpalignr xmm8,xmm7,xmm6,8
+ vpxor xmm0,xmm0,xmm4
+ add ebx,DWORD[rsp]
+ and esi,ebp
+ xor ebp,eax
+ shrd edx,edx,7
+ vpxor xmm0,xmm0,xmm1
+ mov edi,ecx
+ xor esi,ebp
+ vpaddd xmm9,xmm11,xmm7
+ shld ecx,ecx,5
+ add ebx,esi
+ vpxor xmm0,xmm0,xmm8
+ xor edi,edx
+ xor edx,ebp
+ add ebx,ecx
+ add eax,DWORD[4+rsp]
+ vpsrld xmm8,xmm0,30
+ vmovdqa XMMWORD[48+rsp],xmm9
+ and edi,edx
+ xor edx,ebp
+ shrd ecx,ecx,7
+ mov esi,ebx
+ vpslld xmm0,xmm0,2
+ xor edi,edx
+ shld ebx,ebx,5
+ add eax,edi
+ xor esi,ecx
+ xor ecx,edx
+ add eax,ebx
+ add ebp,DWORD[8+rsp]
+ and esi,ecx
+ vpor xmm0,xmm0,xmm8
+ xor ecx,edx
+ shrd ebx,ebx,7
+ mov edi,eax
+ xor esi,ecx
+ shld eax,eax,5
+ add ebp,esi
+ xor edi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ add edx,DWORD[12+rsp]
+ and edi,ebx
+ xor ebx,ecx
+ shrd eax,eax,7
+ mov esi,ebp
+ xor edi,ebx
+ shld ebp,ebp,5
+ add edx,edi
+ xor esi,eax
+ xor eax,ebx
+ add edx,ebp
+ vpalignr xmm8,xmm0,xmm7,8
+ vpxor xmm1,xmm1,xmm5
+ add ecx,DWORD[16+rsp]
+ and esi,eax
+ xor eax,ebx
+ shrd ebp,ebp,7
+ vpxor xmm1,xmm1,xmm2
+ mov edi,edx
+ xor esi,eax
+ vpaddd xmm9,xmm11,xmm0
+ shld edx,edx,5
+ add ecx,esi
+ vpxor xmm1,xmm1,xmm8
+ xor edi,ebp
+ xor ebp,eax
+ add ecx,edx
+ add ebx,DWORD[20+rsp]
+ vpsrld xmm8,xmm1,30
+ vmovdqa XMMWORD[rsp],xmm9
+ and edi,ebp
+ xor ebp,eax
+ shrd edx,edx,7
+ mov esi,ecx
+ vpslld xmm1,xmm1,2
+ xor edi,ebp
+ shld ecx,ecx,5
+ add ebx,edi
+ xor esi,edx
+ xor edx,ebp
+ add ebx,ecx
+ add eax,DWORD[24+rsp]
+ and esi,edx
+ vpor xmm1,xmm1,xmm8
+ xor edx,ebp
+ shrd ecx,ecx,7
+ mov edi,ebx
+ xor esi,edx
+ shld ebx,ebx,5
+ add eax,esi
+ xor edi,ecx
+ xor ecx,edx
+ add eax,ebx
+ add ebp,DWORD[28+rsp]
+ and edi,ecx
+ xor ecx,edx
+ shrd ebx,ebx,7
+ mov esi,eax
+ xor edi,ecx
+ shld eax,eax,5
+ add ebp,edi
+ xor esi,ebx
+ xor ebx,ecx
+ add ebp,eax
+ vpalignr xmm8,xmm1,xmm0,8
+ vpxor xmm2,xmm2,xmm6
+ add edx,DWORD[32+rsp]
+ and esi,ebx
+ xor ebx,ecx
+ shrd eax,eax,7
+ vpxor xmm2,xmm2,xmm3
+ mov edi,ebp
+ xor esi,ebx
+ vpaddd xmm9,xmm11,xmm1
+ shld ebp,ebp,5
+ add edx,esi
+ vpxor xmm2,xmm2,xmm8
+ xor edi,eax
+ xor eax,ebx
+ add edx,ebp
+ add ecx,DWORD[36+rsp]
+ vpsrld xmm8,xmm2,30
+ vmovdqa XMMWORD[16+rsp],xmm9
+ and edi,eax
+ xor eax,ebx
+ shrd ebp,ebp,7
+ mov esi,edx
+ vpslld xmm2,xmm2,2
+ xor edi,eax
+ shld edx,edx,5
+ add ecx,edi
+ xor esi,ebp
+ xor ebp,eax
+ add ecx,edx
+ add ebx,DWORD[40+rsp]
+ and esi,ebp
+ vpor xmm2,xmm2,xmm8
+ xor ebp,eax
+ shrd edx,edx,7
+ mov edi,ecx
+ xor esi,ebp
+ shld ecx,ecx,5
+ add ebx,esi
+ xor edi,edx
+ xor edx,ebp
+ add ebx,ecx
+ add eax,DWORD[44+rsp]
+ and edi,edx
+ xor edx,ebp
+ shrd ecx,ecx,7
+ mov esi,ebx
+ xor edi,edx
+ shld ebx,ebx,5
+ add eax,edi
+ xor esi,edx
+ add eax,ebx
+ vpalignr xmm8,xmm2,xmm1,8
+ vpxor xmm3,xmm3,xmm7
+ add ebp,DWORD[48+rsp]
+ xor esi,ecx
+ mov edi,eax
+ shld eax,eax,5
+ vpxor xmm3,xmm3,xmm4
+ add ebp,esi
+ xor edi,ecx
+ vpaddd xmm9,xmm11,xmm2
+ shrd ebx,ebx,7
+ add ebp,eax
+ vpxor xmm3,xmm3,xmm8
+ add edx,DWORD[52+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ shld ebp,ebp,5
+ vpsrld xmm8,xmm3,30
+ vmovdqa XMMWORD[32+rsp],xmm9
+ add edx,edi
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ vpslld xmm3,xmm3,2
+ add ecx,DWORD[56+rsp]
+ xor esi,eax
+ mov edi,edx
+ shld edx,edx,5
+ add ecx,esi
+ xor edi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ vpor xmm3,xmm3,xmm8
+ add ebx,DWORD[60+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ shld ecx,ecx,5
+ add ebx,edi
+ xor esi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD[rsp]
+ vpaddd xmm9,xmm11,xmm3
+ xor esi,edx
+ mov edi,ebx
+ shld ebx,ebx,5
+ add eax,esi
+ vmovdqa XMMWORD[48+rsp],xmm9
+ xor edi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add ebp,DWORD[4+rsp]
+ xor edi,ecx
+ mov esi,eax
+ shld eax,eax,5
+ add ebp,edi
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add ebp,eax
+ add edx,DWORD[8+rsp]
+ xor esi,ebx
+ mov edi,ebp
+ shld ebp,ebp,5
+ add edx,esi
+ xor edi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ add ecx,DWORD[12+rsp]
+ xor edi,eax
+ mov esi,edx
+ shld edx,edx,5
+ add ecx,edi
+ xor esi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ cmp r9,r10
+ je NEAR $L$done_avx
+ vmovdqa xmm6,XMMWORD[64+r11]
+ vmovdqa xmm11,XMMWORD[((-64))+r11]
+ vmovdqu xmm0,XMMWORD[r9]
+ vmovdqu xmm1,XMMWORD[16+r9]
+ vmovdqu xmm2,XMMWORD[32+r9]
+ vmovdqu xmm3,XMMWORD[48+r9]
+ vpshufb xmm0,xmm0,xmm6
+ add r9,64
+ add ebx,DWORD[16+rsp]
+ xor esi,ebp
+ vpshufb xmm1,xmm1,xmm6
+ mov edi,ecx
+ shld ecx,ecx,5
+ vpaddd xmm4,xmm0,xmm11
+ add ebx,esi
+ xor edi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ vmovdqa XMMWORD[rsp],xmm4
+ add eax,DWORD[20+rsp]
+ xor edi,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,edi
+ xor esi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add ebp,DWORD[24+rsp]
+ xor esi,ecx
+ mov edi,eax
+ shld eax,eax,5
+ add ebp,esi
+ xor edi,ecx
+ shrd ebx,ebx,7
+ add ebp,eax
+ add edx,DWORD[28+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ shld ebp,ebp,5
+ add edx,edi
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ add ecx,DWORD[32+rsp]
+ xor esi,eax
+ vpshufb xmm2,xmm2,xmm6
+ mov edi,edx
+ shld edx,edx,5
+ vpaddd xmm5,xmm1,xmm11
+ add ecx,esi
+ xor edi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ vmovdqa XMMWORD[16+rsp],xmm5
+ add ebx,DWORD[36+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ shld ecx,ecx,5
+ add ebx,edi
+ xor esi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD[40+rsp]
+ xor esi,edx
+ mov edi,ebx
+ shld ebx,ebx,5
+ add eax,esi
+ xor edi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add ebp,DWORD[44+rsp]
+ xor edi,ecx
+ mov esi,eax
+ shld eax,eax,5
+ add ebp,edi
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add ebp,eax
+ add edx,DWORD[48+rsp]
+ xor esi,ebx
+ vpshufb xmm3,xmm3,xmm6
+ mov edi,ebp
+ shld ebp,ebp,5
+ vpaddd xmm6,xmm2,xmm11
+ add edx,esi
+ xor edi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ vmovdqa XMMWORD[32+rsp],xmm6
+ add ecx,DWORD[52+rsp]
+ xor edi,eax
+ mov esi,edx
+ shld edx,edx,5
+ add ecx,edi
+ xor esi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ add ebx,DWORD[56+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ shld ecx,ecx,5
+ add ebx,esi
+ xor edi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD[60+rsp]
+ xor edi,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,edi
+ shrd ecx,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_avx
+
+ALIGN 16
+$L$done_avx:
+ add ebx,DWORD[16+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ shld ecx,ecx,5
+ add ebx,esi
+ xor edi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD[20+rsp]
+ xor edi,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,edi
+ xor esi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add ebp,DWORD[24+rsp]
+ xor esi,ecx
+ mov edi,eax
+ shld eax,eax,5
+ add ebp,esi
+ xor edi,ecx
+ shrd ebx,ebx,7
+ add ebp,eax
+ add edx,DWORD[28+rsp]
+ xor edi,ebx
+ mov esi,ebp
+ shld ebp,ebp,5
+ add edx,edi
+ xor esi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ add ecx,DWORD[32+rsp]
+ xor esi,eax
+ mov edi,edx
+ shld edx,edx,5
+ add ecx,esi
+ xor edi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ add ebx,DWORD[36+rsp]
+ xor edi,ebp
+ mov esi,ecx
+ shld ecx,ecx,5
+ add ebx,edi
+ xor esi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD[40+rsp]
+ xor esi,edx
+ mov edi,ebx
+ shld ebx,ebx,5
+ add eax,esi
+ xor edi,edx
+ shrd ecx,ecx,7
+ add eax,ebx
+ add ebp,DWORD[44+rsp]
+ xor edi,ecx
+ mov esi,eax
+ shld eax,eax,5
+ add ebp,edi
+ xor esi,ecx
+ shrd ebx,ebx,7
+ add ebp,eax
+ add edx,DWORD[48+rsp]
+ xor esi,ebx
+ mov edi,ebp
+ shld ebp,ebp,5
+ add edx,esi
+ xor edi,ebx
+ shrd eax,eax,7
+ add edx,ebp
+ add ecx,DWORD[52+rsp]
+ xor edi,eax
+ mov esi,edx
+ shld edx,edx,5
+ add ecx,edi
+ xor esi,eax
+ shrd ebp,ebp,7
+ add ecx,edx
+ add ebx,DWORD[56+rsp]
+ xor esi,ebp
+ mov edi,ecx
+ shld ecx,ecx,5
+ add ebx,esi
+ xor edi,ebp
+ shrd edx,edx,7
+ add ebx,ecx
+ add eax,DWORD[60+rsp]
+ xor edi,edx
+ mov esi,ebx
+ shld ebx,ebx,5
+ add eax,edi
+ shrd ecx,ecx,7
+ add eax,ebx
+ vzeroupper
+
+ 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_avx:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_sha1_block_data_order_avx:
ALIGN 64
K_XX_XX:
DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999
@@ -2605,6 +3750,9 @@
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
+ DD $L$SEH_begin_sha1_block_data_order_avx wrt ..imagebase
+ DD $L$SEH_end_sha1_block_data_order_avx wrt ..imagebase
+ DD $L$SEH_info_sha1_block_data_order_avx wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
$L$SEH_info_sha1_block_data_order:
@@ -2614,3 +3762,7 @@
DB 9,0,0,0
DD ssse3_handler wrt ..imagebase
DD $L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
+$L$SEH_info_sha1_block_data_order_avx:
+DB 9,0,0,0
+ DD ssse3_handler wrt ..imagebase
+ DD $L$prologue_avx wrt ..imagebase,$L$epilogue_avx 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
index e6193c5..efaf9b5 100644
--- 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
@@ -23,6 +23,11 @@
mov r9d,DWORD[r11]
mov r10d,DWORD[4+r11]
mov r11d,DWORD[8+r11]
+ and r9d,1073741824
+ and r10d,268435968
+ or r10d,r9d
+ cmp r10d,1342177792
+ je NEAR $L$avx_shortcut
test r10d,512
jnz NEAR $L$ssse3_shortcut
push rbx
@@ -2877,6 +2882,1082 @@
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_sha256_block_data_order_ssse3:
+
+ALIGN 64
+sha256_block_data_order_avx:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha256_block_data_order_avx:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+$L$avx_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_avx:
+
+ vzeroupper
+ 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]
+ vmovdqa xmm8,XMMWORD[((K256+512+32))]
+ vmovdqa xmm9,XMMWORD[((K256+512+64))]
+ jmp NEAR $L$loop_avx
+ALIGN 16
+$L$loop_avx:
+ vmovdqa xmm7,XMMWORD[((K256+512))]
+ vmovdqu xmm0,XMMWORD[rsi]
+ vmovdqu xmm1,XMMWORD[16+rsi]
+ vmovdqu xmm2,XMMWORD[32+rsi]
+ vmovdqu xmm3,XMMWORD[48+rsi]
+ vpshufb xmm0,xmm0,xmm7
+ lea rbp,[K256]
+ vpshufb xmm1,xmm1,xmm7
+ vpshufb xmm2,xmm2,xmm7
+ vpaddd xmm4,xmm0,XMMWORD[rbp]
+ vpshufb xmm3,xmm3,xmm7
+ vpaddd xmm5,xmm1,XMMWORD[32+rbp]
+ vpaddd xmm6,xmm2,XMMWORD[64+rbp]
+ vpaddd xmm7,xmm3,XMMWORD[96+rbp]
+ vmovdqa XMMWORD[rsp],xmm4
+ mov r14d,eax
+ vmovdqa XMMWORD[16+rsp],xmm5
+ mov edi,ebx
+ vmovdqa XMMWORD[32+rsp],xmm6
+ xor edi,ecx
+ vmovdqa XMMWORD[48+rsp],xmm7
+ mov r13d,r8d
+ jmp NEAR $L$avx_00_47
+
+ALIGN 16
+$L$avx_00_47:
+ sub rbp,-128
+ vpalignr xmm4,xmm1,xmm0,4
+ shrd r13d,r13d,14
+ mov eax,r14d
+ mov r12d,r9d
+ vpalignr xmm7,xmm3,xmm2,4
+ shrd r14d,r14d,9
+ xor r13d,r8d
+ xor r12d,r10d
+ vpsrld xmm6,xmm4,7
+ shrd r13d,r13d,5
+ xor r14d,eax
+ and r12d,r8d
+ vpaddd xmm0,xmm0,xmm7
+ xor r13d,r8d
+ add r11d,DWORD[rsp]
+ mov r15d,eax
+ vpsrld xmm7,xmm4,3
+ xor r12d,r10d
+ shrd r14d,r14d,11
+ xor r15d,ebx
+ vpslld xmm5,xmm4,14
+ add r11d,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ vpxor xmm4,xmm7,xmm6
+ xor r14d,eax
+ add r11d,r13d
+ xor edi,ebx
+ vpshufd xmm7,xmm3,250
+ shrd r14d,r14d,2
+ add edx,r11d
+ add r11d,edi
+ vpsrld xmm6,xmm6,11
+ mov r13d,edx
+ add r14d,r11d
+ shrd r13d,r13d,14
+ vpxor xmm4,xmm4,xmm5
+ mov r11d,r14d
+ mov r12d,r8d
+ shrd r14d,r14d,9
+ vpslld xmm5,xmm5,11
+ xor r13d,edx
+ xor r12d,r9d
+ shrd r13d,r13d,5
+ vpxor xmm4,xmm4,xmm6
+ xor r14d,r11d
+ and r12d,edx
+ xor r13d,edx
+ vpsrld xmm6,xmm7,10
+ add r10d,DWORD[4+rsp]
+ mov edi,r11d
+ xor r12d,r9d
+ vpxor xmm4,xmm4,xmm5
+ shrd r14d,r14d,11
+ xor edi,eax
+ add r10d,r12d
+ vpsrlq xmm7,xmm7,17
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,r11d
+ vpaddd xmm0,xmm0,xmm4
+ add r10d,r13d
+ xor r15d,eax
+ shrd r14d,r14d,2
+ vpxor xmm6,xmm6,xmm7
+ add ecx,r10d
+ add r10d,r15d
+ mov r13d,ecx
+ vpsrlq xmm7,xmm7,2
+ add r14d,r10d
+ shrd r13d,r13d,14
+ mov r10d,r14d
+ vpxor xmm6,xmm6,xmm7
+ mov r12d,edx
+ shrd r14d,r14d,9
+ xor r13d,ecx
+ vpshufb xmm6,xmm6,xmm8
+ xor r12d,r8d
+ shrd r13d,r13d,5
+ xor r14d,r10d
+ vpaddd xmm0,xmm0,xmm6
+ and r12d,ecx
+ xor r13d,ecx
+ add r9d,DWORD[8+rsp]
+ vpshufd xmm7,xmm0,80
+ mov r15d,r10d
+ xor r12d,r8d
+ shrd r14d,r14d,11
+ vpsrld xmm6,xmm7,10
+ xor r15d,r11d
+ add r9d,r12d
+ shrd r13d,r13d,6
+ vpsrlq xmm7,xmm7,17
+ and edi,r15d
+ xor r14d,r10d
+ add r9d,r13d
+ vpxor xmm6,xmm6,xmm7
+ xor edi,r11d
+ shrd r14d,r14d,2
+ add ebx,r9d
+ vpsrlq xmm7,xmm7,2
+ add r9d,edi
+ mov r13d,ebx
+ add r14d,r9d
+ vpxor xmm6,xmm6,xmm7
+ shrd r13d,r13d,14
+ mov r9d,r14d
+ mov r12d,ecx
+ vpshufb xmm6,xmm6,xmm9
+ shrd r14d,r14d,9
+ xor r13d,ebx
+ xor r12d,edx
+ vpaddd xmm0,xmm0,xmm6
+ shrd r13d,r13d,5
+ xor r14d,r9d
+ and r12d,ebx
+ vpaddd xmm6,xmm0,XMMWORD[rbp]
+ xor r13d,ebx
+ add r8d,DWORD[12+rsp]
+ mov edi,r9d
+ xor r12d,edx
+ shrd r14d,r14d,11
+ xor edi,r10d
+ add r8d,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,r9d
+ add r8d,r13d
+ xor r15d,r10d
+ shrd r14d,r14d,2
+ add eax,r8d
+ add r8d,r15d
+ mov r13d,eax
+ add r14d,r8d
+ vmovdqa XMMWORD[rsp],xmm6
+ vpalignr xmm4,xmm2,xmm1,4
+ shrd r13d,r13d,14
+ mov r8d,r14d
+ mov r12d,ebx
+ vpalignr xmm7,xmm0,xmm3,4
+ shrd r14d,r14d,9
+ xor r13d,eax
+ xor r12d,ecx
+ vpsrld xmm6,xmm4,7
+ shrd r13d,r13d,5
+ xor r14d,r8d
+ and r12d,eax
+ vpaddd xmm1,xmm1,xmm7
+ xor r13d,eax
+ add edx,DWORD[16+rsp]
+ mov r15d,r8d
+ vpsrld xmm7,xmm4,3
+ xor r12d,ecx
+ shrd r14d,r14d,11
+ xor r15d,r9d
+ vpslld xmm5,xmm4,14
+ add edx,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ vpxor xmm4,xmm7,xmm6
+ xor r14d,r8d
+ add edx,r13d
+ xor edi,r9d
+ vpshufd xmm7,xmm0,250
+ shrd r14d,r14d,2
+ add r11d,edx
+ add edx,edi
+ vpsrld xmm6,xmm6,11
+ mov r13d,r11d
+ add r14d,edx
+ shrd r13d,r13d,14
+ vpxor xmm4,xmm4,xmm5
+ mov edx,r14d
+ mov r12d,eax
+ shrd r14d,r14d,9
+ vpslld xmm5,xmm5,11
+ xor r13d,r11d
+ xor r12d,ebx
+ shrd r13d,r13d,5
+ vpxor xmm4,xmm4,xmm6
+ xor r14d,edx
+ and r12d,r11d
+ xor r13d,r11d
+ vpsrld xmm6,xmm7,10
+ add ecx,DWORD[20+rsp]
+ mov edi,edx
+ xor r12d,ebx
+ vpxor xmm4,xmm4,xmm5
+ shrd r14d,r14d,11
+ xor edi,r8d
+ add ecx,r12d
+ vpsrlq xmm7,xmm7,17
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,edx
+ vpaddd xmm1,xmm1,xmm4
+ add ecx,r13d
+ xor r15d,r8d
+ shrd r14d,r14d,2
+ vpxor xmm6,xmm6,xmm7
+ add r10d,ecx
+ add ecx,r15d
+ mov r13d,r10d
+ vpsrlq xmm7,xmm7,2
+ add r14d,ecx
+ shrd r13d,r13d,14
+ mov ecx,r14d
+ vpxor xmm6,xmm6,xmm7
+ mov r12d,r11d
+ shrd r14d,r14d,9
+ xor r13d,r10d
+ vpshufb xmm6,xmm6,xmm8
+ xor r12d,eax
+ shrd r13d,r13d,5
+ xor r14d,ecx
+ vpaddd xmm1,xmm1,xmm6
+ and r12d,r10d
+ xor r13d,r10d
+ add ebx,DWORD[24+rsp]
+ vpshufd xmm7,xmm1,80
+ mov r15d,ecx
+ xor r12d,eax
+ shrd r14d,r14d,11
+ vpsrld xmm6,xmm7,10
+ xor r15d,edx
+ add ebx,r12d
+ shrd r13d,r13d,6
+ vpsrlq xmm7,xmm7,17
+ and edi,r15d
+ xor r14d,ecx
+ add ebx,r13d
+ vpxor xmm6,xmm6,xmm7
+ xor edi,edx
+ shrd r14d,r14d,2
+ add r9d,ebx
+ vpsrlq xmm7,xmm7,2
+ add ebx,edi
+ mov r13d,r9d
+ add r14d,ebx
+ vpxor xmm6,xmm6,xmm7
+ shrd r13d,r13d,14
+ mov ebx,r14d
+ mov r12d,r10d
+ vpshufb xmm6,xmm6,xmm9
+ shrd r14d,r14d,9
+ xor r13d,r9d
+ xor r12d,r11d
+ vpaddd xmm1,xmm1,xmm6
+ shrd r13d,r13d,5
+ xor r14d,ebx
+ and r12d,r9d
+ vpaddd xmm6,xmm1,XMMWORD[32+rbp]
+ xor r13d,r9d
+ add eax,DWORD[28+rsp]
+ mov edi,ebx
+ xor r12d,r11d
+ shrd r14d,r14d,11
+ xor edi,ecx
+ add eax,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,ebx
+ add eax,r13d
+ xor r15d,ecx
+ shrd r14d,r14d,2
+ add r8d,eax
+ add eax,r15d
+ mov r13d,r8d
+ add r14d,eax
+ vmovdqa XMMWORD[16+rsp],xmm6
+ vpalignr xmm4,xmm3,xmm2,4
+ shrd r13d,r13d,14
+ mov eax,r14d
+ mov r12d,r9d
+ vpalignr xmm7,xmm1,xmm0,4
+ shrd r14d,r14d,9
+ xor r13d,r8d
+ xor r12d,r10d
+ vpsrld xmm6,xmm4,7
+ shrd r13d,r13d,5
+ xor r14d,eax
+ and r12d,r8d
+ vpaddd xmm2,xmm2,xmm7
+ xor r13d,r8d
+ add r11d,DWORD[32+rsp]
+ mov r15d,eax
+ vpsrld xmm7,xmm4,3
+ xor r12d,r10d
+ shrd r14d,r14d,11
+ xor r15d,ebx
+ vpslld xmm5,xmm4,14
+ add r11d,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ vpxor xmm4,xmm7,xmm6
+ xor r14d,eax
+ add r11d,r13d
+ xor edi,ebx
+ vpshufd xmm7,xmm1,250
+ shrd r14d,r14d,2
+ add edx,r11d
+ add r11d,edi
+ vpsrld xmm6,xmm6,11
+ mov r13d,edx
+ add r14d,r11d
+ shrd r13d,r13d,14
+ vpxor xmm4,xmm4,xmm5
+ mov r11d,r14d
+ mov r12d,r8d
+ shrd r14d,r14d,9
+ vpslld xmm5,xmm5,11
+ xor r13d,edx
+ xor r12d,r9d
+ shrd r13d,r13d,5
+ vpxor xmm4,xmm4,xmm6
+ xor r14d,r11d
+ and r12d,edx
+ xor r13d,edx
+ vpsrld xmm6,xmm7,10
+ add r10d,DWORD[36+rsp]
+ mov edi,r11d
+ xor r12d,r9d
+ vpxor xmm4,xmm4,xmm5
+ shrd r14d,r14d,11
+ xor edi,eax
+ add r10d,r12d
+ vpsrlq xmm7,xmm7,17
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,r11d
+ vpaddd xmm2,xmm2,xmm4
+ add r10d,r13d
+ xor r15d,eax
+ shrd r14d,r14d,2
+ vpxor xmm6,xmm6,xmm7
+ add ecx,r10d
+ add r10d,r15d
+ mov r13d,ecx
+ vpsrlq xmm7,xmm7,2
+ add r14d,r10d
+ shrd r13d,r13d,14
+ mov r10d,r14d
+ vpxor xmm6,xmm6,xmm7
+ mov r12d,edx
+ shrd r14d,r14d,9
+ xor r13d,ecx
+ vpshufb xmm6,xmm6,xmm8
+ xor r12d,r8d
+ shrd r13d,r13d,5
+ xor r14d,r10d
+ vpaddd xmm2,xmm2,xmm6
+ and r12d,ecx
+ xor r13d,ecx
+ add r9d,DWORD[40+rsp]
+ vpshufd xmm7,xmm2,80
+ mov r15d,r10d
+ xor r12d,r8d
+ shrd r14d,r14d,11
+ vpsrld xmm6,xmm7,10
+ xor r15d,r11d
+ add r9d,r12d
+ shrd r13d,r13d,6
+ vpsrlq xmm7,xmm7,17
+ and edi,r15d
+ xor r14d,r10d
+ add r9d,r13d
+ vpxor xmm6,xmm6,xmm7
+ xor edi,r11d
+ shrd r14d,r14d,2
+ add ebx,r9d
+ vpsrlq xmm7,xmm7,2
+ add r9d,edi
+ mov r13d,ebx
+ add r14d,r9d
+ vpxor xmm6,xmm6,xmm7
+ shrd r13d,r13d,14
+ mov r9d,r14d
+ mov r12d,ecx
+ vpshufb xmm6,xmm6,xmm9
+ shrd r14d,r14d,9
+ xor r13d,ebx
+ xor r12d,edx
+ vpaddd xmm2,xmm2,xmm6
+ shrd r13d,r13d,5
+ xor r14d,r9d
+ and r12d,ebx
+ vpaddd xmm6,xmm2,XMMWORD[64+rbp]
+ xor r13d,ebx
+ add r8d,DWORD[44+rsp]
+ mov edi,r9d
+ xor r12d,edx
+ shrd r14d,r14d,11
+ xor edi,r10d
+ add r8d,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,r9d
+ add r8d,r13d
+ xor r15d,r10d
+ shrd r14d,r14d,2
+ add eax,r8d
+ add r8d,r15d
+ mov r13d,eax
+ add r14d,r8d
+ vmovdqa XMMWORD[32+rsp],xmm6
+ vpalignr xmm4,xmm0,xmm3,4
+ shrd r13d,r13d,14
+ mov r8d,r14d
+ mov r12d,ebx
+ vpalignr xmm7,xmm2,xmm1,4
+ shrd r14d,r14d,9
+ xor r13d,eax
+ xor r12d,ecx
+ vpsrld xmm6,xmm4,7
+ shrd r13d,r13d,5
+ xor r14d,r8d
+ and r12d,eax
+ vpaddd xmm3,xmm3,xmm7
+ xor r13d,eax
+ add edx,DWORD[48+rsp]
+ mov r15d,r8d
+ vpsrld xmm7,xmm4,3
+ xor r12d,ecx
+ shrd r14d,r14d,11
+ xor r15d,r9d
+ vpslld xmm5,xmm4,14
+ add edx,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ vpxor xmm4,xmm7,xmm6
+ xor r14d,r8d
+ add edx,r13d
+ xor edi,r9d
+ vpshufd xmm7,xmm2,250
+ shrd r14d,r14d,2
+ add r11d,edx
+ add edx,edi
+ vpsrld xmm6,xmm6,11
+ mov r13d,r11d
+ add r14d,edx
+ shrd r13d,r13d,14
+ vpxor xmm4,xmm4,xmm5
+ mov edx,r14d
+ mov r12d,eax
+ shrd r14d,r14d,9
+ vpslld xmm5,xmm5,11
+ xor r13d,r11d
+ xor r12d,ebx
+ shrd r13d,r13d,5
+ vpxor xmm4,xmm4,xmm6
+ xor r14d,edx
+ and r12d,r11d
+ xor r13d,r11d
+ vpsrld xmm6,xmm7,10
+ add ecx,DWORD[52+rsp]
+ mov edi,edx
+ xor r12d,ebx
+ vpxor xmm4,xmm4,xmm5
+ shrd r14d,r14d,11
+ xor edi,r8d
+ add ecx,r12d
+ vpsrlq xmm7,xmm7,17
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,edx
+ vpaddd xmm3,xmm3,xmm4
+ add ecx,r13d
+ xor r15d,r8d
+ shrd r14d,r14d,2
+ vpxor xmm6,xmm6,xmm7
+ add r10d,ecx
+ add ecx,r15d
+ mov r13d,r10d
+ vpsrlq xmm7,xmm7,2
+ add r14d,ecx
+ shrd r13d,r13d,14
+ mov ecx,r14d
+ vpxor xmm6,xmm6,xmm7
+ mov r12d,r11d
+ shrd r14d,r14d,9
+ xor r13d,r10d
+ vpshufb xmm6,xmm6,xmm8
+ xor r12d,eax
+ shrd r13d,r13d,5
+ xor r14d,ecx
+ vpaddd xmm3,xmm3,xmm6
+ and r12d,r10d
+ xor r13d,r10d
+ add ebx,DWORD[56+rsp]
+ vpshufd xmm7,xmm3,80
+ mov r15d,ecx
+ xor r12d,eax
+ shrd r14d,r14d,11
+ vpsrld xmm6,xmm7,10
+ xor r15d,edx
+ add ebx,r12d
+ shrd r13d,r13d,6
+ vpsrlq xmm7,xmm7,17
+ and edi,r15d
+ xor r14d,ecx
+ add ebx,r13d
+ vpxor xmm6,xmm6,xmm7
+ xor edi,edx
+ shrd r14d,r14d,2
+ add r9d,ebx
+ vpsrlq xmm7,xmm7,2
+ add ebx,edi
+ mov r13d,r9d
+ add r14d,ebx
+ vpxor xmm6,xmm6,xmm7
+ shrd r13d,r13d,14
+ mov ebx,r14d
+ mov r12d,r10d
+ vpshufb xmm6,xmm6,xmm9
+ shrd r14d,r14d,9
+ xor r13d,r9d
+ xor r12d,r11d
+ vpaddd xmm3,xmm3,xmm6
+ shrd r13d,r13d,5
+ xor r14d,ebx
+ and r12d,r9d
+ vpaddd xmm6,xmm3,XMMWORD[96+rbp]
+ xor r13d,r9d
+ add eax,DWORD[60+rsp]
+ mov edi,ebx
+ xor r12d,r11d
+ shrd r14d,r14d,11
+ xor edi,ecx
+ add eax,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,ebx
+ add eax,r13d
+ xor r15d,ecx
+ shrd r14d,r14d,2
+ add r8d,eax
+ add eax,r15d
+ mov r13d,r8d
+ add r14d,eax
+ vmovdqa XMMWORD[48+rsp],xmm6
+ cmp BYTE[131+rbp],0
+ jne NEAR $L$avx_00_47
+ shrd r13d,r13d,14
+ mov eax,r14d
+ mov r12d,r9d
+ shrd r14d,r14d,9
+ xor r13d,r8d
+ xor r12d,r10d
+ shrd r13d,r13d,5
+ xor r14d,eax
+ and r12d,r8d
+ xor r13d,r8d
+ add r11d,DWORD[rsp]
+ mov r15d,eax
+ xor r12d,r10d
+ shrd r14d,r14d,11
+ xor r15d,ebx
+ add r11d,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ xor r14d,eax
+ add r11d,r13d
+ xor edi,ebx
+ shrd r14d,r14d,2
+ add edx,r11d
+ add r11d,edi
+ mov r13d,edx
+ add r14d,r11d
+ shrd r13d,r13d,14
+ mov r11d,r14d
+ mov r12d,r8d
+ shrd r14d,r14d,9
+ xor r13d,edx
+ xor r12d,r9d
+ shrd r13d,r13d,5
+ xor r14d,r11d
+ and r12d,edx
+ xor r13d,edx
+ add r10d,DWORD[4+rsp]
+ mov edi,r11d
+ xor r12d,r9d
+ shrd r14d,r14d,11
+ xor edi,eax
+ add r10d,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,r11d
+ add r10d,r13d
+ xor r15d,eax
+ shrd r14d,r14d,2
+ add ecx,r10d
+ add r10d,r15d
+ mov r13d,ecx
+ add r14d,r10d
+ shrd r13d,r13d,14
+ mov r10d,r14d
+ mov r12d,edx
+ shrd r14d,r14d,9
+ xor r13d,ecx
+ xor r12d,r8d
+ shrd r13d,r13d,5
+ xor r14d,r10d
+ and r12d,ecx
+ xor r13d,ecx
+ add r9d,DWORD[8+rsp]
+ mov r15d,r10d
+ xor r12d,r8d
+ shrd r14d,r14d,11
+ xor r15d,r11d
+ add r9d,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ xor r14d,r10d
+ add r9d,r13d
+ xor edi,r11d
+ shrd r14d,r14d,2
+ add ebx,r9d
+ add r9d,edi
+ mov r13d,ebx
+ add r14d,r9d
+ shrd r13d,r13d,14
+ mov r9d,r14d
+ mov r12d,ecx
+ shrd r14d,r14d,9
+ xor r13d,ebx
+ xor r12d,edx
+ shrd r13d,r13d,5
+ xor r14d,r9d
+ and r12d,ebx
+ xor r13d,ebx
+ add r8d,DWORD[12+rsp]
+ mov edi,r9d
+ xor r12d,edx
+ shrd r14d,r14d,11
+ xor edi,r10d
+ add r8d,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,r9d
+ add r8d,r13d
+ xor r15d,r10d
+ shrd r14d,r14d,2
+ add eax,r8d
+ add r8d,r15d
+ mov r13d,eax
+ add r14d,r8d
+ shrd r13d,r13d,14
+ mov r8d,r14d
+ mov r12d,ebx
+ shrd r14d,r14d,9
+ xor r13d,eax
+ xor r12d,ecx
+ shrd r13d,r13d,5
+ xor r14d,r8d
+ and r12d,eax
+ xor r13d,eax
+ add edx,DWORD[16+rsp]
+ mov r15d,r8d
+ xor r12d,ecx
+ shrd r14d,r14d,11
+ xor r15d,r9d
+ add edx,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ xor r14d,r8d
+ add edx,r13d
+ xor edi,r9d
+ shrd r14d,r14d,2
+ add r11d,edx
+ add edx,edi
+ mov r13d,r11d
+ add r14d,edx
+ shrd r13d,r13d,14
+ mov edx,r14d
+ mov r12d,eax
+ shrd r14d,r14d,9
+ xor r13d,r11d
+ xor r12d,ebx
+ shrd r13d,r13d,5
+ xor r14d,edx
+ and r12d,r11d
+ xor r13d,r11d
+ add ecx,DWORD[20+rsp]
+ mov edi,edx
+ xor r12d,ebx
+ shrd r14d,r14d,11
+ xor edi,r8d
+ add ecx,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,edx
+ add ecx,r13d
+ xor r15d,r8d
+ shrd r14d,r14d,2
+ add r10d,ecx
+ add ecx,r15d
+ mov r13d,r10d
+ add r14d,ecx
+ shrd r13d,r13d,14
+ mov ecx,r14d
+ mov r12d,r11d
+ shrd r14d,r14d,9
+ xor r13d,r10d
+ xor r12d,eax
+ shrd r13d,r13d,5
+ xor r14d,ecx
+ and r12d,r10d
+ xor r13d,r10d
+ add ebx,DWORD[24+rsp]
+ mov r15d,ecx
+ xor r12d,eax
+ shrd r14d,r14d,11
+ xor r15d,edx
+ add ebx,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ xor r14d,ecx
+ add ebx,r13d
+ xor edi,edx
+ shrd r14d,r14d,2
+ add r9d,ebx
+ add ebx,edi
+ mov r13d,r9d
+ add r14d,ebx
+ shrd r13d,r13d,14
+ mov ebx,r14d
+ mov r12d,r10d
+ shrd r14d,r14d,9
+ xor r13d,r9d
+ xor r12d,r11d
+ shrd r13d,r13d,5
+ xor r14d,ebx
+ and r12d,r9d
+ xor r13d,r9d
+ add eax,DWORD[28+rsp]
+ mov edi,ebx
+ xor r12d,r11d
+ shrd r14d,r14d,11
+ xor edi,ecx
+ add eax,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,ebx
+ add eax,r13d
+ xor r15d,ecx
+ shrd r14d,r14d,2
+ add r8d,eax
+ add eax,r15d
+ mov r13d,r8d
+ add r14d,eax
+ shrd r13d,r13d,14
+ mov eax,r14d
+ mov r12d,r9d
+ shrd r14d,r14d,9
+ xor r13d,r8d
+ xor r12d,r10d
+ shrd r13d,r13d,5
+ xor r14d,eax
+ and r12d,r8d
+ xor r13d,r8d
+ add r11d,DWORD[32+rsp]
+ mov r15d,eax
+ xor r12d,r10d
+ shrd r14d,r14d,11
+ xor r15d,ebx
+ add r11d,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ xor r14d,eax
+ add r11d,r13d
+ xor edi,ebx
+ shrd r14d,r14d,2
+ add edx,r11d
+ add r11d,edi
+ mov r13d,edx
+ add r14d,r11d
+ shrd r13d,r13d,14
+ mov r11d,r14d
+ mov r12d,r8d
+ shrd r14d,r14d,9
+ xor r13d,edx
+ xor r12d,r9d
+ shrd r13d,r13d,5
+ xor r14d,r11d
+ and r12d,edx
+ xor r13d,edx
+ add r10d,DWORD[36+rsp]
+ mov edi,r11d
+ xor r12d,r9d
+ shrd r14d,r14d,11
+ xor edi,eax
+ add r10d,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,r11d
+ add r10d,r13d
+ xor r15d,eax
+ shrd r14d,r14d,2
+ add ecx,r10d
+ add r10d,r15d
+ mov r13d,ecx
+ add r14d,r10d
+ shrd r13d,r13d,14
+ mov r10d,r14d
+ mov r12d,edx
+ shrd r14d,r14d,9
+ xor r13d,ecx
+ xor r12d,r8d
+ shrd r13d,r13d,5
+ xor r14d,r10d
+ and r12d,ecx
+ xor r13d,ecx
+ add r9d,DWORD[40+rsp]
+ mov r15d,r10d
+ xor r12d,r8d
+ shrd r14d,r14d,11
+ xor r15d,r11d
+ add r9d,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ xor r14d,r10d
+ add r9d,r13d
+ xor edi,r11d
+ shrd r14d,r14d,2
+ add ebx,r9d
+ add r9d,edi
+ mov r13d,ebx
+ add r14d,r9d
+ shrd r13d,r13d,14
+ mov r9d,r14d
+ mov r12d,ecx
+ shrd r14d,r14d,9
+ xor r13d,ebx
+ xor r12d,edx
+ shrd r13d,r13d,5
+ xor r14d,r9d
+ and r12d,ebx
+ xor r13d,ebx
+ add r8d,DWORD[44+rsp]
+ mov edi,r9d
+ xor r12d,edx
+ shrd r14d,r14d,11
+ xor edi,r10d
+ add r8d,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,r9d
+ add r8d,r13d
+ xor r15d,r10d
+ shrd r14d,r14d,2
+ add eax,r8d
+ add r8d,r15d
+ mov r13d,eax
+ add r14d,r8d
+ shrd r13d,r13d,14
+ mov r8d,r14d
+ mov r12d,ebx
+ shrd r14d,r14d,9
+ xor r13d,eax
+ xor r12d,ecx
+ shrd r13d,r13d,5
+ xor r14d,r8d
+ and r12d,eax
+ xor r13d,eax
+ add edx,DWORD[48+rsp]
+ mov r15d,r8d
+ xor r12d,ecx
+ shrd r14d,r14d,11
+ xor r15d,r9d
+ add edx,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ xor r14d,r8d
+ add edx,r13d
+ xor edi,r9d
+ shrd r14d,r14d,2
+ add r11d,edx
+ add edx,edi
+ mov r13d,r11d
+ add r14d,edx
+ shrd r13d,r13d,14
+ mov edx,r14d
+ mov r12d,eax
+ shrd r14d,r14d,9
+ xor r13d,r11d
+ xor r12d,ebx
+ shrd r13d,r13d,5
+ xor r14d,edx
+ and r12d,r11d
+ xor r13d,r11d
+ add ecx,DWORD[52+rsp]
+ mov edi,edx
+ xor r12d,ebx
+ shrd r14d,r14d,11
+ xor edi,r8d
+ add ecx,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,edx
+ add ecx,r13d
+ xor r15d,r8d
+ shrd r14d,r14d,2
+ add r10d,ecx
+ add ecx,r15d
+ mov r13d,r10d
+ add r14d,ecx
+ shrd r13d,r13d,14
+ mov ecx,r14d
+ mov r12d,r11d
+ shrd r14d,r14d,9
+ xor r13d,r10d
+ xor r12d,eax
+ shrd r13d,r13d,5
+ xor r14d,ecx
+ and r12d,r10d
+ xor r13d,r10d
+ add ebx,DWORD[56+rsp]
+ mov r15d,ecx
+ xor r12d,eax
+ shrd r14d,r14d,11
+ xor r15d,edx
+ add ebx,r12d
+ shrd r13d,r13d,6
+ and edi,r15d
+ xor r14d,ecx
+ add ebx,r13d
+ xor edi,edx
+ shrd r14d,r14d,2
+ add r9d,ebx
+ add ebx,edi
+ mov r13d,r9d
+ add r14d,ebx
+ shrd r13d,r13d,14
+ mov ebx,r14d
+ mov r12d,r10d
+ shrd r14d,r14d,9
+ xor r13d,r9d
+ xor r12d,r11d
+ shrd r13d,r13d,5
+ xor r14d,ebx
+ and r12d,r9d
+ xor r13d,r9d
+ add eax,DWORD[60+rsp]
+ mov edi,ebx
+ xor r12d,r11d
+ shrd r14d,r14d,11
+ xor edi,ecx
+ add eax,r12d
+ shrd r13d,r13d,6
+ and r15d,edi
+ xor r14d,ebx
+ add eax,r13d
+ xor r15d,ecx
+ shrd r14d,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_avx
+
+ mov rsi,QWORD[((64+24))+rsp]
+ vzeroupper
+ 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_avx:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_sha256_block_data_order_avx:
EXTERN __imp_RtlVirtualUnwind
ALIGN 16
@@ -2982,6 +4063,9 @@
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
+ DD $L$SEH_begin_sha256_block_data_order_avx wrt ..imagebase
+ DD $L$SEH_end_sha256_block_data_order_avx wrt ..imagebase
+ DD $L$SEH_info_sha256_block_data_order_avx wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
$L$SEH_info_sha256_block_data_order:
@@ -2992,3 +4076,7 @@
DB 9,0,0,0
DD se_handler wrt ..imagebase
DD $L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
+$L$SEH_info_sha256_block_data_order_avx:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$prologue_avx wrt ..imagebase,$L$epilogue_avx 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
index b76cc0e..71449cd 100644
--- 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
@@ -19,6 +19,17 @@
mov rdx,r8
+ lea r11,[OPENSSL_ia32cap_P]
+ mov r9d,DWORD[r11]
+ mov r10d,DWORD[4+r11]
+ mov r11d,DWORD[8+r11]
+ test r10d,2048
+ jnz NEAR $L$xop_shortcut
+ and r9d,1073741824
+ and r10d,268435968
+ or r10d,r9d
+ cmp r10d,1342177792
+ je NEAR $L$avx_shortcut
push rbx
push rbp
push r12
@@ -1801,6 +1812,2282 @@
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
+sha512_block_data_order_xop:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha512_block_data_order_xop:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+$L$xop_shortcut:
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ mov r11,rsp
+ shl rdx,4
+ sub rsp,256
+ 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
+ movaps XMMWORD[(128+32)+rsp],xmm6
+ movaps XMMWORD[(128+48)+rsp],xmm7
+ movaps XMMWORD[(128+64)+rsp],xmm8
+ movaps XMMWORD[(128+80)+rsp],xmm9
+ movaps XMMWORD[(128+96)+rsp],xmm10
+ movaps XMMWORD[(128+112)+rsp],xmm11
+$L$prologue_xop:
+
+ vzeroupper
+ 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_xop
+ALIGN 16
+$L$loop_xop:
+ vmovdqa xmm11,XMMWORD[((K512+1280))]
+ vmovdqu xmm0,XMMWORD[rsi]
+ lea rbp,[((K512+128))]
+ vmovdqu xmm1,XMMWORD[16+rsi]
+ vmovdqu xmm2,XMMWORD[32+rsi]
+ vpshufb xmm0,xmm0,xmm11
+ vmovdqu xmm3,XMMWORD[48+rsi]
+ vpshufb xmm1,xmm1,xmm11
+ vmovdqu xmm4,XMMWORD[64+rsi]
+ vpshufb xmm2,xmm2,xmm11
+ vmovdqu xmm5,XMMWORD[80+rsi]
+ vpshufb xmm3,xmm3,xmm11
+ vmovdqu xmm6,XMMWORD[96+rsi]
+ vpshufb xmm4,xmm4,xmm11
+ vmovdqu xmm7,XMMWORD[112+rsi]
+ vpshufb xmm5,xmm5,xmm11
+ vpaddq xmm8,xmm0,XMMWORD[((-128))+rbp]
+ vpshufb xmm6,xmm6,xmm11
+ vpaddq xmm9,xmm1,XMMWORD[((-96))+rbp]
+ vpshufb xmm7,xmm7,xmm11
+ vpaddq xmm10,xmm2,XMMWORD[((-64))+rbp]
+ vpaddq xmm11,xmm3,XMMWORD[((-32))+rbp]
+ vmovdqa XMMWORD[rsp],xmm8
+ vpaddq xmm8,xmm4,XMMWORD[rbp]
+ vmovdqa XMMWORD[16+rsp],xmm9
+ vpaddq xmm9,xmm5,XMMWORD[32+rbp]
+ vmovdqa XMMWORD[32+rsp],xmm10
+ vpaddq xmm10,xmm6,XMMWORD[64+rbp]
+ vmovdqa XMMWORD[48+rsp],xmm11
+ vpaddq xmm11,xmm7,XMMWORD[96+rbp]
+ vmovdqa XMMWORD[64+rsp],xmm8
+ mov r14,rax
+ vmovdqa XMMWORD[80+rsp],xmm9
+ mov rdi,rbx
+ vmovdqa XMMWORD[96+rsp],xmm10
+ xor rdi,rcx
+ vmovdqa XMMWORD[112+rsp],xmm11
+ mov r13,r8
+ jmp NEAR $L$xop_00_47
+
+ALIGN 16
+$L$xop_00_47:
+ add rbp,256
+ vpalignr xmm8,xmm1,xmm0,8
+ ror r13,23
+ mov rax,r14
+ vpalignr xmm11,xmm5,xmm4,8
+ mov r12,r9
+ ror r14,5
+DB 143,72,120,195,200,56
+ xor r13,r8
+ xor r12,r10
+ vpsrlq xmm8,xmm8,7
+ ror r13,4
+ xor r14,rax
+ vpaddq xmm0,xmm0,xmm11
+ and r12,r8
+ xor r13,r8
+ add r11,QWORD[rsp]
+ mov r15,rax
+DB 143,72,120,195,209,7
+ xor r12,r10
+ ror r14,6
+ vpxor xmm8,xmm8,xmm9
+ xor r15,rbx
+ add r11,r12
+ ror r13,14
+ and rdi,r15
+DB 143,104,120,195,223,3
+ xor r14,rax
+ add r11,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,rbx
+ ror r14,28
+ vpsrlq xmm10,xmm7,6
+ add rdx,r11
+ add r11,rdi
+ vpaddq xmm0,xmm0,xmm8
+ mov r13,rdx
+ add r14,r11
+DB 143,72,120,195,203,42
+ ror r13,23
+ mov r11,r14
+ vpxor xmm11,xmm11,xmm10
+ mov r12,r8
+ ror r14,5
+ xor r13,rdx
+ xor r12,r9
+ vpxor xmm11,xmm11,xmm9
+ ror r13,4
+ xor r14,r11
+ and r12,rdx
+ xor r13,rdx
+ vpaddq xmm0,xmm0,xmm11
+ add r10,QWORD[8+rsp]
+ mov rdi,r11
+ xor r12,r9
+ ror r14,6
+ vpaddq xmm10,xmm0,XMMWORD[((-128))+rbp]
+ xor rdi,rax
+ add r10,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,r11
+ add r10,r13
+ xor r15,rax
+ ror r14,28
+ add rcx,r10
+ add r10,r15
+ mov r13,rcx
+ add r14,r10
+ vmovdqa XMMWORD[rsp],xmm10
+ vpalignr xmm8,xmm2,xmm1,8
+ ror r13,23
+ mov r10,r14
+ vpalignr xmm11,xmm6,xmm5,8
+ mov r12,rdx
+ ror r14,5
+DB 143,72,120,195,200,56
+ xor r13,rcx
+ xor r12,r8
+ vpsrlq xmm8,xmm8,7
+ ror r13,4
+ xor r14,r10
+ vpaddq xmm1,xmm1,xmm11
+ and r12,rcx
+ xor r13,rcx
+ add r9,QWORD[16+rsp]
+ mov r15,r10
+DB 143,72,120,195,209,7
+ xor r12,r8
+ ror r14,6
+ vpxor xmm8,xmm8,xmm9
+ xor r15,r11
+ add r9,r12
+ ror r13,14
+ and rdi,r15
+DB 143,104,120,195,216,3
+ xor r14,r10
+ add r9,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,r11
+ ror r14,28
+ vpsrlq xmm10,xmm0,6
+ add rbx,r9
+ add r9,rdi
+ vpaddq xmm1,xmm1,xmm8
+ mov r13,rbx
+ add r14,r9
+DB 143,72,120,195,203,42
+ ror r13,23
+ mov r9,r14
+ vpxor xmm11,xmm11,xmm10
+ mov r12,rcx
+ ror r14,5
+ xor r13,rbx
+ xor r12,rdx
+ vpxor xmm11,xmm11,xmm9
+ ror r13,4
+ xor r14,r9
+ and r12,rbx
+ xor r13,rbx
+ vpaddq xmm1,xmm1,xmm11
+ add r8,QWORD[24+rsp]
+ mov rdi,r9
+ xor r12,rdx
+ ror r14,6
+ vpaddq xmm10,xmm1,XMMWORD[((-96))+rbp]
+ xor rdi,r10
+ add r8,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,r9
+ add r8,r13
+ xor r15,r10
+ ror r14,28
+ add rax,r8
+ add r8,r15
+ mov r13,rax
+ add r14,r8
+ vmovdqa XMMWORD[16+rsp],xmm10
+ vpalignr xmm8,xmm3,xmm2,8
+ ror r13,23
+ mov r8,r14
+ vpalignr xmm11,xmm7,xmm6,8
+ mov r12,rbx
+ ror r14,5
+DB 143,72,120,195,200,56
+ xor r13,rax
+ xor r12,rcx
+ vpsrlq xmm8,xmm8,7
+ ror r13,4
+ xor r14,r8
+ vpaddq xmm2,xmm2,xmm11
+ and r12,rax
+ xor r13,rax
+ add rdx,QWORD[32+rsp]
+ mov r15,r8
+DB 143,72,120,195,209,7
+ xor r12,rcx
+ ror r14,6
+ vpxor xmm8,xmm8,xmm9
+ xor r15,r9
+ add rdx,r12
+ ror r13,14
+ and rdi,r15
+DB 143,104,120,195,217,3
+ xor r14,r8
+ add rdx,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,r9
+ ror r14,28
+ vpsrlq xmm10,xmm1,6
+ add r11,rdx
+ add rdx,rdi
+ vpaddq xmm2,xmm2,xmm8
+ mov r13,r11
+ add r14,rdx
+DB 143,72,120,195,203,42
+ ror r13,23
+ mov rdx,r14
+ vpxor xmm11,xmm11,xmm10
+ mov r12,rax
+ ror r14,5
+ xor r13,r11
+ xor r12,rbx
+ vpxor xmm11,xmm11,xmm9
+ ror r13,4
+ xor r14,rdx
+ and r12,r11
+ xor r13,r11
+ vpaddq xmm2,xmm2,xmm11
+ add rcx,QWORD[40+rsp]
+ mov rdi,rdx
+ xor r12,rbx
+ ror r14,6
+ vpaddq xmm10,xmm2,XMMWORD[((-64))+rbp]
+ xor rdi,r8
+ add rcx,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,rdx
+ add rcx,r13
+ xor r15,r8
+ ror r14,28
+ add r10,rcx
+ add rcx,r15
+ mov r13,r10
+ add r14,rcx
+ vmovdqa XMMWORD[32+rsp],xmm10
+ vpalignr xmm8,xmm4,xmm3,8
+ ror r13,23
+ mov rcx,r14
+ vpalignr xmm11,xmm0,xmm7,8
+ mov r12,r11
+ ror r14,5
+DB 143,72,120,195,200,56
+ xor r13,r10
+ xor r12,rax
+ vpsrlq xmm8,xmm8,7
+ ror r13,4
+ xor r14,rcx
+ vpaddq xmm3,xmm3,xmm11
+ and r12,r10
+ xor r13,r10
+ add rbx,QWORD[48+rsp]
+ mov r15,rcx
+DB 143,72,120,195,209,7
+ xor r12,rax
+ ror r14,6
+ vpxor xmm8,xmm8,xmm9
+ xor r15,rdx
+ add rbx,r12
+ ror r13,14
+ and rdi,r15
+DB 143,104,120,195,218,3
+ xor r14,rcx
+ add rbx,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,rdx
+ ror r14,28
+ vpsrlq xmm10,xmm2,6
+ add r9,rbx
+ add rbx,rdi
+ vpaddq xmm3,xmm3,xmm8
+ mov r13,r9
+ add r14,rbx
+DB 143,72,120,195,203,42
+ ror r13,23
+ mov rbx,r14
+ vpxor xmm11,xmm11,xmm10
+ mov r12,r10
+ ror r14,5
+ xor r13,r9
+ xor r12,r11
+ vpxor xmm11,xmm11,xmm9
+ ror r13,4
+ xor r14,rbx
+ and r12,r9
+ xor r13,r9
+ vpaddq xmm3,xmm3,xmm11
+ add rax,QWORD[56+rsp]
+ mov rdi,rbx
+ xor r12,r11
+ ror r14,6
+ vpaddq xmm10,xmm3,XMMWORD[((-32))+rbp]
+ xor rdi,rcx
+ add rax,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,rbx
+ add rax,r13
+ xor r15,rcx
+ ror r14,28
+ add r8,rax
+ add rax,r15
+ mov r13,r8
+ add r14,rax
+ vmovdqa XMMWORD[48+rsp],xmm10
+ vpalignr xmm8,xmm5,xmm4,8
+ ror r13,23
+ mov rax,r14
+ vpalignr xmm11,xmm1,xmm0,8
+ mov r12,r9
+ ror r14,5
+DB 143,72,120,195,200,56
+ xor r13,r8
+ xor r12,r10
+ vpsrlq xmm8,xmm8,7
+ ror r13,4
+ xor r14,rax
+ vpaddq xmm4,xmm4,xmm11
+ and r12,r8
+ xor r13,r8
+ add r11,QWORD[64+rsp]
+ mov r15,rax
+DB 143,72,120,195,209,7
+ xor r12,r10
+ ror r14,6
+ vpxor xmm8,xmm8,xmm9
+ xor r15,rbx
+ add r11,r12
+ ror r13,14
+ and rdi,r15
+DB 143,104,120,195,219,3
+ xor r14,rax
+ add r11,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,rbx
+ ror r14,28
+ vpsrlq xmm10,xmm3,6
+ add rdx,r11
+ add r11,rdi
+ vpaddq xmm4,xmm4,xmm8
+ mov r13,rdx
+ add r14,r11
+DB 143,72,120,195,203,42
+ ror r13,23
+ mov r11,r14
+ vpxor xmm11,xmm11,xmm10
+ mov r12,r8
+ ror r14,5
+ xor r13,rdx
+ xor r12,r9
+ vpxor xmm11,xmm11,xmm9
+ ror r13,4
+ xor r14,r11
+ and r12,rdx
+ xor r13,rdx
+ vpaddq xmm4,xmm4,xmm11
+ add r10,QWORD[72+rsp]
+ mov rdi,r11
+ xor r12,r9
+ ror r14,6
+ vpaddq xmm10,xmm4,XMMWORD[rbp]
+ xor rdi,rax
+ add r10,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,r11
+ add r10,r13
+ xor r15,rax
+ ror r14,28
+ add rcx,r10
+ add r10,r15
+ mov r13,rcx
+ add r14,r10
+ vmovdqa XMMWORD[64+rsp],xmm10
+ vpalignr xmm8,xmm6,xmm5,8
+ ror r13,23
+ mov r10,r14
+ vpalignr xmm11,xmm2,xmm1,8
+ mov r12,rdx
+ ror r14,5
+DB 143,72,120,195,200,56
+ xor r13,rcx
+ xor r12,r8
+ vpsrlq xmm8,xmm8,7
+ ror r13,4
+ xor r14,r10
+ vpaddq xmm5,xmm5,xmm11
+ and r12,rcx
+ xor r13,rcx
+ add r9,QWORD[80+rsp]
+ mov r15,r10
+DB 143,72,120,195,209,7
+ xor r12,r8
+ ror r14,6
+ vpxor xmm8,xmm8,xmm9
+ xor r15,r11
+ add r9,r12
+ ror r13,14
+ and rdi,r15
+DB 143,104,120,195,220,3
+ xor r14,r10
+ add r9,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,r11
+ ror r14,28
+ vpsrlq xmm10,xmm4,6
+ add rbx,r9
+ add r9,rdi
+ vpaddq xmm5,xmm5,xmm8
+ mov r13,rbx
+ add r14,r9
+DB 143,72,120,195,203,42
+ ror r13,23
+ mov r9,r14
+ vpxor xmm11,xmm11,xmm10
+ mov r12,rcx
+ ror r14,5
+ xor r13,rbx
+ xor r12,rdx
+ vpxor xmm11,xmm11,xmm9
+ ror r13,4
+ xor r14,r9
+ and r12,rbx
+ xor r13,rbx
+ vpaddq xmm5,xmm5,xmm11
+ add r8,QWORD[88+rsp]
+ mov rdi,r9
+ xor r12,rdx
+ ror r14,6
+ vpaddq xmm10,xmm5,XMMWORD[32+rbp]
+ xor rdi,r10
+ add r8,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,r9
+ add r8,r13
+ xor r15,r10
+ ror r14,28
+ add rax,r8
+ add r8,r15
+ mov r13,rax
+ add r14,r8
+ vmovdqa XMMWORD[80+rsp],xmm10
+ vpalignr xmm8,xmm7,xmm6,8
+ ror r13,23
+ mov r8,r14
+ vpalignr xmm11,xmm3,xmm2,8
+ mov r12,rbx
+ ror r14,5
+DB 143,72,120,195,200,56
+ xor r13,rax
+ xor r12,rcx
+ vpsrlq xmm8,xmm8,7
+ ror r13,4
+ xor r14,r8
+ vpaddq xmm6,xmm6,xmm11
+ and r12,rax
+ xor r13,rax
+ add rdx,QWORD[96+rsp]
+ mov r15,r8
+DB 143,72,120,195,209,7
+ xor r12,rcx
+ ror r14,6
+ vpxor xmm8,xmm8,xmm9
+ xor r15,r9
+ add rdx,r12
+ ror r13,14
+ and rdi,r15
+DB 143,104,120,195,221,3
+ xor r14,r8
+ add rdx,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,r9
+ ror r14,28
+ vpsrlq xmm10,xmm5,6
+ add r11,rdx
+ add rdx,rdi
+ vpaddq xmm6,xmm6,xmm8
+ mov r13,r11
+ add r14,rdx
+DB 143,72,120,195,203,42
+ ror r13,23
+ mov rdx,r14
+ vpxor xmm11,xmm11,xmm10
+ mov r12,rax
+ ror r14,5
+ xor r13,r11
+ xor r12,rbx
+ vpxor xmm11,xmm11,xmm9
+ ror r13,4
+ xor r14,rdx
+ and r12,r11
+ xor r13,r11
+ vpaddq xmm6,xmm6,xmm11
+ add rcx,QWORD[104+rsp]
+ mov rdi,rdx
+ xor r12,rbx
+ ror r14,6
+ vpaddq xmm10,xmm6,XMMWORD[64+rbp]
+ xor rdi,r8
+ add rcx,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,rdx
+ add rcx,r13
+ xor r15,r8
+ ror r14,28
+ add r10,rcx
+ add rcx,r15
+ mov r13,r10
+ add r14,rcx
+ vmovdqa XMMWORD[96+rsp],xmm10
+ vpalignr xmm8,xmm0,xmm7,8
+ ror r13,23
+ mov rcx,r14
+ vpalignr xmm11,xmm4,xmm3,8
+ mov r12,r11
+ ror r14,5
+DB 143,72,120,195,200,56
+ xor r13,r10
+ xor r12,rax
+ vpsrlq xmm8,xmm8,7
+ ror r13,4
+ xor r14,rcx
+ vpaddq xmm7,xmm7,xmm11
+ and r12,r10
+ xor r13,r10
+ add rbx,QWORD[112+rsp]
+ mov r15,rcx
+DB 143,72,120,195,209,7
+ xor r12,rax
+ ror r14,6
+ vpxor xmm8,xmm8,xmm9
+ xor r15,rdx
+ add rbx,r12
+ ror r13,14
+ and rdi,r15
+DB 143,104,120,195,222,3
+ xor r14,rcx
+ add rbx,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,rdx
+ ror r14,28
+ vpsrlq xmm10,xmm6,6
+ add r9,rbx
+ add rbx,rdi
+ vpaddq xmm7,xmm7,xmm8
+ mov r13,r9
+ add r14,rbx
+DB 143,72,120,195,203,42
+ ror r13,23
+ mov rbx,r14
+ vpxor xmm11,xmm11,xmm10
+ mov r12,r10
+ ror r14,5
+ xor r13,r9
+ xor r12,r11
+ vpxor xmm11,xmm11,xmm9
+ ror r13,4
+ xor r14,rbx
+ and r12,r9
+ xor r13,r9
+ vpaddq xmm7,xmm7,xmm11
+ add rax,QWORD[120+rsp]
+ mov rdi,rbx
+ xor r12,r11
+ ror r14,6
+ vpaddq xmm10,xmm7,XMMWORD[96+rbp]
+ xor rdi,rcx
+ add rax,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,rbx
+ add rax,r13
+ xor r15,rcx
+ ror r14,28
+ add r8,rax
+ add rax,r15
+ mov r13,r8
+ add r14,rax
+ vmovdqa XMMWORD[112+rsp],xmm10
+ cmp BYTE[135+rbp],0
+ jne NEAR $L$xop_00_47
+ ror r13,23
+ mov rax,r14
+ mov r12,r9
+ ror r14,5
+ xor r13,r8
+ xor r12,r10
+ ror r13,4
+ xor r14,rax
+ and r12,r8
+ xor r13,r8
+ add r11,QWORD[rsp]
+ mov r15,rax
+ xor r12,r10
+ ror r14,6
+ xor r15,rbx
+ add r11,r12
+ ror r13,14
+ and rdi,r15
+ xor r14,rax
+ add r11,r13
+ xor rdi,rbx
+ ror r14,28
+ add rdx,r11
+ add r11,rdi
+ mov r13,rdx
+ add r14,r11
+ ror r13,23
+ mov r11,r14
+ mov r12,r8
+ ror r14,5
+ xor r13,rdx
+ xor r12,r9
+ ror r13,4
+ xor r14,r11
+ and r12,rdx
+ xor r13,rdx
+ add r10,QWORD[8+rsp]
+ mov rdi,r11
+ xor r12,r9
+ ror r14,6
+ xor rdi,rax
+ add r10,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,r11
+ add r10,r13
+ xor r15,rax
+ ror r14,28
+ add rcx,r10
+ add r10,r15
+ mov r13,rcx
+ add r14,r10
+ ror r13,23
+ mov r10,r14
+ mov r12,rdx
+ ror r14,5
+ xor r13,rcx
+ xor r12,r8
+ ror r13,4
+ xor r14,r10
+ and r12,rcx
+ xor r13,rcx
+ add r9,QWORD[16+rsp]
+ mov r15,r10
+ xor r12,r8
+ ror r14,6
+ xor r15,r11
+ add r9,r12
+ ror r13,14
+ and rdi,r15
+ xor r14,r10
+ add r9,r13
+ xor rdi,r11
+ ror r14,28
+ add rbx,r9
+ add r9,rdi
+ mov r13,rbx
+ add r14,r9
+ ror r13,23
+ mov r9,r14
+ mov r12,rcx
+ ror r14,5
+ xor r13,rbx
+ xor r12,rdx
+ ror r13,4
+ xor r14,r9
+ and r12,rbx
+ xor r13,rbx
+ add r8,QWORD[24+rsp]
+ mov rdi,r9
+ xor r12,rdx
+ ror r14,6
+ xor rdi,r10
+ add r8,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,r9
+ add r8,r13
+ xor r15,r10
+ ror r14,28
+ add rax,r8
+ add r8,r15
+ mov r13,rax
+ add r14,r8
+ ror r13,23
+ mov r8,r14
+ mov r12,rbx
+ ror r14,5
+ xor r13,rax
+ xor r12,rcx
+ ror r13,4
+ xor r14,r8
+ and r12,rax
+ xor r13,rax
+ add rdx,QWORD[32+rsp]
+ mov r15,r8
+ xor r12,rcx
+ ror r14,6
+ xor r15,r9
+ add rdx,r12
+ ror r13,14
+ and rdi,r15
+ xor r14,r8
+ add rdx,r13
+ xor rdi,r9
+ ror r14,28
+ add r11,rdx
+ add rdx,rdi
+ mov r13,r11
+ add r14,rdx
+ ror r13,23
+ mov rdx,r14
+ mov r12,rax
+ ror r14,5
+ xor r13,r11
+ xor r12,rbx
+ ror r13,4
+ xor r14,rdx
+ and r12,r11
+ xor r13,r11
+ add rcx,QWORD[40+rsp]
+ mov rdi,rdx
+ xor r12,rbx
+ ror r14,6
+ xor rdi,r8
+ add rcx,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,rdx
+ add rcx,r13
+ xor r15,r8
+ ror r14,28
+ add r10,rcx
+ add rcx,r15
+ mov r13,r10
+ add r14,rcx
+ ror r13,23
+ mov rcx,r14
+ mov r12,r11
+ ror r14,5
+ xor r13,r10
+ xor r12,rax
+ ror r13,4
+ xor r14,rcx
+ and r12,r10
+ xor r13,r10
+ add rbx,QWORD[48+rsp]
+ mov r15,rcx
+ xor r12,rax
+ ror r14,6
+ xor r15,rdx
+ add rbx,r12
+ ror r13,14
+ and rdi,r15
+ xor r14,rcx
+ add rbx,r13
+ xor rdi,rdx
+ ror r14,28
+ add r9,rbx
+ add rbx,rdi
+ mov r13,r9
+ add r14,rbx
+ ror r13,23
+ mov rbx,r14
+ mov r12,r10
+ ror r14,5
+ xor r13,r9
+ xor r12,r11
+ ror r13,4
+ xor r14,rbx
+ and r12,r9
+ xor r13,r9
+ add rax,QWORD[56+rsp]
+ mov rdi,rbx
+ xor r12,r11
+ ror r14,6
+ xor rdi,rcx
+ add rax,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,rbx
+ add rax,r13
+ xor r15,rcx
+ ror r14,28
+ add r8,rax
+ add rax,r15
+ mov r13,r8
+ add r14,rax
+ ror r13,23
+ mov rax,r14
+ mov r12,r9
+ ror r14,5
+ xor r13,r8
+ xor r12,r10
+ ror r13,4
+ xor r14,rax
+ and r12,r8
+ xor r13,r8
+ add r11,QWORD[64+rsp]
+ mov r15,rax
+ xor r12,r10
+ ror r14,6
+ xor r15,rbx
+ add r11,r12
+ ror r13,14
+ and rdi,r15
+ xor r14,rax
+ add r11,r13
+ xor rdi,rbx
+ ror r14,28
+ add rdx,r11
+ add r11,rdi
+ mov r13,rdx
+ add r14,r11
+ ror r13,23
+ mov r11,r14
+ mov r12,r8
+ ror r14,5
+ xor r13,rdx
+ xor r12,r9
+ ror r13,4
+ xor r14,r11
+ and r12,rdx
+ xor r13,rdx
+ add r10,QWORD[72+rsp]
+ mov rdi,r11
+ xor r12,r9
+ ror r14,6
+ xor rdi,rax
+ add r10,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,r11
+ add r10,r13
+ xor r15,rax
+ ror r14,28
+ add rcx,r10
+ add r10,r15
+ mov r13,rcx
+ add r14,r10
+ ror r13,23
+ mov r10,r14
+ mov r12,rdx
+ ror r14,5
+ xor r13,rcx
+ xor r12,r8
+ ror r13,4
+ xor r14,r10
+ and r12,rcx
+ xor r13,rcx
+ add r9,QWORD[80+rsp]
+ mov r15,r10
+ xor r12,r8
+ ror r14,6
+ xor r15,r11
+ add r9,r12
+ ror r13,14
+ and rdi,r15
+ xor r14,r10
+ add r9,r13
+ xor rdi,r11
+ ror r14,28
+ add rbx,r9
+ add r9,rdi
+ mov r13,rbx
+ add r14,r9
+ ror r13,23
+ mov r9,r14
+ mov r12,rcx
+ ror r14,5
+ xor r13,rbx
+ xor r12,rdx
+ ror r13,4
+ xor r14,r9
+ and r12,rbx
+ xor r13,rbx
+ add r8,QWORD[88+rsp]
+ mov rdi,r9
+ xor r12,rdx
+ ror r14,6
+ xor rdi,r10
+ add r8,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,r9
+ add r8,r13
+ xor r15,r10
+ ror r14,28
+ add rax,r8
+ add r8,r15
+ mov r13,rax
+ add r14,r8
+ ror r13,23
+ mov r8,r14
+ mov r12,rbx
+ ror r14,5
+ xor r13,rax
+ xor r12,rcx
+ ror r13,4
+ xor r14,r8
+ and r12,rax
+ xor r13,rax
+ add rdx,QWORD[96+rsp]
+ mov r15,r8
+ xor r12,rcx
+ ror r14,6
+ xor r15,r9
+ add rdx,r12
+ ror r13,14
+ and rdi,r15
+ xor r14,r8
+ add rdx,r13
+ xor rdi,r9
+ ror r14,28
+ add r11,rdx
+ add rdx,rdi
+ mov r13,r11
+ add r14,rdx
+ ror r13,23
+ mov rdx,r14
+ mov r12,rax
+ ror r14,5
+ xor r13,r11
+ xor r12,rbx
+ ror r13,4
+ xor r14,rdx
+ and r12,r11
+ xor r13,r11
+ add rcx,QWORD[104+rsp]
+ mov rdi,rdx
+ xor r12,rbx
+ ror r14,6
+ xor rdi,r8
+ add rcx,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,rdx
+ add rcx,r13
+ xor r15,r8
+ ror r14,28
+ add r10,rcx
+ add rcx,r15
+ mov r13,r10
+ add r14,rcx
+ ror r13,23
+ mov rcx,r14
+ mov r12,r11
+ ror r14,5
+ xor r13,r10
+ xor r12,rax
+ ror r13,4
+ xor r14,rcx
+ and r12,r10
+ xor r13,r10
+ add rbx,QWORD[112+rsp]
+ mov r15,rcx
+ xor r12,rax
+ ror r14,6
+ xor r15,rdx
+ add rbx,r12
+ ror r13,14
+ and rdi,r15
+ xor r14,rcx
+ add rbx,r13
+ xor rdi,rdx
+ ror r14,28
+ add r9,rbx
+ add rbx,rdi
+ mov r13,r9
+ add r14,rbx
+ ror r13,23
+ mov rbx,r14
+ mov r12,r10
+ ror r14,5
+ xor r13,r9
+ xor r12,r11
+ ror r13,4
+ xor r14,rbx
+ and r12,r9
+ xor r13,r9
+ add rax,QWORD[120+rsp]
+ mov rdi,rbx
+ xor r12,r11
+ ror r14,6
+ xor rdi,rcx
+ add rax,r12
+ ror r13,14
+ and r15,rdi
+ xor r14,rbx
+ add rax,r13
+ xor r15,rcx
+ ror r14,28
+ add r8,rax
+ add rax,r15
+ mov r13,r8
+ add r14,rax
+ mov rdi,QWORD[((128+0))+rsp]
+ mov rax,r14
+
+ add rax,QWORD[rdi]
+ lea rsi,[128+rsi]
+ 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_xop
+
+ mov rsi,QWORD[((128+24))+rsp]
+ vzeroupper
+ movaps xmm6,XMMWORD[((128+32))+rsp]
+ movaps xmm7,XMMWORD[((128+48))+rsp]
+ movaps xmm8,XMMWORD[((128+64))+rsp]
+ movaps xmm9,XMMWORD[((128+80))+rsp]
+ movaps xmm10,XMMWORD[((128+96))+rsp]
+ movaps xmm11,XMMWORD[((128+112))+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_xop:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_sha512_block_data_order_xop:
+
+ALIGN 64
+sha512_block_data_order_avx:
+ mov QWORD[8+rsp],rdi ;WIN64 prologue
+ mov QWORD[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_sha512_block_data_order_avx:
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+$L$avx_shortcut:
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ mov r11,rsp
+ shl rdx,4
+ sub rsp,256
+ 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
+ movaps XMMWORD[(128+32)+rsp],xmm6
+ movaps XMMWORD[(128+48)+rsp],xmm7
+ movaps XMMWORD[(128+64)+rsp],xmm8
+ movaps XMMWORD[(128+80)+rsp],xmm9
+ movaps XMMWORD[(128+96)+rsp],xmm10
+ movaps XMMWORD[(128+112)+rsp],xmm11
+$L$prologue_avx:
+
+ vzeroupper
+ 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_avx
+ALIGN 16
+$L$loop_avx:
+ vmovdqa xmm11,XMMWORD[((K512+1280))]
+ vmovdqu xmm0,XMMWORD[rsi]
+ lea rbp,[((K512+128))]
+ vmovdqu xmm1,XMMWORD[16+rsi]
+ vmovdqu xmm2,XMMWORD[32+rsi]
+ vpshufb xmm0,xmm0,xmm11
+ vmovdqu xmm3,XMMWORD[48+rsi]
+ vpshufb xmm1,xmm1,xmm11
+ vmovdqu xmm4,XMMWORD[64+rsi]
+ vpshufb xmm2,xmm2,xmm11
+ vmovdqu xmm5,XMMWORD[80+rsi]
+ vpshufb xmm3,xmm3,xmm11
+ vmovdqu xmm6,XMMWORD[96+rsi]
+ vpshufb xmm4,xmm4,xmm11
+ vmovdqu xmm7,XMMWORD[112+rsi]
+ vpshufb xmm5,xmm5,xmm11
+ vpaddq xmm8,xmm0,XMMWORD[((-128))+rbp]
+ vpshufb xmm6,xmm6,xmm11
+ vpaddq xmm9,xmm1,XMMWORD[((-96))+rbp]
+ vpshufb xmm7,xmm7,xmm11
+ vpaddq xmm10,xmm2,XMMWORD[((-64))+rbp]
+ vpaddq xmm11,xmm3,XMMWORD[((-32))+rbp]
+ vmovdqa XMMWORD[rsp],xmm8
+ vpaddq xmm8,xmm4,XMMWORD[rbp]
+ vmovdqa XMMWORD[16+rsp],xmm9
+ vpaddq xmm9,xmm5,XMMWORD[32+rbp]
+ vmovdqa XMMWORD[32+rsp],xmm10
+ vpaddq xmm10,xmm6,XMMWORD[64+rbp]
+ vmovdqa XMMWORD[48+rsp],xmm11
+ vpaddq xmm11,xmm7,XMMWORD[96+rbp]
+ vmovdqa XMMWORD[64+rsp],xmm8
+ mov r14,rax
+ vmovdqa XMMWORD[80+rsp],xmm9
+ mov rdi,rbx
+ vmovdqa XMMWORD[96+rsp],xmm10
+ xor rdi,rcx
+ vmovdqa XMMWORD[112+rsp],xmm11
+ mov r13,r8
+ jmp NEAR $L$avx_00_47
+
+ALIGN 16
+$L$avx_00_47:
+ add rbp,256
+ vpalignr xmm8,xmm1,xmm0,8
+ shrd r13,r13,23
+ mov rax,r14
+ vpalignr xmm11,xmm5,xmm4,8
+ mov r12,r9
+ shrd r14,r14,5
+ vpsrlq xmm10,xmm8,1
+ xor r13,r8
+ xor r12,r10
+ vpaddq xmm0,xmm0,xmm11
+ shrd r13,r13,4
+ xor r14,rax
+ vpsrlq xmm11,xmm8,7
+ and r12,r8
+ xor r13,r8
+ vpsllq xmm9,xmm8,56
+ add r11,QWORD[rsp]
+ mov r15,rax
+ vpxor xmm8,xmm11,xmm10
+ xor r12,r10
+ shrd r14,r14,6
+ vpsrlq xmm10,xmm10,7
+ xor r15,rbx
+ add r11,r12
+ vpxor xmm8,xmm8,xmm9
+ shrd r13,r13,14
+ and rdi,r15
+ vpsllq xmm9,xmm9,7
+ xor r14,rax
+ add r11,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,rbx
+ shrd r14,r14,28
+ vpsrlq xmm11,xmm7,6
+ add rdx,r11
+ add r11,rdi
+ vpxor xmm8,xmm8,xmm9
+ mov r13,rdx
+ add r14,r11
+ vpsllq xmm10,xmm7,3
+ shrd r13,r13,23
+ mov r11,r14
+ vpaddq xmm0,xmm0,xmm8
+ mov r12,r8
+ shrd r14,r14,5
+ vpsrlq xmm9,xmm7,19
+ xor r13,rdx
+ xor r12,r9
+ vpxor xmm11,xmm11,xmm10
+ shrd r13,r13,4
+ xor r14,r11
+ vpsllq xmm10,xmm10,42
+ and r12,rdx
+ xor r13,rdx
+ vpxor xmm11,xmm11,xmm9
+ add r10,QWORD[8+rsp]
+ mov rdi,r11
+ vpsrlq xmm9,xmm9,42
+ xor r12,r9
+ shrd r14,r14,6
+ vpxor xmm11,xmm11,xmm10
+ xor rdi,rax
+ add r10,r12
+ vpxor xmm11,xmm11,xmm9
+ shrd r13,r13,14
+ and r15,rdi
+ vpaddq xmm0,xmm0,xmm11
+ xor r14,r11
+ add r10,r13
+ vpaddq xmm10,xmm0,XMMWORD[((-128))+rbp]
+ xor r15,rax
+ shrd r14,r14,28
+ add rcx,r10
+ add r10,r15
+ mov r13,rcx
+ add r14,r10
+ vmovdqa XMMWORD[rsp],xmm10
+ vpalignr xmm8,xmm2,xmm1,8
+ shrd r13,r13,23
+ mov r10,r14
+ vpalignr xmm11,xmm6,xmm5,8
+ mov r12,rdx
+ shrd r14,r14,5
+ vpsrlq xmm10,xmm8,1
+ xor r13,rcx
+ xor r12,r8
+ vpaddq xmm1,xmm1,xmm11
+ shrd r13,r13,4
+ xor r14,r10
+ vpsrlq xmm11,xmm8,7
+ and r12,rcx
+ xor r13,rcx
+ vpsllq xmm9,xmm8,56
+ add r9,QWORD[16+rsp]
+ mov r15,r10
+ vpxor xmm8,xmm11,xmm10
+ xor r12,r8
+ shrd r14,r14,6
+ vpsrlq xmm10,xmm10,7
+ xor r15,r11
+ add r9,r12
+ vpxor xmm8,xmm8,xmm9
+ shrd r13,r13,14
+ and rdi,r15
+ vpsllq xmm9,xmm9,7
+ xor r14,r10
+ add r9,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,r11
+ shrd r14,r14,28
+ vpsrlq xmm11,xmm0,6
+ add rbx,r9
+ add r9,rdi
+ vpxor xmm8,xmm8,xmm9
+ mov r13,rbx
+ add r14,r9
+ vpsllq xmm10,xmm0,3
+ shrd r13,r13,23
+ mov r9,r14
+ vpaddq xmm1,xmm1,xmm8
+ mov r12,rcx
+ shrd r14,r14,5
+ vpsrlq xmm9,xmm0,19
+ xor r13,rbx
+ xor r12,rdx
+ vpxor xmm11,xmm11,xmm10
+ shrd r13,r13,4
+ xor r14,r9
+ vpsllq xmm10,xmm10,42
+ and r12,rbx
+ xor r13,rbx
+ vpxor xmm11,xmm11,xmm9
+ add r8,QWORD[24+rsp]
+ mov rdi,r9
+ vpsrlq xmm9,xmm9,42
+ xor r12,rdx
+ shrd r14,r14,6
+ vpxor xmm11,xmm11,xmm10
+ xor rdi,r10
+ add r8,r12
+ vpxor xmm11,xmm11,xmm9
+ shrd r13,r13,14
+ and r15,rdi
+ vpaddq xmm1,xmm1,xmm11
+ xor r14,r9
+ add r8,r13
+ vpaddq xmm10,xmm1,XMMWORD[((-96))+rbp]
+ xor r15,r10
+ shrd r14,r14,28
+ add rax,r8
+ add r8,r15
+ mov r13,rax
+ add r14,r8
+ vmovdqa XMMWORD[16+rsp],xmm10
+ vpalignr xmm8,xmm3,xmm2,8
+ shrd r13,r13,23
+ mov r8,r14
+ vpalignr xmm11,xmm7,xmm6,8
+ mov r12,rbx
+ shrd r14,r14,5
+ vpsrlq xmm10,xmm8,1
+ xor r13,rax
+ xor r12,rcx
+ vpaddq xmm2,xmm2,xmm11
+ shrd r13,r13,4
+ xor r14,r8
+ vpsrlq xmm11,xmm8,7
+ and r12,rax
+ xor r13,rax
+ vpsllq xmm9,xmm8,56
+ add rdx,QWORD[32+rsp]
+ mov r15,r8
+ vpxor xmm8,xmm11,xmm10
+ xor r12,rcx
+ shrd r14,r14,6
+ vpsrlq xmm10,xmm10,7
+ xor r15,r9
+ add rdx,r12
+ vpxor xmm8,xmm8,xmm9
+ shrd r13,r13,14
+ and rdi,r15
+ vpsllq xmm9,xmm9,7
+ xor r14,r8
+ add rdx,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,r9
+ shrd r14,r14,28
+ vpsrlq xmm11,xmm1,6
+ add r11,rdx
+ add rdx,rdi
+ vpxor xmm8,xmm8,xmm9
+ mov r13,r11
+ add r14,rdx
+ vpsllq xmm10,xmm1,3
+ shrd r13,r13,23
+ mov rdx,r14
+ vpaddq xmm2,xmm2,xmm8
+ mov r12,rax
+ shrd r14,r14,5
+ vpsrlq xmm9,xmm1,19
+ xor r13,r11
+ xor r12,rbx
+ vpxor xmm11,xmm11,xmm10
+ shrd r13,r13,4
+ xor r14,rdx
+ vpsllq xmm10,xmm10,42
+ and r12,r11
+ xor r13,r11
+ vpxor xmm11,xmm11,xmm9
+ add rcx,QWORD[40+rsp]
+ mov rdi,rdx
+ vpsrlq xmm9,xmm9,42
+ xor r12,rbx
+ shrd r14,r14,6
+ vpxor xmm11,xmm11,xmm10
+ xor rdi,r8
+ add rcx,r12
+ vpxor xmm11,xmm11,xmm9
+ shrd r13,r13,14
+ and r15,rdi
+ vpaddq xmm2,xmm2,xmm11
+ xor r14,rdx
+ add rcx,r13
+ vpaddq xmm10,xmm2,XMMWORD[((-64))+rbp]
+ xor r15,r8
+ shrd r14,r14,28
+ add r10,rcx
+ add rcx,r15
+ mov r13,r10
+ add r14,rcx
+ vmovdqa XMMWORD[32+rsp],xmm10
+ vpalignr xmm8,xmm4,xmm3,8
+ shrd r13,r13,23
+ mov rcx,r14
+ vpalignr xmm11,xmm0,xmm7,8
+ mov r12,r11
+ shrd r14,r14,5
+ vpsrlq xmm10,xmm8,1
+ xor r13,r10
+ xor r12,rax
+ vpaddq xmm3,xmm3,xmm11
+ shrd r13,r13,4
+ xor r14,rcx
+ vpsrlq xmm11,xmm8,7
+ and r12,r10
+ xor r13,r10
+ vpsllq xmm9,xmm8,56
+ add rbx,QWORD[48+rsp]
+ mov r15,rcx
+ vpxor xmm8,xmm11,xmm10
+ xor r12,rax
+ shrd r14,r14,6
+ vpsrlq xmm10,xmm10,7
+ xor r15,rdx
+ add rbx,r12
+ vpxor xmm8,xmm8,xmm9
+ shrd r13,r13,14
+ and rdi,r15
+ vpsllq xmm9,xmm9,7
+ xor r14,rcx
+ add rbx,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,rdx
+ shrd r14,r14,28
+ vpsrlq xmm11,xmm2,6
+ add r9,rbx
+ add rbx,rdi
+ vpxor xmm8,xmm8,xmm9
+ mov r13,r9
+ add r14,rbx
+ vpsllq xmm10,xmm2,3
+ shrd r13,r13,23
+ mov rbx,r14
+ vpaddq xmm3,xmm3,xmm8
+ mov r12,r10
+ shrd r14,r14,5
+ vpsrlq xmm9,xmm2,19
+ xor r13,r9
+ xor r12,r11
+ vpxor xmm11,xmm11,xmm10
+ shrd r13,r13,4
+ xor r14,rbx
+ vpsllq xmm10,xmm10,42
+ and r12,r9
+ xor r13,r9
+ vpxor xmm11,xmm11,xmm9
+ add rax,QWORD[56+rsp]
+ mov rdi,rbx
+ vpsrlq xmm9,xmm9,42
+ xor r12,r11
+ shrd r14,r14,6
+ vpxor xmm11,xmm11,xmm10
+ xor rdi,rcx
+ add rax,r12
+ vpxor xmm11,xmm11,xmm9
+ shrd r13,r13,14
+ and r15,rdi
+ vpaddq xmm3,xmm3,xmm11
+ xor r14,rbx
+ add rax,r13
+ vpaddq xmm10,xmm3,XMMWORD[((-32))+rbp]
+ xor r15,rcx
+ shrd r14,r14,28
+ add r8,rax
+ add rax,r15
+ mov r13,r8
+ add r14,rax
+ vmovdqa XMMWORD[48+rsp],xmm10
+ vpalignr xmm8,xmm5,xmm4,8
+ shrd r13,r13,23
+ mov rax,r14
+ vpalignr xmm11,xmm1,xmm0,8
+ mov r12,r9
+ shrd r14,r14,5
+ vpsrlq xmm10,xmm8,1
+ xor r13,r8
+ xor r12,r10
+ vpaddq xmm4,xmm4,xmm11
+ shrd r13,r13,4
+ xor r14,rax
+ vpsrlq xmm11,xmm8,7
+ and r12,r8
+ xor r13,r8
+ vpsllq xmm9,xmm8,56
+ add r11,QWORD[64+rsp]
+ mov r15,rax
+ vpxor xmm8,xmm11,xmm10
+ xor r12,r10
+ shrd r14,r14,6
+ vpsrlq xmm10,xmm10,7
+ xor r15,rbx
+ add r11,r12
+ vpxor xmm8,xmm8,xmm9
+ shrd r13,r13,14
+ and rdi,r15
+ vpsllq xmm9,xmm9,7
+ xor r14,rax
+ add r11,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,rbx
+ shrd r14,r14,28
+ vpsrlq xmm11,xmm3,6
+ add rdx,r11
+ add r11,rdi
+ vpxor xmm8,xmm8,xmm9
+ mov r13,rdx
+ add r14,r11
+ vpsllq xmm10,xmm3,3
+ shrd r13,r13,23
+ mov r11,r14
+ vpaddq xmm4,xmm4,xmm8
+ mov r12,r8
+ shrd r14,r14,5
+ vpsrlq xmm9,xmm3,19
+ xor r13,rdx
+ xor r12,r9
+ vpxor xmm11,xmm11,xmm10
+ shrd r13,r13,4
+ xor r14,r11
+ vpsllq xmm10,xmm10,42
+ and r12,rdx
+ xor r13,rdx
+ vpxor xmm11,xmm11,xmm9
+ add r10,QWORD[72+rsp]
+ mov rdi,r11
+ vpsrlq xmm9,xmm9,42
+ xor r12,r9
+ shrd r14,r14,6
+ vpxor xmm11,xmm11,xmm10
+ xor rdi,rax
+ add r10,r12
+ vpxor xmm11,xmm11,xmm9
+ shrd r13,r13,14
+ and r15,rdi
+ vpaddq xmm4,xmm4,xmm11
+ xor r14,r11
+ add r10,r13
+ vpaddq xmm10,xmm4,XMMWORD[rbp]
+ xor r15,rax
+ shrd r14,r14,28
+ add rcx,r10
+ add r10,r15
+ mov r13,rcx
+ add r14,r10
+ vmovdqa XMMWORD[64+rsp],xmm10
+ vpalignr xmm8,xmm6,xmm5,8
+ shrd r13,r13,23
+ mov r10,r14
+ vpalignr xmm11,xmm2,xmm1,8
+ mov r12,rdx
+ shrd r14,r14,5
+ vpsrlq xmm10,xmm8,1
+ xor r13,rcx
+ xor r12,r8
+ vpaddq xmm5,xmm5,xmm11
+ shrd r13,r13,4
+ xor r14,r10
+ vpsrlq xmm11,xmm8,7
+ and r12,rcx
+ xor r13,rcx
+ vpsllq xmm9,xmm8,56
+ add r9,QWORD[80+rsp]
+ mov r15,r10
+ vpxor xmm8,xmm11,xmm10
+ xor r12,r8
+ shrd r14,r14,6
+ vpsrlq xmm10,xmm10,7
+ xor r15,r11
+ add r9,r12
+ vpxor xmm8,xmm8,xmm9
+ shrd r13,r13,14
+ and rdi,r15
+ vpsllq xmm9,xmm9,7
+ xor r14,r10
+ add r9,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,r11
+ shrd r14,r14,28
+ vpsrlq xmm11,xmm4,6
+ add rbx,r9
+ add r9,rdi
+ vpxor xmm8,xmm8,xmm9
+ mov r13,rbx
+ add r14,r9
+ vpsllq xmm10,xmm4,3
+ shrd r13,r13,23
+ mov r9,r14
+ vpaddq xmm5,xmm5,xmm8
+ mov r12,rcx
+ shrd r14,r14,5
+ vpsrlq xmm9,xmm4,19
+ xor r13,rbx
+ xor r12,rdx
+ vpxor xmm11,xmm11,xmm10
+ shrd r13,r13,4
+ xor r14,r9
+ vpsllq xmm10,xmm10,42
+ and r12,rbx
+ xor r13,rbx
+ vpxor xmm11,xmm11,xmm9
+ add r8,QWORD[88+rsp]
+ mov rdi,r9
+ vpsrlq xmm9,xmm9,42
+ xor r12,rdx
+ shrd r14,r14,6
+ vpxor xmm11,xmm11,xmm10
+ xor rdi,r10
+ add r8,r12
+ vpxor xmm11,xmm11,xmm9
+ shrd r13,r13,14
+ and r15,rdi
+ vpaddq xmm5,xmm5,xmm11
+ xor r14,r9
+ add r8,r13
+ vpaddq xmm10,xmm5,XMMWORD[32+rbp]
+ xor r15,r10
+ shrd r14,r14,28
+ add rax,r8
+ add r8,r15
+ mov r13,rax
+ add r14,r8
+ vmovdqa XMMWORD[80+rsp],xmm10
+ vpalignr xmm8,xmm7,xmm6,8
+ shrd r13,r13,23
+ mov r8,r14
+ vpalignr xmm11,xmm3,xmm2,8
+ mov r12,rbx
+ shrd r14,r14,5
+ vpsrlq xmm10,xmm8,1
+ xor r13,rax
+ xor r12,rcx
+ vpaddq xmm6,xmm6,xmm11
+ shrd r13,r13,4
+ xor r14,r8
+ vpsrlq xmm11,xmm8,7
+ and r12,rax
+ xor r13,rax
+ vpsllq xmm9,xmm8,56
+ add rdx,QWORD[96+rsp]
+ mov r15,r8
+ vpxor xmm8,xmm11,xmm10
+ xor r12,rcx
+ shrd r14,r14,6
+ vpsrlq xmm10,xmm10,7
+ xor r15,r9
+ add rdx,r12
+ vpxor xmm8,xmm8,xmm9
+ shrd r13,r13,14
+ and rdi,r15
+ vpsllq xmm9,xmm9,7
+ xor r14,r8
+ add rdx,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,r9
+ shrd r14,r14,28
+ vpsrlq xmm11,xmm5,6
+ add r11,rdx
+ add rdx,rdi
+ vpxor xmm8,xmm8,xmm9
+ mov r13,r11
+ add r14,rdx
+ vpsllq xmm10,xmm5,3
+ shrd r13,r13,23
+ mov rdx,r14
+ vpaddq xmm6,xmm6,xmm8
+ mov r12,rax
+ shrd r14,r14,5
+ vpsrlq xmm9,xmm5,19
+ xor r13,r11
+ xor r12,rbx
+ vpxor xmm11,xmm11,xmm10
+ shrd r13,r13,4
+ xor r14,rdx
+ vpsllq xmm10,xmm10,42
+ and r12,r11
+ xor r13,r11
+ vpxor xmm11,xmm11,xmm9
+ add rcx,QWORD[104+rsp]
+ mov rdi,rdx
+ vpsrlq xmm9,xmm9,42
+ xor r12,rbx
+ shrd r14,r14,6
+ vpxor xmm11,xmm11,xmm10
+ xor rdi,r8
+ add rcx,r12
+ vpxor xmm11,xmm11,xmm9
+ shrd r13,r13,14
+ and r15,rdi
+ vpaddq xmm6,xmm6,xmm11
+ xor r14,rdx
+ add rcx,r13
+ vpaddq xmm10,xmm6,XMMWORD[64+rbp]
+ xor r15,r8
+ shrd r14,r14,28
+ add r10,rcx
+ add rcx,r15
+ mov r13,r10
+ add r14,rcx
+ vmovdqa XMMWORD[96+rsp],xmm10
+ vpalignr xmm8,xmm0,xmm7,8
+ shrd r13,r13,23
+ mov rcx,r14
+ vpalignr xmm11,xmm4,xmm3,8
+ mov r12,r11
+ shrd r14,r14,5
+ vpsrlq xmm10,xmm8,1
+ xor r13,r10
+ xor r12,rax
+ vpaddq xmm7,xmm7,xmm11
+ shrd r13,r13,4
+ xor r14,rcx
+ vpsrlq xmm11,xmm8,7
+ and r12,r10
+ xor r13,r10
+ vpsllq xmm9,xmm8,56
+ add rbx,QWORD[112+rsp]
+ mov r15,rcx
+ vpxor xmm8,xmm11,xmm10
+ xor r12,rax
+ shrd r14,r14,6
+ vpsrlq xmm10,xmm10,7
+ xor r15,rdx
+ add rbx,r12
+ vpxor xmm8,xmm8,xmm9
+ shrd r13,r13,14
+ and rdi,r15
+ vpsllq xmm9,xmm9,7
+ xor r14,rcx
+ add rbx,r13
+ vpxor xmm8,xmm8,xmm10
+ xor rdi,rdx
+ shrd r14,r14,28
+ vpsrlq xmm11,xmm6,6
+ add r9,rbx
+ add rbx,rdi
+ vpxor xmm8,xmm8,xmm9
+ mov r13,r9
+ add r14,rbx
+ vpsllq xmm10,xmm6,3
+ shrd r13,r13,23
+ mov rbx,r14
+ vpaddq xmm7,xmm7,xmm8
+ mov r12,r10
+ shrd r14,r14,5
+ vpsrlq xmm9,xmm6,19
+ xor r13,r9
+ xor r12,r11
+ vpxor xmm11,xmm11,xmm10
+ shrd r13,r13,4
+ xor r14,rbx
+ vpsllq xmm10,xmm10,42
+ and r12,r9
+ xor r13,r9
+ vpxor xmm11,xmm11,xmm9
+ add rax,QWORD[120+rsp]
+ mov rdi,rbx
+ vpsrlq xmm9,xmm9,42
+ xor r12,r11
+ shrd r14,r14,6
+ vpxor xmm11,xmm11,xmm10
+ xor rdi,rcx
+ add rax,r12
+ vpxor xmm11,xmm11,xmm9
+ shrd r13,r13,14
+ and r15,rdi
+ vpaddq xmm7,xmm7,xmm11
+ xor r14,rbx
+ add rax,r13
+ vpaddq xmm10,xmm7,XMMWORD[96+rbp]
+ xor r15,rcx
+ shrd r14,r14,28
+ add r8,rax
+ add rax,r15
+ mov r13,r8
+ add r14,rax
+ vmovdqa XMMWORD[112+rsp],xmm10
+ cmp BYTE[135+rbp],0
+ jne NEAR $L$avx_00_47
+ shrd r13,r13,23
+ mov rax,r14
+ mov r12,r9
+ shrd r14,r14,5
+ xor r13,r8
+ xor r12,r10
+ shrd r13,r13,4
+ xor r14,rax
+ and r12,r8
+ xor r13,r8
+ add r11,QWORD[rsp]
+ mov r15,rax
+ xor r12,r10
+ shrd r14,r14,6
+ xor r15,rbx
+ add r11,r12
+ shrd r13,r13,14
+ and rdi,r15
+ xor r14,rax
+ add r11,r13
+ xor rdi,rbx
+ shrd r14,r14,28
+ add rdx,r11
+ add r11,rdi
+ mov r13,rdx
+ add r14,r11
+ shrd r13,r13,23
+ mov r11,r14
+ mov r12,r8
+ shrd r14,r14,5
+ xor r13,rdx
+ xor r12,r9
+ shrd r13,r13,4
+ xor r14,r11
+ and r12,rdx
+ xor r13,rdx
+ add r10,QWORD[8+rsp]
+ mov rdi,r11
+ xor r12,r9
+ shrd r14,r14,6
+ xor rdi,rax
+ add r10,r12
+ shrd r13,r13,14
+ and r15,rdi
+ xor r14,r11
+ add r10,r13
+ xor r15,rax
+ shrd r14,r14,28
+ add rcx,r10
+ add r10,r15
+ mov r13,rcx
+ add r14,r10
+ shrd r13,r13,23
+ mov r10,r14
+ mov r12,rdx
+ shrd r14,r14,5
+ xor r13,rcx
+ xor r12,r8
+ shrd r13,r13,4
+ xor r14,r10
+ and r12,rcx
+ xor r13,rcx
+ add r9,QWORD[16+rsp]
+ mov r15,r10
+ xor r12,r8
+ shrd r14,r14,6
+ xor r15,r11
+ add r9,r12
+ shrd r13,r13,14
+ and rdi,r15
+ xor r14,r10
+ add r9,r13
+ xor rdi,r11
+ shrd r14,r14,28
+ add rbx,r9
+ add r9,rdi
+ mov r13,rbx
+ add r14,r9
+ shrd r13,r13,23
+ mov r9,r14
+ mov r12,rcx
+ shrd r14,r14,5
+ xor r13,rbx
+ xor r12,rdx
+ shrd r13,r13,4
+ xor r14,r9
+ and r12,rbx
+ xor r13,rbx
+ add r8,QWORD[24+rsp]
+ mov rdi,r9
+ xor r12,rdx
+ shrd r14,r14,6
+ xor rdi,r10
+ add r8,r12
+ shrd r13,r13,14
+ and r15,rdi
+ xor r14,r9
+ add r8,r13
+ xor r15,r10
+ shrd r14,r14,28
+ add rax,r8
+ add r8,r15
+ mov r13,rax
+ add r14,r8
+ shrd r13,r13,23
+ mov r8,r14
+ mov r12,rbx
+ shrd r14,r14,5
+ xor r13,rax
+ xor r12,rcx
+ shrd r13,r13,4
+ xor r14,r8
+ and r12,rax
+ xor r13,rax
+ add rdx,QWORD[32+rsp]
+ mov r15,r8
+ xor r12,rcx
+ shrd r14,r14,6
+ xor r15,r9
+ add rdx,r12
+ shrd r13,r13,14
+ and rdi,r15
+ xor r14,r8
+ add rdx,r13
+ xor rdi,r9
+ shrd r14,r14,28
+ add r11,rdx
+ add rdx,rdi
+ mov r13,r11
+ add r14,rdx
+ shrd r13,r13,23
+ mov rdx,r14
+ mov r12,rax
+ shrd r14,r14,5
+ xor r13,r11
+ xor r12,rbx
+ shrd r13,r13,4
+ xor r14,rdx
+ and r12,r11
+ xor r13,r11
+ add rcx,QWORD[40+rsp]
+ mov rdi,rdx
+ xor r12,rbx
+ shrd r14,r14,6
+ xor rdi,r8
+ add rcx,r12
+ shrd r13,r13,14
+ and r15,rdi
+ xor r14,rdx
+ add rcx,r13
+ xor r15,r8
+ shrd r14,r14,28
+ add r10,rcx
+ add rcx,r15
+ mov r13,r10
+ add r14,rcx
+ shrd r13,r13,23
+ mov rcx,r14
+ mov r12,r11
+ shrd r14,r14,5
+ xor r13,r10
+ xor r12,rax
+ shrd r13,r13,4
+ xor r14,rcx
+ and r12,r10
+ xor r13,r10
+ add rbx,QWORD[48+rsp]
+ mov r15,rcx
+ xor r12,rax
+ shrd r14,r14,6
+ xor r15,rdx
+ add rbx,r12
+ shrd r13,r13,14
+ and rdi,r15
+ xor r14,rcx
+ add rbx,r13
+ xor rdi,rdx
+ shrd r14,r14,28
+ add r9,rbx
+ add rbx,rdi
+ mov r13,r9
+ add r14,rbx
+ shrd r13,r13,23
+ mov rbx,r14
+ mov r12,r10
+ shrd r14,r14,5
+ xor r13,r9
+ xor r12,r11
+ shrd r13,r13,4
+ xor r14,rbx
+ and r12,r9
+ xor r13,r9
+ add rax,QWORD[56+rsp]
+ mov rdi,rbx
+ xor r12,r11
+ shrd r14,r14,6
+ xor rdi,rcx
+ add rax,r12
+ shrd r13,r13,14
+ and r15,rdi
+ xor r14,rbx
+ add rax,r13
+ xor r15,rcx
+ shrd r14,r14,28
+ add r8,rax
+ add rax,r15
+ mov r13,r8
+ add r14,rax
+ shrd r13,r13,23
+ mov rax,r14
+ mov r12,r9
+ shrd r14,r14,5
+ xor r13,r8
+ xor r12,r10
+ shrd r13,r13,4
+ xor r14,rax
+ and r12,r8
+ xor r13,r8
+ add r11,QWORD[64+rsp]
+ mov r15,rax
+ xor r12,r10
+ shrd r14,r14,6
+ xor r15,rbx
+ add r11,r12
+ shrd r13,r13,14
+ and rdi,r15
+ xor r14,rax
+ add r11,r13
+ xor rdi,rbx
+ shrd r14,r14,28
+ add rdx,r11
+ add r11,rdi
+ mov r13,rdx
+ add r14,r11
+ shrd r13,r13,23
+ mov r11,r14
+ mov r12,r8
+ shrd r14,r14,5
+ xor r13,rdx
+ xor r12,r9
+ shrd r13,r13,4
+ xor r14,r11
+ and r12,rdx
+ xor r13,rdx
+ add r10,QWORD[72+rsp]
+ mov rdi,r11
+ xor r12,r9
+ shrd r14,r14,6
+ xor rdi,rax
+ add r10,r12
+ shrd r13,r13,14
+ and r15,rdi
+ xor r14,r11
+ add r10,r13
+ xor r15,rax
+ shrd r14,r14,28
+ add rcx,r10
+ add r10,r15
+ mov r13,rcx
+ add r14,r10
+ shrd r13,r13,23
+ mov r10,r14
+ mov r12,rdx
+ shrd r14,r14,5
+ xor r13,rcx
+ xor r12,r8
+ shrd r13,r13,4
+ xor r14,r10
+ and r12,rcx
+ xor r13,rcx
+ add r9,QWORD[80+rsp]
+ mov r15,r10
+ xor r12,r8
+ shrd r14,r14,6
+ xor r15,r11
+ add r9,r12
+ shrd r13,r13,14
+ and rdi,r15
+ xor r14,r10
+ add r9,r13
+ xor rdi,r11
+ shrd r14,r14,28
+ add rbx,r9
+ add r9,rdi
+ mov r13,rbx
+ add r14,r9
+ shrd r13,r13,23
+ mov r9,r14
+ mov r12,rcx
+ shrd r14,r14,5
+ xor r13,rbx
+ xor r12,rdx
+ shrd r13,r13,4
+ xor r14,r9
+ and r12,rbx
+ xor r13,rbx
+ add r8,QWORD[88+rsp]
+ mov rdi,r9
+ xor r12,rdx
+ shrd r14,r14,6
+ xor rdi,r10
+ add r8,r12
+ shrd r13,r13,14
+ and r15,rdi
+ xor r14,r9
+ add r8,r13
+ xor r15,r10
+ shrd r14,r14,28
+ add rax,r8
+ add r8,r15
+ mov r13,rax
+ add r14,r8
+ shrd r13,r13,23
+ mov r8,r14
+ mov r12,rbx
+ shrd r14,r14,5
+ xor r13,rax
+ xor r12,rcx
+ shrd r13,r13,4
+ xor r14,r8
+ and r12,rax
+ xor r13,rax
+ add rdx,QWORD[96+rsp]
+ mov r15,r8
+ xor r12,rcx
+ shrd r14,r14,6
+ xor r15,r9
+ add rdx,r12
+ shrd r13,r13,14
+ and rdi,r15
+ xor r14,r8
+ add rdx,r13
+ xor rdi,r9
+ shrd r14,r14,28
+ add r11,rdx
+ add rdx,rdi
+ mov r13,r11
+ add r14,rdx
+ shrd r13,r13,23
+ mov rdx,r14
+ mov r12,rax
+ shrd r14,r14,5
+ xor r13,r11
+ xor r12,rbx
+ shrd r13,r13,4
+ xor r14,rdx
+ and r12,r11
+ xor r13,r11
+ add rcx,QWORD[104+rsp]
+ mov rdi,rdx
+ xor r12,rbx
+ shrd r14,r14,6
+ xor rdi,r8
+ add rcx,r12
+ shrd r13,r13,14
+ and r15,rdi
+ xor r14,rdx
+ add rcx,r13
+ xor r15,r8
+ shrd r14,r14,28
+ add r10,rcx
+ add rcx,r15
+ mov r13,r10
+ add r14,rcx
+ shrd r13,r13,23
+ mov rcx,r14
+ mov r12,r11
+ shrd r14,r14,5
+ xor r13,r10
+ xor r12,rax
+ shrd r13,r13,4
+ xor r14,rcx
+ and r12,r10
+ xor r13,r10
+ add rbx,QWORD[112+rsp]
+ mov r15,rcx
+ xor r12,rax
+ shrd r14,r14,6
+ xor r15,rdx
+ add rbx,r12
+ shrd r13,r13,14
+ and rdi,r15
+ xor r14,rcx
+ add rbx,r13
+ xor rdi,rdx
+ shrd r14,r14,28
+ add r9,rbx
+ add rbx,rdi
+ mov r13,r9
+ add r14,rbx
+ shrd r13,r13,23
+ mov rbx,r14
+ mov r12,r10
+ shrd r14,r14,5
+ xor r13,r9
+ xor r12,r11
+ shrd r13,r13,4
+ xor r14,rbx
+ and r12,r9
+ xor r13,r9
+ add rax,QWORD[120+rsp]
+ mov rdi,rbx
+ xor r12,r11
+ shrd r14,r14,6
+ xor rdi,rcx
+ add rax,r12
+ shrd r13,r13,14
+ and r15,rdi
+ xor r14,rbx
+ add rax,r13
+ xor r15,rcx
+ shrd r14,r14,28
+ add r8,rax
+ add rax,r15
+ mov r13,r8
+ add r14,rax
+ mov rdi,QWORD[((128+0))+rsp]
+ mov rax,r14
+
+ add rax,QWORD[rdi]
+ lea rsi,[128+rsi]
+ 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_avx
+
+ mov rsi,QWORD[((128+24))+rsp]
+ vzeroupper
+ movaps xmm6,XMMWORD[((128+32))+rsp]
+ movaps xmm7,XMMWORD[((128+48))+rsp]
+ movaps xmm8,XMMWORD[((128+64))+rsp]
+ movaps xmm9,XMMWORD[((128+80))+rsp]
+ movaps xmm10,XMMWORD[((128+96))+rsp]
+ movaps xmm11,XMMWORD[((128+112))+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_avx:
+ mov rdi,QWORD[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD[16+rsp]
+ DB 0F3h,0C3h ;repret
+$L$SEH_end_sha512_block_data_order_avx:
EXTERN __imp_RtlVirtualUnwind
ALIGN 16
@@ -1903,9 +4190,23 @@
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
+ DD $L$SEH_begin_sha512_block_data_order_xop wrt ..imagebase
+ DD $L$SEH_end_sha512_block_data_order_xop wrt ..imagebase
+ DD $L$SEH_info_sha512_block_data_order_xop wrt ..imagebase
+ DD $L$SEH_begin_sha512_block_data_order_avx wrt ..imagebase
+ DD $L$SEH_end_sha512_block_data_order_avx wrt ..imagebase
+ DD $L$SEH_info_sha512_block_data_order_avx 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
+$L$SEH_info_sha512_block_data_order_xop:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$prologue_xop wrt ..imagebase,$L$epilogue_xop wrt ..imagebase
+$L$SEH_info_sha512_block_data_order_avx:
+DB 9,0,0,0
+ DD se_handler wrt ..imagebase
+ DD $L$prologue_avx wrt ..imagebase,$L$epilogue_avx wrt ..imagebase
diff --git a/tools/VERSION b/tools/VERSION
index 3eb18d8..8bec38a 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 1
MINOR 19
PATCH 0
-PRERELEASE 3
+PRERELEASE 4
PRERELEASE_PATCH 0
diff --git a/tools/bots/dart_sdk.py b/tools/bots/dart_sdk.py
index 00e7d35..92f89f8 100644
--- a/tools/bots/dart_sdk.py
+++ b/tools/bots/dart_sdk.py
@@ -81,8 +81,9 @@
def DartArchiveUploadSDKs(system, sdk32_zip, sdk64_zip):
namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
- revision = utils.GetArchiveVersion()
- for revision in [revision, 'latest']:
+ git_number = utils.GetArchiveVersion()
+ git_hash = 'hash/%s' % utils.GetGitRevision()
+ for revision in [git_number, git_hash, 'latest']:
path32 = namer.sdk_zipfilepath(revision, system, 'ia32', 'release')
path64 = namer.sdk_zipfilepath(revision, system, 'x64', 'release')
DartArchiveFile(sdk32_zip, path32, checksum_files=True)
diff --git a/tools/create_sdk.py b/tools/create_sdk.py
index dad929b..85ba811 100755
--- a/tools/create_sdk.py
+++ b/tools/create_sdk.py
@@ -44,7 +44,6 @@
# ......dart_client.platform
# ......dart_server.platform
# ......dart_shared.platform
-# ......dart2dart.platform
# ......_internal/
#.........spec.sum
#.........strong.sum
@@ -267,8 +266,7 @@
# Copy the platform descriptors.
for file_name in ["dart_client.platform",
"dart_server.platform",
- "dart_shared.platform",
- "dart2dart.platform"]:
+ "dart_shared.platform"]:
copyfile(join(HOME, 'sdk', 'lib', file_name), join(LIB, file_name));
# Copy libraries.dart to lib/_internal/libraries.dart for backwards
diff --git a/tools/deps/dartium.deps/DEPS b/tools/deps/dartium.deps/DEPS
index b73f612..9457e56 100644
--- a/tools/deps/dartium.deps/DEPS
+++ b/tools/deps/dartium.deps/DEPS
@@ -9,7 +9,7 @@
vars.update({
"dartium_chromium_commit": "67a7ba9669f7bb0300ef35085d4e6bb98b1966cc",
- "dartium_webkit_commit": "bfb8649f69c7b02100aa6fd5a9c77d7858106d1b",
+ "dartium_webkit_commit": "006cf3ee53f37973d2db812a62fc8f5f83b52948",
"chromium_base_revision": "338390",
# We use mirrors of all github repos to guarantee reproducibility and
diff --git a/tools/utils.py b/tools/utils.py
index 0611bdd..51a3a03 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -103,7 +103,7 @@
# Try to guess Visual Studio location when buiding on Windows.
def GuessVisualStudioPath():
- defaultPath = r"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7" \
+ defaultPath = r"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7" \
r"\IDE"
defaultExecutable = "devenv.com"
@@ -148,8 +148,8 @@
# Can't find value under the key - continue to the next key.
continue
isExpress = executable != 'devenv.com'
- if not isExpress and subkeyName == '12.0':
- # Stop search since if we found non-Express VS2013 version
+ if not isExpress and subkeyName == '14.0':
+ # Stop search since if we found non-Express VS2015 version
# installed, which is preferred version.
return installDir, executable
else: